OLD | NEW |
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 // Some Google related utility functions. | 5 // Some Google related utility functions. |
6 | 6 |
7 #ifndef CHROME_BROWSER_GOOGLE_GOOGLE_UTIL_H__ | 7 #ifndef CHROME_BROWSER_GOOGLE_GOOGLE_UTIL_H__ |
8 #define CHROME_BROWSER_GOOGLE_GOOGLE_UTIL_H__ | 8 #define CHROME_BROWSER_GOOGLE_GOOGLE_UTIL_H__ |
9 | 9 |
10 #include <string> | 10 #include <string> |
11 | 11 |
12 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
13 | 13 |
14 class GURL; | 14 class GURL; |
15 class Profile; | 15 class Profile; |
16 | 16 |
17 // This namespace provides various helpers around handling Google-related URLs | 17 // This namespace provides various helpers around handling Google-related URLs |
18 // and state relating to Google Chrome distributions (such as RLZ). | 18 // and state relating to Google Chrome distributions (such as RLZ). |
19 namespace google_util { | 19 namespace google_util { |
20 | 20 |
21 // The query key that identifies a Google Extended API request for Instant. | 21 // The query key that identifies a Google Extended API request for Instant. |
22 const char kInstantExtendedAPIParam[] = "espv"; | 22 const char kInstantExtendedAPIParam[] = "espv"; |
23 | 23 |
| 24 #if defined(OS_IOS) || defined(OS_ANDROID) |
| 25 const char kInstantExtendedDefaultAPIVersion[] = "1"; |
| 26 #endif |
| 27 |
24 GURL LinkDoctorBaseURL(); | 28 GURL LinkDoctorBaseURL(); |
25 void SetMockLinkDoctorBaseURLForTesting(); | 29 void SetMockLinkDoctorBaseURLForTesting(); |
26 | 30 |
27 // Adds the Google locale string to the URL (e.g., hl=en-US). This does not | 31 // Adds the Google locale string to the URL (e.g., hl=en-US). This does not |
28 // check to see if the param already exists. | 32 // check to see if the param already exists. |
29 GURL AppendGoogleLocaleParam(const GURL& url); | 33 GURL AppendGoogleLocaleParam(const GURL& url); |
30 | 34 |
31 // String version of AppendGoogleLocaleParam. | 35 // String version of AppendGoogleLocaleParam. |
32 std::string StringAppendGoogleLocaleParam(const std::string& url); | 36 std::string StringAppendGoogleLocaleParam(const std::string& url); |
33 | 37 |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 ~BrandForTesting(); | 104 ~BrandForTesting(); |
101 | 105 |
102 private: | 106 private: |
103 std::string brand_; | 107 std::string brand_; |
104 DISALLOW_COPY_AND_ASSIGN(BrandForTesting); | 108 DISALLOW_COPY_AND_ASSIGN(BrandForTesting); |
105 }; | 109 }; |
106 | 110 |
107 } // namespace google_util | 111 } // namespace google_util |
108 | 112 |
109 #endif // CHROME_BROWSER_GOOGLE_GOOGLE_UTIL_H__ | 113 #endif // CHROME_BROWSER_GOOGLE_GOOGLE_UTIL_H__ |
OLD | NEW |