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

Unified 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: 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 side-by-side diff with in-line comments
Download patch
Index: components/variations/service/variations_service.h
diff --git a/components/variations/service/variations_service.h b/components/variations/service/variations_service.h
index 61c61731ac012ef0ef320991cc4f7ecc5ffc7de3..49acabfd68c8d4c96265eaa36c2a3a5812e2acc2 100644
--- a/components/variations/service/variations_service.h
+++ b/components/variations/service/variations_service.h
@@ -21,6 +21,7 @@
#include "components/variations/variations_request_scheduler.h"
#include "components/variations/variations_seed_simulator.h"
#include "components/variations/variations_seed_store.h"
+#include "components/version_info/version_info.h"
#include "components/web_resource/resource_request_allowed_notifier.h"
#include "net/url_request/url_fetcher_delegate.h"
#include "url/gurl.h"
@@ -121,6 +122,12 @@ class VariationsService
// in the format of lowercase ISO 3166-1 alpha-2. Example: us, br, in
std::string GetStoredPermanentCountry();
+ // Forces an override of the stored permanent country. Returns true
+ // if the variable has been updated. Return false if the override country is
+ // the same as the stored variable, or if the update failed for any other
+ // reason.
+ bool OverrideStoredPermanentCountry(const std::string& override_country);
+
// Exposed for testing.
static std::string GetDefaultVariationsServerURLForTesting();
@@ -219,6 +226,10 @@ class VariationsService
// so that it can be overridden by tests.
virtual bool LoadSeed(VariationsSeed* seed);
+ // Sets the stored permanent country pref for this client.
+ void StorePermanentCountry(const base::Version& version,
+ const std::string& country);
+
// Checks if prerequisites for fetching the Variations seed are met, and if
// so, performs the actual fetch using |DoActualFetch|.
void FetchVariationsSeed();

Powered by Google App Engine
This is Rietveld 408576698