mirror of
https://github.com/kidfromjupiter/nearby.git
synced 2026-09-14 14:46:12 -04:00
Internal refactor to replace unsupported dependencies.
PiperOrigin-RevId: 427474223
This commit is contained in:
committed by
Copybara-Service
parent
7dbe976c51
commit
efdd4c0f6a
+1
-1
@@ -69,13 +69,13 @@ cc_library(
|
||||
"//internal/platform/implementation/ios:__subpackages__",
|
||||
],
|
||||
deps = [
|
||||
"//base",
|
||||
"//internal/platform:base",
|
||||
"//internal/platform:types",
|
||||
"//internal/platform:util",
|
||||
"//proto:connections_enums_cc_proto",
|
||||
"@com_google_absl//absl/strings",
|
||||
"@com_google_absl//absl/types:variant",
|
||||
"@com_google_glog//:glog",
|
||||
],
|
||||
)
|
||||
|
||||
|
||||
@@ -92,7 +92,6 @@ cc_library(
|
||||
deps = [
|
||||
":message_lite",
|
||||
":ukey2",
|
||||
"//base",
|
||||
"//connections:core_types",
|
||||
"//connections/implementation/mediums",
|
||||
"//connections/implementation/mediums:utils",
|
||||
|
||||
@@ -14,6 +14,8 @@
|
||||
|
||||
#include "connections/payload.h"
|
||||
|
||||
#include "glog/logging.h"
|
||||
|
||||
namespace location {
|
||||
namespace nearby {
|
||||
namespace connections {
|
||||
|
||||
@@ -35,17 +35,14 @@ cc_library(
|
||||
defines = ["NO_WEBRTC"],
|
||||
visibility = ["//visibility:private"],
|
||||
deps = [
|
||||
"//base",
|
||||
"//base:stringprintf",
|
||||
"//internal/platform:base",
|
||||
"//internal/platform:util",
|
||||
"//internal/platform/implementation:platform",
|
||||
"//internal/platform/implementation:types",
|
||||
"//internal/platform/implementation/shared:count_down_latch",
|
||||
"//internal/platform/implementation/shared:posix_mutex",
|
||||
"@com_google_absl//absl/base:core_headers",
|
||||
"@com_google_absl//absl/synchronization",
|
||||
"@com_google_absl//absl/time",
|
||||
"@com_google_glog//:glog",
|
||||
"@com_google_nisaba//nisaba/port:thread_pool",
|
||||
],
|
||||
)
|
||||
|
||||
@@ -15,13 +15,25 @@
|
||||
#include "internal/platform/implementation/g3/log_message.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#include "base/stringprintf.h"
|
||||
#include <cstdio>
|
||||
|
||||
namespace location {
|
||||
namespace nearby {
|
||||
namespace g3 {
|
||||
|
||||
namespace {
|
||||
|
||||
// This is a partial copy of base::StringAppendV for OSS compilation.
|
||||
void NearbyStringAppendV(std::string* dst, const char* format, va_list ap) {
|
||||
// Fixed size buffer 1024 should be big enough.
|
||||
static const int kSpaceLength = 1024;
|
||||
char space[kSpaceLength];
|
||||
int result = vsnprintf(space, kSpaceLength, format, ap);
|
||||
va_end(ap);
|
||||
dst->append(space, result);
|
||||
}
|
||||
} // namespace
|
||||
|
||||
api::LogMessage::Severity g_min_log_severity = api::LogMessage::Severity::kInfo;
|
||||
|
||||
inline absl::LogSeverity ConvertSeverity(api::LogMessage::Severity severity) {
|
||||
@@ -50,7 +62,7 @@ void LogMessage::Print(const char* format, ...) {
|
||||
va_list ap;
|
||||
va_start(ap, format);
|
||||
std::string result;
|
||||
StringAppendV(&result, format, ap);
|
||||
NearbyStringAppendV(&result, format, ap);
|
||||
log_streamer_.stream() << result;
|
||||
va_end(ap);
|
||||
}
|
||||
|
||||
@@ -15,7 +15,8 @@
|
||||
#include "internal/platform/implementation/windows/log_message.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
// TODO(b/217211016): may need get rid of this dependency since there is
|
||||
// no "base" in OSS.
|
||||
#include "base/stringprintf.h"
|
||||
|
||||
namespace location {
|
||||
|
||||
Reference in New Issue
Block a user