OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "components/sync_driver/sync_util.h" | 5 #include "components/sync/driver/sync_util.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
10 #include "components/sync_driver/sync_driver_switches.h" | 10 #include "components/sync/driver/sync_driver_switches.h" |
11 #include "url/gurl.h" | 11 #include "url/gurl.h" |
12 | 12 |
13 namespace { | 13 namespace { |
14 | 14 |
15 // Returns string that represents system in UserAgent. | 15 // Returns string that represents system in UserAgent. |
16 std::string GetSystemString(bool is_tablet) { | 16 std::string GetSystemString(bool is_tablet) { |
17 std::string system; | 17 std::string system; |
18 #if defined(OS_CHROMEOS) | 18 #if defined(OS_CHROMEOS) |
19 system = "CROS "; | 19 system = "CROS "; |
20 #elif defined(OS_ANDROID) | 20 #elif defined(OS_ANDROID) |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 } | 97 } |
98 } | 98 } |
99 return result; | 99 return result; |
100 } | 100 } |
101 | 101 |
102 std::string MakeUserAgentForSync(version_info::Channel channel, | 102 std::string MakeUserAgentForSync(version_info::Channel channel, |
103 bool is_tablet) { | 103 bool is_tablet) { |
104 std::string system = GetSystemString(is_tablet); | 104 std::string system = GetSystemString(is_tablet); |
105 return internal::FormatUserAgentForSync(system, channel); | 105 return internal::FormatUserAgentForSync(system, channel); |
106 } | 106 } |
OLD | NEW |