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

Side by Side Diff: dbus/message.cc

Issue 2748203002: Remove usage of USE_SYSTEM_PROTOBUF (Closed)
Patch Set: Rebase Created 3 years, 8 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 unified diff | Download patch
« no previous file with comments | « components/safe_browsing_db/v4_rice.h ('k') | remoting/protocol/message_decoder.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/format_macros.h" 9 #include "base/format_macros.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "base/numerics/safe_conversions.h" 11 #include "base/numerics/safe_conversions.h"
12 #include "base/strings/string_number_conversions.h" 12 #include "base/strings/string_number_conversions.h"
13 #include "base/strings/string_util.h" 13 #include "base/strings/string_util.h"
14 #include "base/strings/stringprintf.h" 14 #include "base/strings/stringprintf.h"
15 #include "dbus/object_path.h" 15 #include "dbus/object_path.h"
16
17 #if defined(USE_SYSTEM_PROTOBUF)
18 #include <google/protobuf/message_lite.h>
19 #else
20 #include "third_party/protobuf/src/google/protobuf/message_lite.h" 16 #include "third_party/protobuf/src/google/protobuf/message_lite.h"
21 #endif
22 17
23 namespace { 18 namespace {
24 19
25 // Appends the header name and the value to |output|, if the value is 20 // Appends the header name and the value to |output|, if the value is
26 // not empty. 21 // not empty.
27 void AppendStringHeader(const std::string& header_name, 22 void AppendStringHeader(const std::string& header_name,
28 const std::string& header_value, 23 const std::string& header_value,
29 std::string* output) { 24 std::string* output) {
30 if (!header_value.empty()) { 25 if (!header_value.empty()) {
31 *output += header_name + ": " + header_value + "\n"; 26 *output += header_name + ": " + header_value + "\n";
(...skipping 984 matching lines...) Expand 10 before | Expand all | Expand 10 after
1016 int fd = -1; 1011 int fd = -1;
1017 const bool success = PopBasic(DBUS_TYPE_UNIX_FD, &fd); 1012 const bool success = PopBasic(DBUS_TYPE_UNIX_FD, &fd);
1018 if (!success) 1013 if (!success)
1019 return false; 1014 return false;
1020 1015
1021 *value = base::ScopedFD(fd); 1016 *value = base::ScopedFD(fd);
1022 return true; 1017 return true;
1023 } 1018 }
1024 1019
1025 } // namespace dbus 1020 } // namespace dbus
OLDNEW
« no previous file with comments | « components/safe_browsing_db/v4_rice.h ('k') | remoting/protocol/message_decoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698