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

Unified Diff: components/variations/variations_seed_processor.h

Issue 370463003: Add support for variations controlled overriding UI strings to the variations service. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: asvitkine's first round of comments Created 6 years, 5 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/variations_seed_processor.h
diff --git a/components/variations/variations_seed_processor.h b/components/variations/variations_seed_processor.h
index dd4d0c81e6742951c6d863924188a12f3ca5356d..862443a926763b5e6ee6392ade3acc7e43e6c0d5 100644
--- a/components/variations/variations_seed_processor.h
+++ b/components/variations/variations_seed_processor.h
@@ -8,9 +8,11 @@
#include <string>
#include <vector>
+#include "base/callback_forward.h"
#include "base/compiler_specific.h"
#include "base/gtest_prod_util.h"
#include "base/metrics/field_trial.h"
+#include "base/strings/string16.h"
#include "base/time/time.h"
#include "base/version.h"
#include "components/variations/proto/study.pb.h"
@@ -23,6 +25,9 @@ class ProcessedStudy;
// Helper class to instantiate field trials from a variations seed.
class VariationsSeedProcessor {
public:
+ typedef base::Callback<void(uint32_t,
+ const base::string16&)> UIStringOverrideCallback;
+
VariationsSeedProcessor();
virtual ~VariationsSeedProcessor();
@@ -35,7 +40,8 @@ class VariationsSeedProcessor {
const base::Version& version,
Study_Channel channel,
Study_FormFactor form_factor,
- const std::string& hardware_class);
+ const std::string& hardware_class,
+ const UIStringOverrideCallback& override_string);
private:
friend class VariationsSeedProcessorTest;
@@ -63,7 +69,8 @@ class VariationsSeedProcessor {
// Creates and registers a field trial from the |processed_study| data.
// Disables the trial if |processed_study.is_expired| is true.
- void CreateTrialFromStudy(const ProcessedStudy& processed_study);
+ void CreateTrialFromStudy(const ProcessedStudy& processed_study,
+ const UIStringOverrideCallback& override_string);
DISALLOW_COPY_AND_ASSIGN(VariationsSeedProcessor);
};

Powered by Google App Engine
This is Rietveld 408576698