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

Side by Side Diff: dbus/message.cc

Issue 11418102: Linux: fix header includes for system protobuf. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "dbus/message.h" 5 #include "dbus/message.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/format_macros.h" 10 #include "base/format_macros.h"
11 #include "base/logging.h" 11 #include "base/logging.h"
12 #include "base/string_util.h" 12 #include "base/string_util.h"
13 #include "base/stringprintf.h" 13 #include "base/stringprintf.h"
14 #include "dbus/object_path.h" 14 #include "dbus/object_path.h"
15
16 #if defined(USE_SYSTEM_PROTOBUF)
17 #include <google/protobuf/message_lite.h>
18 #else
15 #include "third_party/protobuf/src/google/protobuf/message_lite.h" 19 #include "third_party/protobuf/src/google/protobuf/message_lite.h"
20 #endif
16 21
17 namespace { 22 namespace {
18 23
19 // Appends the header name and the value to |output|, if the value is 24 // Appends the header name and the value to |output|, if the value is
20 // not empty. 25 // not empty.
21 void AppendStringHeader(const std::string& header_name, 26 void AppendStringHeader(const std::string& header_name,
22 const std::string& header_value, 27 const std::string& header_value,
23 std::string* output) { 28 std::string* output) {
24 if (!header_value.empty()) { 29 if (!header_value.empty()) {
25 *output += header_name + ": " + header_value + "\n"; 30 *output += header_name + ": " + header_value + "\n";
(...skipping 946 matching lines...) Expand 10 before | Expand all | Expand 10 after
972 const bool success = PopBasic(DBUS_TYPE_UNIX_FD, &fd); 977 const bool success = PopBasic(DBUS_TYPE_UNIX_FD, &fd);
973 if (!success) 978 if (!success)
974 return false; 979 return false;
975 980
976 value->PutValue(fd); 981 value->PutValue(fd);
977 // NB: the caller must check validity before using the value 982 // NB: the caller must check validity before using the value
978 return true; 983 return true;
979 } 984 }
980 985
981 } // namespace dbus 986 } // namespace dbus
OLDNEW
« no previous file with comments | « chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc ('k') | remoting/protocol/message_decoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698