Eliminate WebRTC Subtree mirror.
In the past, third_party/webrtc in Chromium has been pointing at the webrtc/ subdirectory of our main repo. This has to do with legacy since libjingle (previously third_party/libjingle) was moved into the talk/ folder of WebRTC. Now that this folder no longer exists, nor third_party/libjingle, we want to get rid of the redundant webrtc/ dir and move everything up one level. This makes it possible to also get rid of the git "subtree" mirror in DEPS, and use the full WebRTC repo instead. This is blocking us from migrating from Rietveld -> Gerrit as well. See http://crbug.com/611808 for more info. Another great benefit with that is that everyone will be able to create valid WebRTC CLs straight out of third_party/webrtc in a Chromium checkout. Bug: 611808 Change-Id: I196834ea33a8414053001a459131af3521c01aaa Reviewed-on: https://chromium-review.googlesource.com/663546 Commit-Queue: Henrik Kjellander <kjellander@chromium.org> Reviewed-by: Tommi <tommi@chromium.org> Reviewed-by: Sergey Ulanov <sergeyu@chromium.org> Cr-Commit-Position: refs/heads/master@{#502207}
This commit is contained in:

committed by
Commit Bot

parent
f0b2929b93
commit
061fc99c54
2
DEPS
2
DEPS
@ -243,7 +243,7 @@ deps = {
|
||||
Var('chromium_git') + '/native_client/src/third_party/scons-2.0.1.git' + '@' + '1c1550e17fc26355d08627fbdec13d8291227067',
|
||||
|
||||
'src/third_party/webrtc':
|
||||
Var('webrtc_git') + '/src/webrtc.git' + '@' + '72d9f8fdba12e86a9859d877a0b7101c65b9e8d8', # commit position 19832
|
||||
Var('webrtc_git') + '/src.git' + '@' + '92ea95e34af5966555903026f45164afbd7e2088', # commit position 19846
|
||||
|
||||
'src/third_party/openmax_dl':
|
||||
Var('webrtc_git') + '/deps/third_party/openmax.git' + '@' + Var('openmax_dl_revision'),
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
#include "base/time/time.h"
|
||||
#include "content/public/renderer/webrtc_log_message_delegate.h"
|
||||
#include "third_party/webrtc_overrides/webrtc/rtc_base/logging.h"
|
||||
#include "third_party/webrtc_overrides/rtc_base/logging.h"
|
||||
|
||||
namespace content {
|
||||
|
||||
|
@ -18,7 +18,7 @@
|
||||
#define LOGGING_INSIDE_WEBRTC
|
||||
|
||||
#include "build/build_config.h"
|
||||
#include "third_party/webrtc_overrides/webrtc/rtc_base/logging.h"
|
||||
#include "third_party/webrtc_overrides/rtc_base/logging.h"
|
||||
|
||||
#if defined(OS_WIN)
|
||||
static const wchar_t* const log_file_name = L"libjingle_logging.log";
|
||||
|
@ -1,5 +1,7 @@
|
||||
include_rules = [
|
||||
"+webrtc/rtc_base",
|
||||
"+third_party/webrtc/rtc_base",
|
||||
"+third_party/webrtc/p2p",
|
||||
"+third_party/webrtc_overrides",
|
||||
"+third_party/libjingle_xmpp/xmpp",
|
||||
"+third_party/libjingle_xmpp/xmllite",
|
||||
]
|
||||
|
@ -10,7 +10,7 @@
|
||||
#include "base/macros.h"
|
||||
#include "third_party/libjingle_xmpp/xmpp/constants.h"
|
||||
#include "third_party/libjingle_xmpp/xmpp/saslcookiemechanism.h"
|
||||
#include "webrtc/rtc_base/socketaddress.h"
|
||||
#include "third_party/webrtc/rtc_base/socketaddress.h"
|
||||
|
||||
namespace notifier {
|
||||
|
||||
|
@ -12,7 +12,7 @@
|
||||
#include "jingle/glue/task_pump.h"
|
||||
#include "testing/gmock/include/gmock/gmock.h"
|
||||
#include "testing/gtest/include/gtest/gtest.h"
|
||||
#include "webrtc/rtc_base/sigslot.h"
|
||||
#include "third_party/webrtc/rtc_base/sigslot.h"
|
||||
|
||||
namespace notifier {
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
#include "base/sequence_checker.h"
|
||||
#include "net/url_request/url_request_context_getter.h"
|
||||
#include "third_party/libjingle_xmpp/xmpp/xmppengine.h"
|
||||
#include "webrtc/rtc_base/sigslot.h"
|
||||
#include "third_party/webrtc/rtc_base/sigslot.h"
|
||||
|
||||
namespace buzz {
|
||||
class PreXmppAuth;
|
||||
|
@ -12,7 +12,7 @@
|
||||
// the definition of ProtocolType. Don't use any functions from
|
||||
// port.h, since it won't link.
|
||||
#include "third_party/libjingle_xmpp/xmpp/xmppclientsettings.h"
|
||||
#include "webrtc/p2p/base/port.h"
|
||||
#include "third_party/webrtc/p2p/base/port.h"
|
||||
|
||||
namespace notifier {
|
||||
|
||||
|
@ -11,7 +11,7 @@
|
||||
#include <vector>
|
||||
|
||||
#include "jingle/notifier/base/server_information.h"
|
||||
#include "webrtc/rtc_base/socketaddress.h"
|
||||
#include "third_party/webrtc/rtc_base/socketaddress.h"
|
||||
|
||||
namespace buzz {
|
||||
class XmppClientSettings;
|
||||
|
@ -17,9 +17,9 @@
|
||||
#include "third_party/libjingle_xmpp/xmpp/xmppclient.h"
|
||||
#include "third_party/libjingle_xmpp/xmpp/xmppclientsettings.h"
|
||||
#include "third_party/libjingle_xmpp/xmpp/xmppengine.h"
|
||||
#include "webrtc/rtc_base/firewallsocketserver.h"
|
||||
#include "webrtc/rtc_base/logging.h"
|
||||
#include "webrtc/rtc_base/physicalsocketserver.h"
|
||||
#include "third_party/webrtc/rtc_base/firewallsocketserver.h"
|
||||
#include "third_party/webrtc/rtc_base/physicalsocketserver.h"
|
||||
#include "third_party/webrtc_overrides/rtc_base/logging.h"
|
||||
|
||||
namespace notifier {
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
#include "base/logging.h"
|
||||
#include "jingle/notifier/base/server_information.h"
|
||||
#include "net/cert/cert_verifier.h"
|
||||
#include "webrtc/rtc_base/socketaddress.h"
|
||||
#include "third_party/webrtc/rtc_base/socketaddress.h"
|
||||
|
||||
namespace notifier {
|
||||
|
||||
|
2
third_party/libjingle_xmpp/BUILD.gn
vendored
2
third_party/libjingle_xmpp/BUILD.gn
vendored
@ -141,7 +141,7 @@ rtc_test("libjingle_xmpp_unittests") {
|
||||
"//base/test:test_support",
|
||||
|
||||
# TODO(kjellander): Refactor/remove this dependency. It is needed by
|
||||
# third_party/webrtc_overrides/webrtc/rtc_base/win32socketinit.cc.
|
||||
# third_party/webrtc_overrides/rtc_base/win32socketinit.cc.
|
||||
"//net",
|
||||
"//testing/gtest",
|
||||
]
|
||||
|
@ -27,7 +27,7 @@
|
||||
#include "third_party/webrtc/rtc_base/gunit.h"
|
||||
#include "third_party/webrtc/rtc_base/thread.h"
|
||||
#include "third_party/webrtc/rtc_base/timeutils.h"
|
||||
#include "third_party/webrtc_overrides/webrtc/rtc_base/logging.h"
|
||||
#include "third_party/webrtc_overrides/rtc_base/logging.h"
|
||||
|
||||
namespace rtc {
|
||||
|
||||
|
2
third_party/libjingle_xmpp/xmpp/jid.cc
vendored
2
third_party/libjingle_xmpp/xmpp/jid.cc
vendored
@ -17,7 +17,7 @@
|
||||
|
||||
#include "third_party/libjingle_xmpp/xmpp/constants.h"
|
||||
#include "third_party/webrtc/rtc_base/checks.h"
|
||||
#include "third_party/webrtc_overrides/webrtc/rtc_base/logging.h"
|
||||
#include "third_party/webrtc_overrides/rtc_base/logging.h"
|
||||
|
||||
namespace buzz {
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
#include "third_party/libjingle_xmpp/xmpp/saslplainmechanism.h"
|
||||
#include "third_party/webrtc/rtc_base/sigslot.h"
|
||||
#include "third_party/webrtc/rtc_base/stringutils.h"
|
||||
#include "third_party/webrtc_overrides/webrtc/rtc_base/logging.h"
|
||||
#include "third_party/webrtc_overrides/rtc_base/logging.h"
|
||||
#include "xmpptask.h"
|
||||
|
||||
namespace buzz {
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
#include "third_party/libjingle_xmpp/xmpp/jid.h"
|
||||
#include "third_party/libjingle_xmpp/xmpp/xmppengine.h"
|
||||
#include "third_party/webrtc_overrides/webrtc/rtc_base/logging.h"
|
||||
#include "third_party/webrtc_overrides/rtc_base/logging.h"
|
||||
|
||||
namespace buzz {
|
||||
|
||||
|
4
third_party/webrtc_overrides/BUILD.gn
vendored
4
third_party/webrtc_overrides/BUILD.gn
vendored
@ -12,9 +12,9 @@ config("jingle_unexported_configs") {
|
||||
include_dirs = [
|
||||
"../../third_party/webrtc_overrides",
|
||||
"../../testing/gtest/include",
|
||||
"../../third_party",
|
||||
"../../third_party/libyuv/include",
|
||||
"../../third_party/usrsctp/usrsctplib",
|
||||
"../../third_party/webrtc",
|
||||
]
|
||||
}
|
||||
|
||||
@ -22,7 +22,7 @@ config("jingle_public_configs") {
|
||||
include_dirs = [
|
||||
"../../third_party/webrtc_overrides",
|
||||
"../../testing/gtest/include",
|
||||
"../../third_party",
|
||||
"../../third_party/webrtc",
|
||||
]
|
||||
}
|
||||
|
||||
|
2
third_party/webrtc_overrides/init_webrtc.cc
vendored
2
third_party/webrtc_overrides/init_webrtc.cc
vendored
@ -14,7 +14,7 @@
|
||||
#include "base/trace_event/trace_event.h"
|
||||
#include "third_party/webrtc/rtc_base/event_tracer.h"
|
||||
#include "third_party/webrtc/system_wrappers/include/cpu_info.h"
|
||||
#include "third_party/webrtc_overrides/webrtc/rtc_base/logging.h"
|
||||
#include "third_party/webrtc_overrides/rtc_base/logging.h"
|
||||
|
||||
const unsigned char* GetCategoryGroupEnabled(const char* category_group) {
|
||||
return TRACE_EVENT_API_GET_CATEGORY_GROUP_ENABLED(category_group);
|
||||
|
@ -32,8 +32,10 @@ struct ConstantLabel {
|
||||
int value;
|
||||
const char* label;
|
||||
};
|
||||
#define KLABEL(x) { x, #x }
|
||||
#define LASTLABEL { 0, 0 }
|
||||
#define KLABEL(x) \
|
||||
{ x, #x }
|
||||
#define LASTLABEL \
|
||||
{ 0, 0 }
|
||||
|
||||
const char* FindLabel(int value, const ConstantLabel entries[]);
|
||||
std::string ErrorName(int err, const ConstantLabel* err_table);
|
||||
@ -57,14 +59,16 @@ std::string ErrorName(int err, const ConstantLabel* err_table);
|
||||
// since the command line flag must be set using numerical values.
|
||||
// TODO(tommi): To keep things simple, we should just use the same values for
|
||||
// these constants as Chrome does.
|
||||
enum LoggingSeverity { LS_ERROR = 1,
|
||||
LS_WARNING = 2,
|
||||
LS_INFO = 3,
|
||||
LS_VERBOSE = 4,
|
||||
LS_SENSITIVE = 5,
|
||||
INFO = LS_INFO,
|
||||
WARNING = LS_WARNING,
|
||||
LERROR = LS_ERROR };
|
||||
enum LoggingSeverity {
|
||||
LS_ERROR = 1,
|
||||
LS_WARNING = 2,
|
||||
LS_INFO = 3,
|
||||
LS_VERBOSE = 4,
|
||||
LS_SENSITIVE = 5,
|
||||
INFO = LS_INFO,
|
||||
WARNING = LS_WARNING,
|
||||
LERROR = LS_ERROR
|
||||
};
|
||||
|
||||
// LogErrorContext assists in interpreting the meaning of an error value.
|
||||
enum LogErrorContext {
|
||||
@ -83,10 +87,17 @@ enum LogErrorContext {
|
||||
// stream" in Chrome) and to Chrome's logging stream.
|
||||
class DiagnosticLogMessage {
|
||||
public:
|
||||
DiagnosticLogMessage(const char* file, int line, LoggingSeverity severity,
|
||||
LogErrorContext err_ctx, int err);
|
||||
DiagnosticLogMessage(const char* file, int line, LoggingSeverity severity,
|
||||
LogErrorContext err_ctx, int err, const char* module);
|
||||
DiagnosticLogMessage(const char* file,
|
||||
int line,
|
||||
LoggingSeverity severity,
|
||||
LogErrorContext err_ctx,
|
||||
int err);
|
||||
DiagnosticLogMessage(const char* file,
|
||||
int line,
|
||||
LoggingSeverity severity,
|
||||
LogErrorContext err_ctx,
|
||||
int err,
|
||||
const char* module);
|
||||
~DiagnosticLogMessage();
|
||||
|
||||
void CreateTimestamp();
|
||||
@ -110,10 +121,10 @@ class DiagnosticLogMessage {
|
||||
// is not used" and "statement has no effect".
|
||||
class LogMessageVoidify {
|
||||
public:
|
||||
LogMessageVoidify() { }
|
||||
LogMessageVoidify() {}
|
||||
// This has to be an operator with a precedence lower than << but
|
||||
// higher than ?:
|
||||
void operator&(std::ostream&) { }
|
||||
void operator&(std::ostream&) {}
|
||||
};
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
@ -123,9 +134,7 @@ class LogMessageVoidify {
|
||||
class LogMultilineState {
|
||||
public:
|
||||
size_t unprintable_count_[2];
|
||||
LogMultilineState() {
|
||||
unprintable_count_[0] = unprintable_count_[1] = 0;
|
||||
}
|
||||
LogMultilineState() { unprintable_count_[0] = unprintable_count_[1] = 0; }
|
||||
};
|
||||
|
||||
class LogMessage {
|
||||
@ -135,8 +144,12 @@ class LogMessage {
|
||||
|
||||
// When possible, pass optional state variable to track various data across
|
||||
// multiple calls to LogMultiline. Otherwise, pass NULL.
|
||||
void LogMultiline(LoggingSeverity level, const char* label, bool input,
|
||||
const void* data, size_t len, bool hex_mode,
|
||||
void LogMultiline(LoggingSeverity level,
|
||||
const char* label,
|
||||
bool input,
|
||||
const void* data,
|
||||
size_t len,
|
||||
bool hex_mode,
|
||||
LogMultilineState* state);
|
||||
|
||||
// TODO(grunell): Change name to InitDiagnosticLoggingDelegate or
|
56
third_party/webrtc_overrides/webrtc/rtc_base/logging.cc → third_party/webrtc_overrides/rtc_base/logging.cc
vendored
56
third_party/webrtc_overrides/webrtc/rtc_base/logging.cc → third_party/webrtc_overrides/rtc_base/logging.cc
vendored
@ -4,8 +4,8 @@
|
||||
|
||||
// NOTE:
|
||||
// Since this file includes Chromium headers, it must not include
|
||||
// third_party/webrtc/rtc_base/logging.h since it defines some of the same macros as
|
||||
// Chromium does and we'll run into conflicts.
|
||||
// third_party/webrtc/rtc_base/logging.h since it defines some of the same
|
||||
// macros as Chromium does and we'll run into conflicts.
|
||||
|
||||
#if defined(WEBRTC_MAC) && !defined(WEBRTC_IOS)
|
||||
#include <CoreServices/CoreServices.h>
|
||||
@ -22,8 +22,8 @@
|
||||
#include "third_party/webrtc/rtc_base/stringutils.h"
|
||||
|
||||
// This needs to be included after base/logging.h.
|
||||
#include "third_party/webrtc_overrides/webrtc/rtc_base/diagnostic_logging.h"
|
||||
#include "third_party/webrtc_overrides/webrtc/rtc_base/logging.h"
|
||||
#include "third_party/webrtc_overrides/rtc_base/diagnostic_logging.h"
|
||||
#include "third_party/webrtc_overrides/rtc_base/logging.h"
|
||||
|
||||
#if defined(WEBRTC_MAC)
|
||||
#include "base/mac/mac_logging.h"
|
||||
@ -45,7 +45,7 @@
|
||||
// DIAGNOSTIC_LOG.
|
||||
#define LOG_LAZY_STREAM_DIRECT(file_name, line_number, sev) \
|
||||
LAZY_STREAM(logging::LogMessage(file_name, line_number, sev).stream(), \
|
||||
WEBRTC_ENABLE_LOGGING)
|
||||
WEBRTC_ENABLE_LOGGING)
|
||||
|
||||
namespace rtc {
|
||||
|
||||
@ -64,7 +64,8 @@ base::subtle::Atomic32 g_init_logging_delegate_thread_id = 0;
|
||||
|
||||
const char* FindLabel(int value, const ConstantLabel entries[]) {
|
||||
for (int i = 0; entries[i].label; ++i) {
|
||||
if (value == entries[i].value) return entries[i].label;
|
||||
if (value == entries[i].value)
|
||||
return entries[i].label;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@ -74,7 +75,7 @@ std::string ErrorName(int err, const ConstantLabel* err_table) {
|
||||
return "No error";
|
||||
|
||||
if (err_table != 0) {
|
||||
if (const char * value = FindLabel(err, err_table))
|
||||
if (const char* value = FindLabel(err, err_table))
|
||||
return value;
|
||||
}
|
||||
|
||||
@ -200,7 +201,8 @@ DiagnosticLogMessage::~DiagnosticLogMessage() {
|
||||
const std::string& str = print_stream_.str();
|
||||
if (log_to_chrome_) {
|
||||
LOG_LAZY_STREAM_DIRECT(file_name_, line_,
|
||||
rtc::WebRtcSevToChromeSev(severity_)) << str;
|
||||
rtc::WebRtcSevToChromeSev(severity_))
|
||||
<< str;
|
||||
}
|
||||
|
||||
if (g_logging_delegate_function && severity_ <= LS_INFO) {
|
||||
@ -215,8 +217,12 @@ void LogMessage::LogToDebug(int min_sev) {
|
||||
}
|
||||
|
||||
// Note: this function is a copy from the overriden libjingle implementation.
|
||||
void LogMultiline(LoggingSeverity level, const char* label, bool input,
|
||||
const void* data, size_t len, bool hex_mode,
|
||||
void LogMultiline(LoggingSeverity level,
|
||||
const char* label,
|
||||
bool input,
|
||||
const void* data,
|
||||
size_t len,
|
||||
bool hex_mode,
|
||||
LogMultilineState* state) {
|
||||
// TODO(grunell): This will not do the expected verbosity level checking. We
|
||||
// need a macro for the multiline logging.
|
||||
@ -224,7 +230,7 @@ void LogMultiline(LoggingSeverity level, const char* label, bool input,
|
||||
if (!LOG_CHECK_LEVEL_V(level))
|
||||
return;
|
||||
|
||||
const char * direction = (input ? " << " : " >> ");
|
||||
const char* direction = (input ? " << " : " >> ");
|
||||
|
||||
// NULL data means to flush our count of unprintable characters.
|
||||
if (!data) {
|
||||
@ -250,13 +256,12 @@ void LogMultiline(LoggingSeverity level, const char* label, bool input,
|
||||
for (size_t i = 0; i < line_len; ++i) {
|
||||
unsigned char ch = udata[i];
|
||||
asc_line[i] = isprint(ch) ? ch : '.';
|
||||
hex_line[i*2 + i/4] = hex_encode(ch >> 4);
|
||||
hex_line[i*2 + i/4 + 1] = hex_encode(ch & 0xf);
|
||||
hex_line[i * 2 + i / 4] = hex_encode(ch >> 4);
|
||||
hex_line[i * 2 + i / 4 + 1] = hex_encode(ch & 0xf);
|
||||
}
|
||||
asc_line[sizeof(asc_line)-1] = 0;
|
||||
hex_line[sizeof(hex_line)-1] = 0;
|
||||
LOG_V(level) << label << direction
|
||||
<< asc_line << " " << hex_line << " ";
|
||||
asc_line[sizeof(asc_line) - 1] = 0;
|
||||
hex_line[sizeof(hex_line) - 1] = 0;
|
||||
LOG_V(level) << label << direction << asc_line << " " << hex_line << " ";
|
||||
udata += line_len;
|
||||
len -= line_len;
|
||||
}
|
||||
@ -268,9 +273,8 @@ void LogMultiline(LoggingSeverity level, const char* label, bool input,
|
||||
const unsigned char* end = udata + len;
|
||||
while (udata < end) {
|
||||
const unsigned char* line = udata;
|
||||
const unsigned char* end_of_line = strchrn<unsigned char>(udata,
|
||||
end - udata,
|
||||
'\n');
|
||||
const unsigned char* end_of_line =
|
||||
strchrn<unsigned char>(udata, end - udata, '\n');
|
||||
if (!end_of_line) {
|
||||
udata = end_of_line = end;
|
||||
} else {
|
||||
@ -310,11 +314,11 @@ void LogMultiline(LoggingSeverity level, const char* label, bool input,
|
||||
// characters.
|
||||
if (consecutive_unprintable) {
|
||||
LOG_V(level) << label << direction << "## " << consecutive_unprintable
|
||||
<< " consecutive unprintable ##";
|
||||
<< " consecutive unprintable ##";
|
||||
consecutive_unprintable = 0;
|
||||
}
|
||||
// Strip off trailing whitespace.
|
||||
while ((end_of_line > line) && isspace(*(end_of_line-1))) {
|
||||
while ((end_of_line > line) && isspace(*(end_of_line - 1))) {
|
||||
--end_of_line;
|
||||
}
|
||||
// Filter out any private data
|
||||
@ -339,7 +343,8 @@ void InitDiagnosticLoggingDelegateFunction(
|
||||
void (*delegate)(const std::string&)) {
|
||||
#ifndef NDEBUG
|
||||
// Ensure that this function is always called from the same thread.
|
||||
base::subtle::NoBarrier_CompareAndSwap(&g_init_logging_delegate_thread_id, 0,
|
||||
base::subtle::NoBarrier_CompareAndSwap(
|
||||
&g_init_logging_delegate_thread_id, 0,
|
||||
static_cast<base::subtle::Atomic32>(base::PlatformThread::CurrentId()));
|
||||
DCHECK_EQ(
|
||||
g_init_logging_delegate_thread_id,
|
||||
@ -365,8 +370,9 @@ void SetExtraLoggingInit(
|
||||
g_extra_logging_init_function = function;
|
||||
}
|
||||
|
||||
bool CheckVlogIsOnHelper(
|
||||
rtc::LoggingSeverity severity, const char* file, size_t N) {
|
||||
bool CheckVlogIsOnHelper(rtc::LoggingSeverity severity,
|
||||
const char* file,
|
||||
size_t N) {
|
||||
return rtc::WebRtcVerbosityLevel(severity) <=
|
||||
::logging::GetVlogLevelHelper(file, N);
|
||||
}
|
16
third_party/webrtc_overrides/webrtc/rtc_base/logging.h → third_party/webrtc_overrides/rtc_base/logging.h
vendored
16
third_party/webrtc_overrides/webrtc/rtc_base/logging.h → third_party/webrtc_overrides/rtc_base/logging.h
vendored
@ -4,8 +4,8 @@
|
||||
|
||||
// This file overrides the logging macros in WebRTC (webrtc/rtc_base/logging.h).
|
||||
// Instead of using WebRTC's logging implementation, the WebRTC macros are
|
||||
// mapped to DIAGNOSTIC_LOGING. In it's implementation (DiagnosticLogMessage in
|
||||
// third_party/webrtc_overrides/webrtc/rtc_base/logging.h), the corresponding
|
||||
// mapped to DIAGNOSTIC_LOGING. In its implementation (DiagnosticLogMessage in
|
||||
// third_party/webrtc_overrides/rtc_base/logging.h), the corresponding
|
||||
// base/logging.h macros (e.g. Chromium's VLOG) are used.
|
||||
// If this file is included outside of WebRTC/libjingle it should be included
|
||||
// after base/logging.h (if any) or compiler error or unexpected behavior may
|
||||
@ -24,7 +24,7 @@
|
||||
#ifndef THIRD_PARTY_WEBRTC_OVERRIDES_WEBRTC_RTC_BASE_LOGGING_H_
|
||||
#define THIRD_PARTY_WEBRTC_OVERRIDES_WEBRTC_RTC_BASE_LOGGING_H_
|
||||
|
||||
#include "third_party/webrtc_overrides/webrtc/rtc_base/diagnostic_logging.h"
|
||||
#include "third_party/webrtc_overrides/rtc_base/diagnostic_logging.h"
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// WebRTC macros which in DiagnosticLogMessage are mapped over to
|
||||
@ -38,8 +38,7 @@
|
||||
namespace rtc {
|
||||
|
||||
// Note that |N| is the size *with* the null terminator.
|
||||
bool CheckVlogIsOnHelper(LoggingSeverity severity,
|
||||
const char* file, size_t N);
|
||||
bool CheckVlogIsOnHelper(LoggingSeverity severity, const char* file, size_t N);
|
||||
|
||||
template <size_t N>
|
||||
bool CheckVlogIsOn(LoggingSeverity severity, const char (&file)[N]) {
|
||||
@ -48,9 +47,10 @@ bool CheckVlogIsOn(LoggingSeverity severity, const char (&file)[N]) {
|
||||
|
||||
} // namespace rtc
|
||||
|
||||
#define DIAGNOSTIC_LOG(sev, ctx, err, ...) \
|
||||
rtc::DiagnosticLogMessage( \
|
||||
__FILE__, __LINE__, sev, rtc::ERRCTX_ ## ctx, err, ##__VA_ARGS__).stream()
|
||||
#define DIAGNOSTIC_LOG(sev, ctx, err, ...) \
|
||||
rtc::DiagnosticLogMessage(__FILE__, __LINE__, sev, rtc::ERRCTX_##ctx, err, \
|
||||
##__VA_ARGS__) \
|
||||
.stream()
|
||||
|
||||
#define LOG_CHECK_LEVEL(sev) CheckVlogIsOn(rtc::sev, __FILE__)
|
||||
#define LOG_CHECK_LEVEL_V(sev) CheckVlogIsOn(sev, __FILE__)
|
Reference in New Issue
Block a user