summaryrefslogtreecommitdiffstats
path: root/third_party
diff options
context:
space:
mode:
authornick@chromium.org <nick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-26 01:27:23 +0000
committernick@chromium.org <nick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-26 01:27:23 +0000
commit8e8503072f1bf91c59b15b54274ec907505b0376 (patch)
tree785724f75d438826a64b71c3994a06dedd992ffe /third_party
parent08a3ef61e987b2347bdd1bacc6252aa2a323b5ad (diff)
downloadchromium_src-8e8503072f1bf91c59b15b54274ec907505b0376.zip
chromium_src-8e8503072f1bf91c59b15b54274ec907505b0376.tar.gz
chromium_src-8e8503072f1bf91c59b15b54274ec907505b0376.tar.bz2
Use base/logging from chrome/browser/sync. Add a macro to libjingle's
logging.h to suppress the definition of LOG() and friends unless explicitly requested. Fix gyp paths to overrides files. Review URL: http://codereview.chromium.org/225001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27316 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'third_party')
-rw-r--r--third_party/libjingle/README.chromium3
-rw-r--r--third_party/libjingle/files/talk/base/logging.h5
-rw-r--r--third_party/libjingle/libjingle.gyp7
3 files changed, 12 insertions, 3 deletions
diff --git a/third_party/libjingle/README.chromium b/third_party/libjingle/README.chromium
index 80223dd..3259d69 100644
--- a/third_party/libjingle/README.chromium
+++ b/third_party/libjingle/README.chromium
@@ -35,3 +35,6 @@ Local Modifications:
* Renamed "talk/xmpp/constants.*" to "talk/xmpp/xmppconstants.*" to get
around an IncrediBuild link error. Apparently IncrediBuild can become
confused when two compilation units have the same filename.
+ * Added a #define guard to libjingle's base/logging.h to prevent the
+ LOG() macros from being redefined when included by users of the
+ library. The #define guard is SAFE_TO_DEFINE_TALK_BASE_LOGGING_MACROS.
diff --git a/third_party/libjingle/files/talk/base/logging.h b/third_party/libjingle/files/talk/base/logging.h
index a4686b7..36d9d0c 100644
--- a/third_party/libjingle/files/talk/base/logging.h
+++ b/third_party/libjingle/files/talk/base/logging.h
@@ -65,9 +65,12 @@ class StreamInterface;
// << ErrorName(err, LIBRARY_ERRORS);
struct ConstantLabel { int value; const char * label; };
+
+#if defined(SAFE_TO_DEFINE_TALK_BASE_LOGGING_MACROS)
#define KLABEL(x) { x, #x }
#define TLABEL(x,y) { x, y }
#define LASTLABEL { 0, 0 }
+#endif // defined(SAFE_TO_DEFINE_TALK_BASE_LOGGING_MACROS)
const char * FindLabel(int value, const ConstantLabel entries[]);
std::string ErrorName(int err, const ConstantLabel* err_table);
@@ -193,6 +196,7 @@ void LogMultiline(LoggingSeverity level, const char* label, bool input,
//////////////////////////////////////////////////////////////////////
// If LOGGING is not explicitly defined, default to enabled in debug mode
+#if defined(SAFE_TO_DEFINE_TALK_BASE_LOGGING_MACROS)
#if !defined(LOGGING)
#if defined(_DEBUG) && !defined(NDEBUG)
#define LOGGING 1
@@ -288,6 +292,7 @@ inline bool LogCheckLevel(LoggingSeverity sev) {
#endif // !LOGGING
#endif // LOG
+#endif // defined(SAFE_TO_DEFINE_TALK_BASE_LOGGING_MACROS)
//////////////////////////////////////////////////////////////////////
diff --git a/third_party/libjingle/libjingle.gyp b/third_party/libjingle/libjingle.gyp
index 9b9a8e3..632d329 100644
--- a/third_party/libjingle/libjingle.gyp
+++ b/third_party/libjingle/libjingle.gyp
@@ -11,6 +11,7 @@
'FEATURE_ENABLE_SSL',
'FEATURE_ENABLE_VOICEMAIL', # TODO(ncarter): Do we really need this?
'_USE_32BIT_TIME_T',
+ 'SAFE_TO_DEFINE_TALK_BASE_LOGGING_MACROS',
],
'include_dirs': [
'./overrides',
@@ -238,9 +239,9 @@
'files/talk/xmpp/xmppstanzaparser.h',
'files/talk/xmpp/xmpptask.cc',
'files/talk/xmpp/xmpptask.h',
- 'overrides/base/basictypes.h',
- 'overrides/base/constructormagic.h',
- 'overrides/base/scoped_ptr.h',
+ 'overrides/talk/base/basictypes.h',
+ 'overrides/talk/base/constructormagic.h',
+ 'overrides/talk/base/scoped_ptr.h',
'overrides/config.h',
],
'conditions': [