Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(402)

Side by Side Diff: components/variations/service/variations_service.h

Issue 1903593002: Allows to manually change the stored permanent country in Variations from the translate-internals d… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: UI polishing Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 <string> 8 #include <string>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 // Returns the variations server URL, which can vary if a command-line flag is 114 // Returns the variations server URL, which can vary if a command-line flag is
115 // set and/or the variations restrict pref is set in |local_prefs|. Declared 115 // set and/or the variations restrict pref is set in |local_prefs|. Declared
116 // static for test purposes. 116 // static for test purposes.
117 GURL GetVariationsServerURL(PrefService* local_prefs, 117 GURL GetVariationsServerURL(PrefService* local_prefs,
118 const std::string& restrict_mode_override); 118 const std::string& restrict_mode_override);
119 119
120 // Returns the permanent country code stored for this client. Country code is 120 // Returns the permanent country code stored for this client. Country code is
121 // in the format of lowercase ISO 3166-1 alpha-2. Example: us, br, in 121 // in the format of lowercase ISO 3166-1 alpha-2. Example: us, br, in
122 std::string GetStoredPermanentCountry(); 122 std::string GetStoredPermanentCountry();
123 123
124 // Forces an override of kVariationsPermanentConsistencyCountry. Returns true
125 // if the variable has been updated. Return false if the override country is
126 // the same as the stored variable, or if the update failed for any other
127 // reason.
128 bool ForceSetStoredPermanentCountry(const std::string& override_country);
129
124 // Exposed for testing. 130 // Exposed for testing.
125 static std::string GetDefaultVariationsServerURLForTesting(); 131 static std::string GetDefaultVariationsServerURLForTesting();
126 132
127 // Register Variations related prefs in Local State. 133 // Register Variations related prefs in Local State.
128 static void RegisterPrefs(PrefRegistrySimple* registry); 134 static void RegisterPrefs(PrefRegistrySimple* registry);
129 135
130 // Register Variations related prefs in the Profile prefs. 136 // Register Variations related prefs in the Profile prefs.
131 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); 137 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry);
132 138
133 // Factory method for creating a VariationsService. Does not take ownership of 139 // Factory method for creating a VariationsService. Does not take ownership of
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 base::ThreadChecker thread_checker_; 319 base::ThreadChecker thread_checker_;
314 320
315 base::WeakPtrFactory<VariationsService> weak_ptr_factory_; 321 base::WeakPtrFactory<VariationsService> weak_ptr_factory_;
316 322
317 DISALLOW_COPY_AND_ASSIGN(VariationsService); 323 DISALLOW_COPY_AND_ASSIGN(VariationsService);
318 }; 324 };
319 325
320 } // namespace variations 326 } // namespace variations
321 327
322 #endif // COMPONENTS_VARIATIONS_SERVICE_VARIATIONS_SERVICE_H_ 328 #endif // COMPONENTS_VARIATIONS_SERVICE_VARIATIONS_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698