libweave: Export some base symbols necessary externally
Those symbols are used in public interface or useful for testing.
BUG=brillo:1256
TEST=`FEATURES=test emerge-gizmo libweave buffet`
Change-Id: I191803d93fe49e2c4b87e58ab0297c6f52d05179
Reviewed-on: https://chromium-review.googlesource.com/294843
Reviewed-by: Vitaly Buka <vitalybuka@chromium.org>
Commit-Queue: Vitaly Buka <vitalybuka@chromium.org>
Tested-by: Vitaly Buka <vitalybuka@chromium.org>
Reviewed-by: Alex Vakulenko <avakulenko@chromium.org>
diff --git a/libweave/external/base/atomicops.h b/libweave/external/base/atomicops.h
index eea00ed..29eb88b 100644
--- a/libweave/external/base/atomicops.h
+++ b/libweave/external/base/atomicops.h
@@ -167,8 +167,7 @@
bool has_sse2; // Processor has SSE2.
bool has_cmpxchg16b; // Processor supports cmpxchg16b instruction.
};
-BASE_EXPORT extern struct AtomicOps_x86CPUFeatureStruct
- AtomicOps_Internalx86CPUFeatures;
+extern struct AtomicOps_x86CPUFeatureStruct AtomicOps_Internalx86CPUFeatures;
#endif
// Try to use a portable implementation based on C++11 atomics.
diff --git a/libweave/external/base/base_export.h b/libweave/external/base/base_export.h
index 89693b4..dc01442 100644
--- a/libweave/external/base/base_export.h
+++ b/libweave/external/base/base_export.h
@@ -5,7 +5,7 @@
#ifndef BASE_BASE_EXPORT_H_
#define BASE_BASE_EXPORT_H_
-#define BASE_EXPORT
-#define BASE_EXPORT_PRIVATE
+#define BASE_EXPORT __attribute__((__visibility__("default")))
+#define BASE_EXPORT_PRIVATE __attribute__((__visibility__("hidden")))
#endif // BASE_BASE_EXPORT_H_
diff --git a/libweave/external/base/bind_helpers.h b/libweave/external/base/bind_helpers.h
index 09deb33..5044a1c 100644
--- a/libweave/external/base/bind_helpers.h
+++ b/libweave/external/base/bind_helpers.h
@@ -698,7 +698,7 @@
return internal::IgnoreResultHelper<Callback<T> >(data);
}
-BASE_EXPORT void DoNothing();
+void DoNothing();
template<typename T>
void DeletePointer(T* obj) {
diff --git a/libweave/external/base/command_line.h b/libweave/external/base/command_line.h
index 662a4d4..686c978 100644
--- a/libweave/external/base/command_line.h
+++ b/libweave/external/base/command_line.h
@@ -21,7 +21,7 @@
namespace base {
-class BASE_EXPORT CommandLine {
+class CommandLine {
public:
static bool Init(int argc, const char* const* argv) { return true; }
};
diff --git a/libweave/external/base/guid.h b/libweave/external/base/guid.h
index 420ec17..a43a223 100644
--- a/libweave/external/base/guid.h
+++ b/libweave/external/base/guid.h
@@ -17,11 +17,11 @@
// If GUID generation fails an empty string is returned.
// The POSIX implementation uses pseudo random number generation to create
// the GUID. The Windows implementation uses system services.
-BASE_EXPORT std::string GenerateGUID();
+std::string GenerateGUID();
#if defined(OS_POSIX)
// For unit testing purposes only. Do not use outside of tests.
-BASE_EXPORT std::string RandomDataToGUIDString(const uint64 bytes[2]);
+std::string RandomDataToGUIDString(const uint64 bytes[2]);
#endif
} // namespace base
diff --git a/libweave/external/base/json/string_escape.h b/libweave/external/base/json/string_escape.h
index c3a34bd..6608b3b 100644
--- a/libweave/external/base/json/string_escape.h
+++ b/libweave/external/base/json/string_escape.h
@@ -25,13 +25,13 @@
//
// If |put_in_quotes| is true, then a leading and trailing double-quote mark
// will be appended to |dest| as well.
-BASE_EXPORT bool EscapeJSONString(const StringPiece& str,
- bool put_in_quotes,
- std::string* dest);
+bool EscapeJSONString(const StringPiece& str,
+ bool put_in_quotes,
+ std::string* dest);
// Helper functions that wrap the above two functions but return the value
// instead of appending. |put_in_quotes| is always true.
-BASE_EXPORT std::string GetQuotedJSONString(const StringPiece& str);
+std::string GetQuotedJSONString(const StringPiece& str);
// Given an arbitrary byte string |str|, this will escape all non-ASCII bytes
// as \uXXXX escape sequences. This function is *NOT* meant to be used with
@@ -44,8 +44,8 @@
//
// The output of this function takes the *appearance* of JSON but is not in
// fact valid according to RFC 4627.
-BASE_EXPORT std::string EscapeBytesAsInvalidJSONString(const StringPiece& str,
- bool put_in_quotes);
+std::string EscapeBytesAsInvalidJSONString(const StringPiece& str,
+ bool put_in_quotes);
} // namespace base
diff --git a/libweave/external/base/location.cc b/libweave/external/base/location.cc
index b31cae8..4b57912 100644
--- a/libweave/external/base/location.cc
+++ b/libweave/external/base/location.cc
@@ -93,7 +93,7 @@
#if defined(COMPILER_MSVC)
__declspec(noinline)
#endif
-BASE_EXPORT const void* GetProgramCounter() {
+ const void* GetProgramCounter() {
#if defined(COMPILER_MSVC)
return _ReturnAddress();
#elif defined(COMPILER_GCC) && !defined(OS_NACL)
diff --git a/libweave/external/base/location.h b/libweave/external/base/location.h
index 4a38264..7ec57f3 100644
--- a/libweave/external/base/location.h
+++ b/libweave/external/base/location.h
@@ -15,7 +15,7 @@
// Location provides basic info where of an object was constructed, or was
// significantly brought to life.
-class BASE_EXPORT Location {
+class Location {
public:
// Constructor should be called with a long-lived char*, such as __FILE__.
// It assumes the provided value will persist as a global constant, and it
@@ -76,7 +76,7 @@
int line_number;
};
-BASE_EXPORT const void* GetProgramCounter();
+const void* GetProgramCounter();
// Define a macro to record the current source location.
#define FROM_HERE FROM_HERE_WITH_EXPLICIT_FUNCTION(__FUNCTION__)
diff --git a/libweave/external/base/logging.cc b/libweave/external/base/logging.cc
index 1a796b8..c576d18 100644
--- a/libweave/external/base/logging.cc
+++ b/libweave/external/base/logging.cc
@@ -252,7 +252,7 @@
// This was defined at the beginning of this file.
#undef write
-BASE_EXPORT void LogErrorNotReached(const char* file, int line) {
+void LogErrorNotReached(const char* file, int line) {
LogMessage(file, line, LOG_ERROR).stream()
<< "NOTREACHED() hit.";
}
diff --git a/libweave/external/base/logging.h b/libweave/external/base/logging.h
index 34846fc..c3be83f 100644
--- a/libweave/external/base/logging.h
+++ b/libweave/external/base/logging.h
@@ -157,7 +157,7 @@
// Implementation of the InitLogging() method declared below. We use a
// more-specific name so we can #define it above without affecting other code
// that has named stuff "InitLogging".
-BASE_EXPORT bool BaseInitLoggingImpl(const LoggingSettings& settings);
+bool BASE_EXPORT BaseInitLoggingImpl(const LoggingSettings& settings);
// Sets the log file name and other global logging state. Calling this function
// is recommended, and is normally done at the beginning of application init.
@@ -195,7 +195,7 @@
// __FILE__).
// Note that |N| is the size *with* the null terminator.
-BASE_EXPORT int GetVlogLevelHelper(const char* file_start, size_t N);
+int GetVlogLevelHelper(const char* file_start, size_t N);
template <size_t N>
int GetVlogLevel(const char (&file)[N]) {
@@ -206,13 +206,15 @@
// process and thread IDs default to off, the timestamp defaults to on.
// If this function is not called, logging defaults to writing the timestamp
// only.
-BASE_EXPORT void SetLogItems(bool enable_process_id, bool enable_thread_id,
- bool enable_timestamp, bool enable_tickcount);
+BASE_EXPORT void SetLogItems(bool enable_process_id,
+ bool enable_thread_id,
+ bool enable_timestamp,
+ bool enable_tickcount);
// Sets whether or not you'd like to see fatal debug messages popped up in
// a dialog box or not.
// Dialogs are not shown by default.
-BASE_EXPORT void SetShowErrorDialogs(bool enable_dialogs);
+void SetShowErrorDialogs(bool enable_dialogs);
// Sets the Log Assert Handler that will be used to notify of check failures.
// The default handler shows a dialog box and then terminate the process,
@@ -382,8 +384,8 @@
// Commonly used instantiations of MakeCheckOpString<>. Explicitly instantiated
// in logging.cc.
-extern template BASE_EXPORT std::string* MakeCheckOpString<int, int>(
- const int&, const int&, const char* names);
+extern template BASE_EXPORT std::string*
+MakeCheckOpString<int, int>(const int&, const int&, const char* names);
extern template BASE_EXPORT
std::string* MakeCheckOpString<unsigned long, unsigned long>(
const unsigned long&, const unsigned long&, const char* names);
diff --git a/libweave/external/base/memory/ref_counted.h b/libweave/external/base/memory/ref_counted.h
index ee5f58b..45d988d 100644
--- a/libweave/external/base/memory/ref_counted.h
+++ b/libweave/external/base/memory/ref_counted.h
@@ -19,7 +19,7 @@
namespace subtle {
-class BASE_EXPORT RefCountedBase {
+class RefCountedBase {
public:
bool HasOneRef() const { return ref_count_ == 1; }
@@ -69,7 +69,7 @@
DISALLOW_COPY_AND_ASSIGN(RefCountedBase);
};
-class BASE_EXPORT RefCountedThreadSafeBase {
+class RefCountedThreadSafeBase {
public:
bool HasOneRef() const;
diff --git a/libweave/external/base/memory/weak_ptr.h b/libweave/external/base/memory/weak_ptr.h
index 4c1fd4a..1847773 100644
--- a/libweave/external/base/memory/weak_ptr.h
+++ b/libweave/external/base/memory/weak_ptr.h
@@ -78,11 +78,11 @@
// These classes are part of the WeakPtr implementation.
// DO NOT USE THESE CLASSES DIRECTLY YOURSELF.
-class BASE_EXPORT WeakReference {
+class WeakReference {
public:
// Although Flag is bound to a specific SequencedTaskRunner, it may be
// deleted from another via base::WeakPtr::~WeakPtr().
- class BASE_EXPORT Flag : public RefCountedThreadSafe<Flag> {
+ class Flag : public RefCountedThreadSafe<Flag> {
public:
Flag();
@@ -107,7 +107,7 @@
scoped_refptr<const Flag> flag_;
};
-class BASE_EXPORT WeakReferenceOwner {
+class WeakReferenceOwner {
public:
WeakReferenceOwner();
~WeakReferenceOwner();
@@ -128,7 +128,7 @@
// constructor by avoiding the need for a public accessor for ref_. A
// WeakPtr<T> cannot access the private members of WeakPtr<U>, so this
// base class gives us a way to access ref_ in a protected fashion.
-class BASE_EXPORT WeakPtrBase {
+class WeakPtrBase {
public:
WeakPtrBase();
~WeakPtrBase();
diff --git a/libweave/external/base/rand_util.h b/libweave/external/base/rand_util.h
index e3d4888..e29a9ce 100644
--- a/libweave/external/base/rand_util.h
+++ b/libweave/external/base/rand_util.h
@@ -13,31 +13,31 @@
namespace base {
// Returns a random number in range [0, kuint64max]. Thread-safe.
-BASE_EXPORT uint64 RandUint64();
+uint64 RandUint64();
// Returns a random number between min and max (inclusive). Thread-safe.
-BASE_EXPORT int RandInt(int min, int max);
+int RandInt(int min, int max);
// Returns a random number in range [0, range). Thread-safe.
//
// Note that this can be used as an adapter for std::random_shuffle():
// Given a pre-populated |std::vector<int> myvector|, shuffle it as
// std::random_shuffle(myvector.begin(), myvector.end(), base::RandGenerator);
-BASE_EXPORT uint64 RandGenerator(uint64 range);
+uint64 RandGenerator(uint64 range);
// Returns a random double in range [0, 1). Thread-safe.
-BASE_EXPORT double RandDouble();
+double RandDouble();
// Given input |bits|, convert with maximum precision to a double in
// the range [0, 1). Thread-safe.
-BASE_EXPORT double BitsToOpenEndedUnitInterval(uint64 bits);
+double BitsToOpenEndedUnitInterval(uint64 bits);
// Fills |output_length| bytes of |output| with random data.
//
// WARNING:
// Do not use for security-sensitive purposes.
// See crypto/ for cryptographically secure random number generation APIs.
-BASE_EXPORT void RandBytes(void* output, size_t output_length);
+void RandBytes(void* output, size_t output_length);
// Fills a string of length |length| with random data and returns it.
// |length| should be nonzero.
@@ -48,7 +48,7 @@
// WARNING:
// Do not use for security-sensitive purposes.
// See crypto/ for cryptographically secure random number generation APIs.
-BASE_EXPORT std::string RandBytesAsString(size_t length);
+std::string RandBytesAsString(size_t length);
} // namespace base
diff --git a/libweave/external/base/strings/string_number_conversions.h b/libweave/external/base/strings/string_number_conversions.h
index 78059ed..c68d0af 100644
--- a/libweave/external/base/strings/string_number_conversions.h
+++ b/libweave/external/base/strings/string_number_conversions.h
@@ -28,19 +28,19 @@
// Number -> string conversions ------------------------------------------------
-BASE_EXPORT std::string IntToString(int value);
+std::string IntToString(int value);
-BASE_EXPORT std::string UintToString(unsigned value);
+std::string UintToString(unsigned value);
-BASE_EXPORT std::string Int64ToString(int64 value);
+std::string Int64ToString(int64 value);
-BASE_EXPORT std::string Uint64ToString(uint64 value);
+std::string Uint64ToString(uint64 value);
-BASE_EXPORT std::string SizeTToString(size_t value);
+std::string SizeTToString(size_t value);
// DoubleToString converts the double to a string format that ignores the
// locale. If you want to use locale specific formatting, use ICU.
-BASE_EXPORT std::string DoubleToString(double value);
+std::string DoubleToString(double value);
// String -> number conversions ------------------------------------------------
@@ -58,15 +58,15 @@
// - No characters parseable as a number at the beginning of the string.
// |*output| will be set to 0.
// - Empty string. |*output| will be set to 0.
-BASE_EXPORT bool StringToInt(const StringPiece& input, int* output);
+bool StringToInt(const StringPiece& input, int* output);
-BASE_EXPORT bool StringToUint(const StringPiece& input, unsigned* output);
+bool StringToUint(const StringPiece& input, unsigned* output);
-BASE_EXPORT bool StringToInt64(const StringPiece& input, int64* output);
+bool StringToInt64(const StringPiece& input, int64* output);
-BASE_EXPORT bool StringToUint64(const StringPiece& input, uint64* output);
+bool StringToUint64(const StringPiece& input, uint64* output);
-BASE_EXPORT bool StringToSizeT(const StringPiece& input, size_t* output);
+bool StringToSizeT(const StringPiece& input, size_t* output);
// For floating-point conversions, only conversions of input strings in decimal
// form are defined to work. Behavior with strings representing floating-point
@@ -74,7 +74,7 @@
// NaN and inf) is undefined. Otherwise, these behave the same as the integral
// variants. This expects the input string to NOT be specific to the locale.
// If your input is locale specific, use ICU to read the number.
-BASE_EXPORT bool StringToDouble(const std::string& input, double* output);
+bool StringToDouble(const std::string& input, double* output);
// Hex encoding ----------------------------------------------------------------
@@ -84,36 +84,35 @@
// you suspect that the data you want to format might be large, the absolute
// max size for |size| should be is
// std::numeric_limits<size_t>::max() / 2
-BASE_EXPORT std::string HexEncode(const void* bytes, size_t size);
+std::string HexEncode(const void* bytes, size_t size);
// Best effort conversion, see StringToInt above for restrictions.
// Will only successful parse hex values that will fit into |output|, i.e.
// -0x80000000 < |input| < 0x7FFFFFFF.
-BASE_EXPORT bool HexStringToInt(const StringPiece& input, int* output);
+bool HexStringToInt(const StringPiece& input, int* output);
// Best effort conversion, see StringToInt above for restrictions.
// Will only successful parse hex values that will fit into |output|, i.e.
// 0x00000000 < |input| < 0xFFFFFFFF.
// The string is not required to start with 0x.
-BASE_EXPORT bool HexStringToUInt(const StringPiece& input, uint32* output);
+bool HexStringToUInt(const StringPiece& input, uint32* output);
// Best effort conversion, see StringToInt above for restrictions.
// Will only successful parse hex values that will fit into |output|, i.e.
// -0x8000000000000000 < |input| < 0x7FFFFFFFFFFFFFFF.
-BASE_EXPORT bool HexStringToInt64(const StringPiece& input, int64* output);
+bool HexStringToInt64(const StringPiece& input, int64* output);
// Best effort conversion, see StringToInt above for restrictions.
// Will only successful parse hex values that will fit into |output|, i.e.
// 0x0000000000000000 < |input| < 0xFFFFFFFFFFFFFFFF.
// The string is not required to start with 0x.
-BASE_EXPORT bool HexStringToUInt64(const StringPiece& input, uint64* output);
+bool HexStringToUInt64(const StringPiece& input, uint64* output);
// Similar to the previous functions, except that output is a vector of bytes.
// |*output| will contain as many bytes as were successfully parsed prior to the
// error. There is no overflow, but input.size() must be evenly divisible by 2.
// Leading 0x or +/- are not allowed.
-BASE_EXPORT bool HexStringToBytes(const std::string& input,
- std::vector<uint8>* output);
+bool HexStringToBytes(const std::string& input, std::vector<uint8>* output);
} // namespace base
diff --git a/libweave/external/base/strings/string_piece.h b/libweave/external/base/strings/string_piece.h
index c3ce222..14ee635 100644
--- a/libweave/external/base/strings/string_piece.h
+++ b/libweave/external/base/strings/string_piece.h
@@ -46,57 +46,34 @@
// template internal to the .cc file.
namespace internal {
-BASE_EXPORT void CopyToString(const StringPiece& self, std::string* target);
+void CopyToString(const StringPiece& self, std::string* target);
-BASE_EXPORT void AppendToString(const StringPiece& self, std::string* target);
+void AppendToString(const StringPiece& self, std::string* target);
-BASE_EXPORT size_t copy(const StringPiece& self,
- char* buf,
- size_t n,
- size_t pos);
+size_t copy(const StringPiece& self, char* buf, size_t n, size_t pos);
-BASE_EXPORT size_t find(const StringPiece& self,
- const StringPiece& s,
- size_t pos);
-BASE_EXPORT size_t find(const StringPiece& self,
- char c,
- size_t pos);
+size_t find(const StringPiece& self, const StringPiece& s, size_t pos);
+size_t find(const StringPiece& self, char c, size_t pos);
-BASE_EXPORT size_t rfind(const StringPiece& self,
+size_t rfind(const StringPiece& self, const StringPiece& s, size_t pos);
+size_t rfind(const StringPiece& self, char c, size_t pos);
+
+size_t find_first_of(const StringPiece& self, const StringPiece& s, size_t pos);
+
+size_t find_first_not_of(const StringPiece& self,
const StringPiece& s,
size_t pos);
-BASE_EXPORT size_t rfind(const StringPiece& self,
- char c,
- size_t pos);
+size_t find_first_not_of(const StringPiece& self, char c, size_t pos);
-BASE_EXPORT size_t find_first_of(const StringPiece& self,
- const StringPiece& s,
- size_t pos);
+size_t find_last_of(const StringPiece& self, const StringPiece& s, size_t pos);
+size_t find_last_of(const StringPiece& self, char c, size_t pos);
-BASE_EXPORT size_t find_first_not_of(const StringPiece& self,
- const StringPiece& s,
- size_t pos);
-BASE_EXPORT size_t find_first_not_of(const StringPiece& self,
- char c,
- size_t pos);
+size_t find_last_not_of(const StringPiece& self,
+ const StringPiece& s,
+ size_t pos);
+size_t find_last_not_of(const StringPiece& self, char c, size_t pos);
-BASE_EXPORT size_t find_last_of(const StringPiece& self,
- const StringPiece& s,
- size_t pos);
-BASE_EXPORT size_t find_last_of(const StringPiece& self,
- char c,
- size_t pos);
-
-BASE_EXPORT size_t find_last_not_of(const StringPiece& self,
- const StringPiece& s,
- size_t pos);
-BASE_EXPORT size_t find_last_not_of(const StringPiece& self,
- char c,
- size_t pos);
-
-BASE_EXPORT StringPiece substr(const StringPiece& self,
- size_t pos,
- size_t n);
+StringPiece substr(const StringPiece& self, size_t pos, size_t n);
} // namespace internal
@@ -306,12 +283,12 @@
// MSVC doesn't like complex extern templates and DLLs.
#if !defined(COMPILER_MSVC)
-extern template class BASE_EXPORT BasicStringPiece<std::string>;
+extern template class BasicStringPiece<std::string>;
#endif
// StingPiece operators --------------------------------------------------------
-BASE_EXPORT bool operator==(const StringPiece& x, const StringPiece& y);
+bool operator==(const StringPiece& x, const StringPiece& y);
inline bool operator!=(const StringPiece& x, const StringPiece& y) {
return !(x == y);
@@ -335,8 +312,7 @@
return !(x < y);
}
-BASE_EXPORT std::ostream& operator<<(std::ostream& o,
- const StringPiece& piece);
+std::ostream& operator<<(std::ostream& o, const StringPiece& piece);
} // namespace base
diff --git a/libweave/external/base/strings/string_util.h b/libweave/external/base/strings/string_util.h
index b5b013a..4b41357 100644
--- a/libweave/external/base/strings/string_util.h
+++ b/libweave/external/base/strings/string_util.h
@@ -52,17 +52,17 @@
// Contains the set of characters representing whitespace in the corresponding
// encoding. Null-terminated. The ASCII versions are the whitespaces as defined
// by HTML5, and don't include control characters.
-BASE_EXPORT extern const char kWhitespaceASCII[];
+extern const char kWhitespaceASCII[];
// Replaces characters in |replace_chars| from anywhere in |input| with
// |replace_with|. Each character in |replace_chars| will be replaced with
// the |replace_with| string. Returns true if any characters were replaced.
// |replace_chars| must be null-terminated.
// NOTE: Safe to use the same variable for both |input| and |output|.
-BASE_EXPORT bool ReplaceChars(const std::string& input,
- const base::StringPiece& replace_chars,
- const std::string& replace_with,
- std::string* output);
+bool ReplaceChars(const std::string& input,
+ const base::StringPiece& replace_chars,
+ const std::string& replace_with,
+ std::string* output);
enum TrimPositions {
TRIM_NONE = 0,
@@ -76,15 +76,15 @@
//
// It is safe to use the same variable for both |input| and |output| (this is
// the normal usage to trim in-place).
-BASE_EXPORT bool TrimString(const std::string& input,
- base::StringPiece trim_chars,
- std::string* output);
+bool TrimString(const std::string& input,
+ base::StringPiece trim_chars,
+ std::string* output);
// StringPiece versions of the above. The returned pieces refer to the original
// buffer.
-BASE_EXPORT StringPiece TrimString(StringPiece input,
- const base::StringPiece& trim_chars,
- TrimPositions positions);
+StringPiece TrimString(StringPiece input,
+ const base::StringPiece& trim_chars,
+ TrimPositions positions);
// Trims any whitespace from either end of the input string. Returns where
// whitespace was found.
@@ -93,15 +93,15 @@
// This function is for ASCII strings and only looks for ASCII whitespace;
// Please choose the best one according to your usage.
// NOTE: Safe to use the same variable for both input and output.
-BASE_EXPORT TrimPositions TrimWhitespaceASCII(const std::string& input,
- TrimPositions positions,
- std::string* output);
+TrimPositions TrimWhitespaceASCII(const std::string& input,
+ TrimPositions positions,
+ std::string* output);
// Deprecated. This function is only for backward compatibility and calls
// TrimWhitespaceASCII().
-BASE_EXPORT TrimPositions TrimWhitespace(const std::string& input,
- TrimPositions positions,
- std::string* output);
+TrimPositions TrimWhitespace(const std::string& input,
+ TrimPositions positions,
+ std::string* output);
// Returns true if the specified string matches the criteria. How can a wide
// string be 8-bit or UTF8? It contains only characters that are < 256 (in the
@@ -117,8 +117,8 @@
//
// IsStringASCII assumes the input is likely all ASCII, and does not leave early
// if it is not the case.
-BASE_EXPORT bool IsStringUTF8(const StringPiece& str);
-BASE_EXPORT bool IsStringASCII(const StringPiece& str);
+bool IsStringUTF8(const StringPiece& str);
+bool IsStringASCII(const StringPiece& str);
} // namespace base
diff --git a/libweave/external/base/strings/stringprintf.h b/libweave/external/base/strings/stringprintf.h
index bb4b22d..06962b7 100644
--- a/libweave/external/base/strings/stringprintf.h
+++ b/libweave/external/base/strings/stringprintf.h
@@ -15,25 +15,24 @@
namespace base {
// Return a C++ string given printf-like input.
-BASE_EXPORT std::string StringPrintf(const char* format, ...)
+std::string StringPrintf(const char* format, ...)
PRINTF_FORMAT(1, 2) WARN_UNUSED_RESULT;
// Return a C++ string given vprintf-like input.
-BASE_EXPORT std::string StringPrintV(const char* format, va_list ap)
+std::string StringPrintV(const char* format, va_list ap)
PRINTF_FORMAT(1, 0) WARN_UNUSED_RESULT;
// Store result into a supplied string and return it.
-BASE_EXPORT const std::string& SStringPrintf(std::string* dst,
- const char* format, ...)
+const std::string& SStringPrintf(std::string* dst, const char* format, ...)
PRINTF_FORMAT(2, 3);
// Append result to a supplied string.
-BASE_EXPORT void StringAppendF(std::string* dst, const char* format, ...)
+void StringAppendF(std::string* dst, const char* format, ...)
PRINTF_FORMAT(2, 3);
// Lower-level routine that takes a va_list and appends to a specified
// string. All other routines are just convenience wrappers around it.
-BASE_EXPORT void StringAppendV(std::string* dst, const char* format, va_list ap)
+void StringAppendV(std::string* dst, const char* format, va_list ap)
PRINTF_FORMAT(2, 0);
} // namespace base
diff --git a/libweave/external/base/strings/utf_string_conversion_utils.h b/libweave/external/base/strings/utf_string_conversion_utils.h
index 57940dd..d932d9f 100644
--- a/libweave/external/base/strings/utf_string_conversion_utils.h
+++ b/libweave/external/base/strings/utf_string_conversion_utils.h
@@ -39,17 +39,17 @@
// (as in a for loop) will take the reader to the next character.
//
// Returns true on success. On false, |*code_point| will be invalid.
-BASE_EXPORT bool ReadUnicodeCharacter(const char* src,
- int32 src_len,
- int32* char_index,
- uint32* code_point_out);
+bool ReadUnicodeCharacter(const char* src,
+ int32 src_len,
+ int32* char_index,
+ uint32* code_point_out);
#if defined(WCHAR_T_IS_UTF32)
// Reads UTF-32 character. The usage is the same as the 8-bit version above.
-BASE_EXPORT bool ReadUnicodeCharacter(const wchar_t* src,
- int32 src_len,
- int32* char_index,
- uint32* code_point);
+bool ReadUnicodeCharacter(const wchar_t* src,
+ int32 src_len,
+ int32* char_index,
+ uint32* code_point);
#endif // defined(WCHAR_T_IS_UTF32)
// WriteUnicodeCharacter -------------------------------------------------------
@@ -57,8 +57,7 @@
// Appends a UTF-8 character to the given 8-bit string. Returns the number of
// bytes written.
// TODO(brettw) Bug 79631: This function should not be exposed.
-BASE_EXPORT size_t WriteUnicodeCharacter(uint32 code_point,
- std::string* output);
+size_t WriteUnicodeCharacter(uint32 code_point, std::string* output);
#if defined(WCHAR_T_IS_UTF32)
// Appends the given UTF-32 character to the given 32-bit string. Returns the
diff --git a/libweave/external/base/time/default_clock.h b/libweave/external/base/time/default_clock.h
index 0b8250e..140e6f4 100644
--- a/libweave/external/base/time/default_clock.h
+++ b/libweave/external/base/time/default_clock.h
@@ -12,7 +12,7 @@
namespace base {
// DefaultClock is a Clock implementation that uses Time::Now().
-class BASE_EXPORT DefaultClock : public Clock {
+class DefaultClock : public Clock {
public:
~DefaultClock() override;
diff --git a/libweave/external/base/time/time.h b/libweave/external/base/time/time.h
index 8764d6f..f421539 100644
--- a/libweave/external/base/time/time.h
+++ b/libweave/external/base/time/time.h
@@ -422,7 +422,7 @@
// Represents an exploded time that can be formatted nicely. This is kind of
// like the Win32 SYSTEMTIME structure or the Unix "struct tm" with a few
// additions and changes to prevent errors.
- struct BASE_EXPORT Exploded {
+ struct Exploded {
int year; // Four digit year "2007"
int month; // 1-based month (values 1 = January, etc.)
int day_of_week; // 0-based day of week (0 = Sunday, etc.)
@@ -639,7 +639,7 @@
// TimeTicks ------------------------------------------------------------------
// Represents monotonically non-decreasing clock time.
-class BASE_EXPORT TimeTicks : public time_internal::TimeBase<TimeTicks> {
+class TimeTicks : public time_internal::TimeBase<TimeTicks> {
public:
TimeTicks() : TimeBase(0) {
}
@@ -693,13 +693,13 @@
};
// For logging use only.
-BASE_EXPORT std::ostream& operator<<(std::ostream& os, TimeTicks time_ticks);
+std::ostream& operator<<(std::ostream& os, TimeTicks time_ticks);
// ThreadTicks ----------------------------------------------------------------
// Represents a clock, specific to a particular thread, than runs only while the
// thread is running.
-class BASE_EXPORT ThreadTicks : public time_internal::TimeBase<ThreadTicks> {
+class ThreadTicks : public time_internal::TimeBase<ThreadTicks> {
public:
ThreadTicks() : TimeBase(0) {
}
@@ -731,12 +731,12 @@
};
// For logging use only.
-BASE_EXPORT std::ostream& operator<<(std::ostream& os, ThreadTicks time_ticks);
+std::ostream& operator<<(std::ostream& os, ThreadTicks time_ticks);
// TraceTicks ----------------------------------------------------------------
// Represents high-resolution system trace clock time.
-class BASE_EXPORT TraceTicks : public time_internal::TimeBase<TraceTicks> {
+class TraceTicks : public time_internal::TimeBase<TraceTicks> {
public:
// We define this even without OS_CHROMEOS for seccomp sandbox testing.
#if defined(OS_LINUX)
@@ -777,7 +777,7 @@
};
// For logging use only.
-BASE_EXPORT std::ostream& operator<<(std::ostream& os, TraceTicks time_ticks);
+std::ostream& operator<<(std::ostream& os, TraceTicks time_ticks);
} // namespace base
diff --git a/libweave/external/base/values.h b/libweave/external/base/values.h
index b95af6d..7ae52a9 100644
--- a/libweave/external/base/values.h
+++ b/libweave/external/base/values.h
@@ -163,7 +163,7 @@
std::string value_;
};
-class BASE_EXPORT BinaryValue: public Value {
+class BASE_EXPORT BinaryValue : public Value {
public:
// Creates a BinaryValue with a null buffer and size of 0.
BinaryValue();