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 #ifndef CHROME_BROWSER_SEARCH_ENGINES_SEARCH_TERMS_DATA_H_ | 5 #ifndef CHROME_BROWSER_SEARCH_ENGINES_SEARCH_TERMS_DATA_H_ |
6 #define CHROME_BROWSER_SEARCH_ENGINES_SEARCH_TERMS_DATA_H_ | 6 #define CHROME_BROWSER_SEARCH_ENGINES_SEARCH_TERMS_DATA_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 15 matching lines...) Expand all Loading... |
26 virtual std::string GoogleBaseURLValue() const; | 26 virtual std::string GoogleBaseURLValue() const; |
27 | 27 |
28 // Returns the value for the GOOGLE_BASE_SUGGEST_URL term. This | 28 // Returns the value for the GOOGLE_BASE_SUGGEST_URL term. This |
29 // implementation simply returns the default value. | 29 // implementation simply returns the default value. |
30 std::string GoogleBaseSuggestURLValue() const; | 30 std::string GoogleBaseSuggestURLValue() const; |
31 | 31 |
32 // Returns the locale used by the application. This implementation returns | 32 // Returns the locale used by the application. This implementation returns |
33 // "en" and thus should be overridden where the result is actually meaningful. | 33 // "en" and thus should be overridden where the result is actually meaningful. |
34 virtual std::string GetApplicationLocale() const; | 34 virtual std::string GetApplicationLocale() const; |
35 | 35 |
36 #if defined(ENABLE_RLZ) | 36 #if defined(ENABLE_RLZ) || defined(OS_ANDROID) |
37 // Returns the value for the Chrome Omnibox rlz. This implementation returns | 37 // Returns the value for the Chrome Omnibox rlz. This implementation returns |
38 // the empty string. | 38 // the empty string. |
39 virtual string16 GetRlzParameterValue() const; | 39 virtual string16 GetRlzParameterValue() const; |
40 #endif | 40 #endif |
41 | 41 |
| 42 #if defined(OS_ANDROID) |
| 43 static void SetStaticRlz(const string16& rlz); |
| 44 #endif |
| 45 |
42 // Returns a string indicating whether Instant (in the visible-preview mode) | 46 // Returns a string indicating whether Instant (in the visible-preview mode) |
43 // is enabled, suitable for adding as a query string param to the homepage | 47 // is enabled, suitable for adding as a query string param to the homepage |
44 // (instant_url) request. Returns an empty string if Instant is disabled, | 48 // (instant_url) request. Returns an empty string if Instant is disabled, |
45 // or if it's only active in a hidden field trial mode. Determining this | 49 // or if it's only active in a hidden field trial mode. Determining this |
46 // requires accessing the Profile, so this can only ever be non-empty for | 50 // requires accessing the Profile, so this can only ever be non-empty for |
47 // UIThreadSearchTermsData. | 51 // UIThreadSearchTermsData. |
48 virtual std::string InstantEnabledParam() const; | 52 virtual std::string InstantEnabledParam() const; |
49 | 53 |
50 private: | 54 private: |
51 DISALLOW_COPY_AND_ASSIGN(SearchTermsData); | 55 DISALLOW_COPY_AND_ASSIGN(SearchTermsData); |
(...skipping 18 matching lines...) Expand all Loading... |
70 static void SetGoogleBaseURL(const std::string& base_url); | 74 static void SetGoogleBaseURL(const std::string& base_url); |
71 | 75 |
72 private: | 76 private: |
73 static std::string* google_base_url_; | 77 static std::string* google_base_url_; |
74 Profile* profile_; | 78 Profile* profile_; |
75 | 79 |
76 DISALLOW_COPY_AND_ASSIGN(UIThreadSearchTermsData); | 80 DISALLOW_COPY_AND_ASSIGN(UIThreadSearchTermsData); |
77 }; | 81 }; |
78 | 82 |
79 #endif // CHROME_BROWSER_SEARCH_ENGINES_SEARCH_TERMS_DATA_H_ | 83 #endif // CHROME_BROWSER_SEARCH_ENGINES_SEARCH_TERMS_DATA_H_ |
OLD | NEW |