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 #ifndef CHROME_COMMON_SYNC_UTIL_H_ | 5 #ifndef CHROME_COMMON_SYNC_UTIL_H_ |
6 #define CHROME_COMMON_SYNC_UTIL_H_ | 6 #define CHROME_COMMON_SYNC_UTIL_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 class GURL; | 10 class GURL; |
11 | 11 |
12 namespace base { | 12 namespace base { |
13 class CommandLine; | 13 class CommandLine; |
14 } | 14 } |
15 | 15 |
16 namespace chrome { | |
17 class VersionInfo; | |
18 } | |
19 | |
20 namespace internal { | 16 namespace internal { |
21 // Default sync server URL. Visible for testing. | 17 // Default sync server URL. Visible for testing. |
22 extern const char* kSyncServerUrl; | 18 extern const char* kSyncServerUrl; |
23 | 19 |
24 // Sync server URL for dev channel users. Visible for testing. | 20 // Sync server URL for dev channel users. Visible for testing. |
25 extern const char* kSyncDevServerUrl; | 21 extern const char* kSyncDevServerUrl; |
26 } | 22 } |
27 | 23 |
28 GURL GetSyncServiceURL(const base::CommandLine& command_line); | 24 GURL GetSyncServiceURL(const base::CommandLine& command_line); |
29 | 25 |
30 // Helper to construct a user agent string (ASCII) suitable for use by | 26 // Helper to construct a user agent string (ASCII) suitable for use by |
31 // the syncapi for any HTTP communication. This string is used by the sync | 27 // the syncapi for any HTTP communication. This string is used by the sync |
32 // backend for classifying client types when calculating statistics. | 28 // backend for classifying client types when calculating statistics. |
33 std::string MakeDesktopUserAgentForSync( | 29 std::string MakeDesktopUserAgentForSync(); |
34 const chrome::VersionInfo& version_info); | 30 std::string MakeUserAgentForSync(const std::string& system); |
35 std::string MakeUserAgentForSync(const chrome::VersionInfo& version_info, | |
36 const std::string& system); | |
37 | 31 |
38 #endif // CHROME_COMMON_SYNC_UTIL_H_ | 32 #endif // CHROME_COMMON_SYNC_UTIL_H_ |
OLD | NEW |