Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(171)

Unified Diff: third_party/protobuf/src/google/protobuf/stubs/common.cc

Issue 1322483002: Revert https://codereview.chromium.org/1291903002 (protobuf roll). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/protobuf/src/google/protobuf/stubs/common.cc
diff --git a/third_party/protobuf/src/google/protobuf/stubs/common.cc b/third_party/protobuf/src/google/protobuf/stubs/common.cc
index d470fc7265c1107564e2e3f636aacac645319f33..e6045026774246225433ac84a1eb0eb12e92f099 100644
--- a/third_party/protobuf/src/google/protobuf/stubs/common.cc
+++ b/third_party/protobuf/src/google/protobuf/stubs/common.cc
@@ -1,6 +1,6 @@
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
-// https://developers.google.com/protocol-buffers/
+// http://code.google.com/p/protobuf/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
@@ -32,13 +32,12 @@
#include <google/protobuf/stubs/common.h>
#include <google/protobuf/stubs/once.h>
-#include <google/protobuf/stubs/status.h>
-#include <google/protobuf/stubs/stringpiece.h>
-#include <google/protobuf/stubs/strutil.h>
#include <stdio.h>
#include <errno.h>
#include <vector>
+#include "config.h"
+
#ifdef _WIN32
#define WIN32_LEAN_AND_MEAN // We only need minimal includes
#include <windows.h>
@@ -116,8 +115,8 @@ void DefaultLogHandler(LogLevel level, const char* filename, int line,
fflush(stderr); // Needed on MSVC.
}
-void NullLogHandler(LogLevel /* level */, const char* /* filename */,
- int /* line */, const string& /* message */) {
+void NullLogHandler(LogLevel level, const char* filename, int line,
+ const string& message) {
// Nothing.
}
@@ -149,27 +148,6 @@ LogMessage& LogMessage::operator<<(const char* value) {
return *this;
}
-LogMessage& LogMessage::operator<<(const StringPiece& value) {
- message_ += value.ToString();
- return *this;
-}
-
-LogMessage& LogMessage::operator<<(long long value) {
- message_ += SimpleItoa(value);
- return *this;
-}
-
-LogMessage& LogMessage::operator<<(unsigned long long value) {
- message_ += SimpleItoa(value);
- return *this;
-}
-
-LogMessage& LogMessage::operator<<(
- const ::google::protobuf::util::Status& status) {
- message_ += status.ToString();
- return *this;
-}
-
// Since this is just for logging, we don't care if the current locale changes
// the results -- in fact, we probably prefer that. So we use snprintf()
// instead of Simple*toa().
@@ -189,11 +167,10 @@ LogMessage& LogMessage::operator<<(
DECLARE_STREAM_OPERATOR(char , "%c" )
DECLARE_STREAM_OPERATOR(int , "%d" )
-DECLARE_STREAM_OPERATOR(unsigned int , "%u" )
+DECLARE_STREAM_OPERATOR(uint , "%u" )
DECLARE_STREAM_OPERATOR(long , "%ld")
DECLARE_STREAM_OPERATOR(unsigned long, "%lu")
DECLARE_STREAM_OPERATOR(double , "%g" )
-DECLARE_STREAM_OPERATOR(void* , "%p" )
#undef DECLARE_STREAM_OPERATOR
LogMessage::LogMessage(LogLevel level, const char* filename, int line)

Powered by Google App Engine
This is Rietveld 408576698