Chromium Code Reviews| 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() |