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

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: Rebase 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
« no previous file with comments | « chrome/browser/chrome_content_browser_client.cc ('k') | chrome/browser/prefs/origin_trial_prefs.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 d6f60608c24f312eab97a0dde98f59aec2a0af0d..244f8d5a62f61a3587b85cde327bf0e5e9cb2481 100644
--- a/chrome/browser/component_updater/origin_trials_component_installer.cc
+++ b/chrome/browser/component_updater/origin_trials_component_installer.cc
@@ -14,6 +14,7 @@
#include "chrome/common/pref_names.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
@@ -27,7 +28,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.
@@ -77,6 +78,12 @@ void OriginTrialsComponentInstallerTraits::ComponentReady(
local_state->Set(prefs::kOriginTrialPublicKey,
base::StringValue(override_public_key));
}
+ base::ListValue* override_disabled_feature_list = nullptr;
+ if (manifest->GetList("origin-trials.disabled-features",
+ &override_disabled_feature_list)) {
+ ListPrefUpdate update(local_state, prefs::kOriginTrialDisabledFeatures);
+ update->Swap(override_disabled_feature_list);
+ }
}
base::FilePath OriginTrialsComponentInstallerTraits::GetRelativeInstallDir()
« no previous file with comments | « chrome/browser/chrome_content_browser_client.cc ('k') | chrome/browser/prefs/origin_trial_prefs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698