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

Unified Diff: chrome/browser/component_updater/origin_trials_component_installer.cc

Issue 1741783002: Add disabled origin trial feature list (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ef-finch
Patch Set: Separate the introduction of preference-persistence into a different CL Created 4 years, 6 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: chrome/browser/component_updater/origin_trials_component_installer.cc
diff --git a/chrome/browser/component_updater/origin_trials_component_installer.cc b/chrome/browser/component_updater/origin_trials_component_installer.cc
index b8a2ec7d6896ffdcfafdb3638aa614b57530fc13..db361465cc5c85c905f7158706adaf3a9a43320a 100644
--- a/chrome/browser/component_updater/origin_trials_component_installer.cc
+++ b/chrome/browser/component_updater/origin_trials_component_installer.cc
@@ -13,6 +13,7 @@
#include "chrome/common/chrome_switches.h"
#include "components/component_updater/component_updater_paths.h"
#include "components/prefs/pref_service.h"
+#include "components/prefs/scoped_user_pref_update.h"
// The client-side configuration for the origin trial framework can be
// overridden by an installed component named 'OriginTrials' (extension id
@@ -26,7 +27,7 @@
// "revoked-tokens": "<base64-encoded data>"
// }
//
-// TODO(iclelland): Implement support for revoked tokens and disabled features.
+// TODO(iclelland): Implement support for revoked tokens.
//
// If the component is not present in the user data directory, the default
// configuration will be used.
@@ -76,6 +77,12 @@ void OriginTrialsComponentInstallerTraits::ComponentReady(
local_state->Set("origin-trials.public-key",
base::StringValue(override_public_key));
}
+ base::ListValue* override_disabled_feature_list;
Sorin Jianu 2016/06/07 17:20:24 please initialize.
iclelland 2016/06/08 13:37:55 Good catch, thanks. Done.
+ if (manifest->GetList("origin-trials.disabled-features",
+ &override_disabled_feature_list)) {
+ ListPrefUpdate update(local_state, "origin-trials.disabled-features");
chasej 2016/06/07 15:51:31 Use prefs::kOriginTrialDisabledFeatures constant?
iclelland 2016/06/08 13:37:55 Done.
+ update->Swap(override_disabled_feature_list);
+ }
}
base::FilePath OriginTrialsComponentInstallerTraits::GetRelativeInstallDir()

Powered by Google App Engine
This is Rietveld 408576698