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 COMPONENTS_VARIATIONS_SERVICE_VARIATIONS_SERVICE_H_ | 5 #ifndef COMPONENTS_VARIATIONS_SERVICE_VARIATIONS_SERVICE_H_ |
6 #define COMPONENTS_VARIATIONS_SERVICE_VARIATIONS_SERVICE_H_ | 6 #define COMPONENTS_VARIATIONS_SERVICE_VARIATIONS_SERVICE_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
121 // Returns the permanent country code stored for this client. Country code is | 121 // Returns the permanent country code stored for this client. Country code is |
122 // in the format of lowercase ISO 3166-1 alpha-2. Example: us, br, in | 122 // in the format of lowercase ISO 3166-1 alpha-2. Example: us, br, in |
123 std::string GetStoredPermanentCountry(); | 123 std::string GetStoredPermanentCountry(); |
124 | 124 |
125 // Forces an override of the stored permanent country. Returns true | 125 // Forces an override of the stored permanent country. Returns true |
126 // if the variable has been updated. Return false if the override country is | 126 // if the variable has been updated. Return false if the override country is |
127 // the same as the stored variable, or if the update failed for any other | 127 // the same as the stored variable, or if the update failed for any other |
128 // reason. | 128 // reason. |
129 bool OverrideStoredPermanentCountry(const std::string& override_country); | 129 bool OverrideStoredPermanentCountry(const std::string& override_country); |
130 | 130 |
131 // Returns what variations will consider to be the latest country. | |
Alexei Svitkine (slow)
2017/04/19 21:42:57
Mention that this returns the empty string if not
Yusuf
2017/04/19 22:16:46
Done.
| |
132 std::string GetLatestCountry() const; | |
133 | |
131 // Exposed for testing. | 134 // Exposed for testing. |
132 static std::string GetDefaultVariationsServerURLForTesting(); | 135 static std::string GetDefaultVariationsServerURLForTesting(); |
133 | 136 |
134 // Register Variations related prefs in Local State. | 137 // Register Variations related prefs in Local State. |
135 static void RegisterPrefs(PrefRegistrySimple* registry); | 138 static void RegisterPrefs(PrefRegistrySimple* registry); |
136 | 139 |
137 // Register Variations related prefs in the Profile prefs. | 140 // Register Variations related prefs in the Profile prefs. |
138 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); | 141 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); |
139 | 142 |
140 // Factory method for creating a VariationsService. Does not take ownership of | 143 // Factory method for creating a VariationsService. Does not take ownership of |
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
331 base::ThreadChecker thread_checker_; | 334 base::ThreadChecker thread_checker_; |
332 | 335 |
333 base::WeakPtrFactory<VariationsService> weak_ptr_factory_; | 336 base::WeakPtrFactory<VariationsService> weak_ptr_factory_; |
334 | 337 |
335 DISALLOW_COPY_AND_ASSIGN(VariationsService); | 338 DISALLOW_COPY_AND_ASSIGN(VariationsService); |
336 }; | 339 }; |
337 | 340 |
338 } // namespace variations | 341 } // namespace variations |
339 | 342 |
340 #endif // COMPONENTS_VARIATIONS_SERVICE_VARIATIONS_SERVICE_H_ | 343 #endif // COMPONENTS_VARIATIONS_SERVICE_VARIATIONS_SERVICE_H_ |
OLD | NEW |