mirror of
https://github.com/kidfromjupiter/nearby.git
synced 2026-09-16 15:36:12 -04:00
Changes to make build work in Chromium.
PiperOrigin-RevId: 601861725
This commit is contained in:
committed by
Copybara-Service
parent
aaa1bea130
commit
05914245e8
@@ -27,10 +27,19 @@ void TruncateUtf8ToByteSize(const std::string& input, size_t byte_size,
|
||||
std::string* output) {}
|
||||
|
||||
} // namespace nearby::utils
|
||||
|
||||
#elif defined(NEARBY_CHROMIUM)
|
||||
// Forward to chromium implementations.
|
||||
#include "base/strings/string_util.h"
|
||||
namespace nearby::utils {
|
||||
bool IsStringUtf8(std::string_view str) {
|
||||
return base::IsStringUTF8(str);
|
||||
}
|
||||
|
||||
void TruncateUtf8ToByteSize(const std::string& input, size_t byte_size,
|
||||
std::string* output) {
|
||||
base::TruncateUTF8ToByteSize(input, byte_size, output);
|
||||
}
|
||||
} // namespace nearby::utils
|
||||
#else // defined(GITHUB_BUILD)
|
||||
#include "sharing/internal/base/strings/utf_string_conversions.h" // IWYU pragma: export
|
||||
#endif // defined(GITHUB_BUILD)
|
||||
|
||||
@@ -17,7 +17,9 @@
|
||||
|
||||
#if defined(NEARBY_CHROMIUM)
|
||||
// Chromium does not use absl log. Forward to Chromium native log macros.
|
||||
// TODO(ftsui): include chromium logging header.
|
||||
#include "base/check.h"
|
||||
#include "base/check_op.h"
|
||||
#include "glog/logging.h"
|
||||
#else // defined(NEARBY_CHROMIUM)
|
||||
#include "absl/log/check.h"
|
||||
#include "absl/log/log.h"
|
||||
|
||||
Reference in New Issue
Block a user