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

Side by Side Diff: chrome/browser/extensions/extension_management_test_util.cc

Issue 1348903007: Revert of Add source column to chrome://policy showing the origins of policies. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/extensions/extension_management_test_util.h" 5 #include "chrome/browser/extensions/extension_management_test_util.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "components/crx_file/id_util.h" 9 #include "components/crx_file/id_util.h"
10 #include "components/policy/core/common/configuration_policy_provider.h" 10 #include "components/policy/core/common/configuration_policy_provider.h"
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 if (policy_value && policy_value->GetAsDictionary(&dict_value)) 256 if (policy_value && policy_value->GetAsDictionary(&dict_value))
257 SetPref(dict_value->DeepCopy()); 257 SetPref(dict_value->DeepCopy());
258 else 258 else
259 SetPref(new base::DictionaryValue); 259 SetPref(new base::DictionaryValue);
260 } 260 }
261 261
262 ExtensionManagementPolicyUpdater::~ExtensionManagementPolicyUpdater() { 262 ExtensionManagementPolicyUpdater::~ExtensionManagementPolicyUpdater() {
263 policies_->Get(policy::PolicyNamespace(policy::POLICY_DOMAIN_CHROME, 263 policies_->Get(policy::PolicyNamespace(policy::POLICY_DOMAIN_CHROME,
264 std::string())) 264 std::string()))
265 .Set(policy::key::kExtensionSettings, policy::POLICY_LEVEL_MANDATORY, 265 .Set(policy::key::kExtensionSettings, policy::POLICY_LEVEL_MANDATORY,
266 policy::POLICY_SCOPE_USER, policy::POLICY_SOURCE_CLOUD, 266 policy::POLICY_SCOPE_USER, TakePref().release(), nullptr);
267 TakePref().release(), nullptr);
268 provider_->UpdatePolicy(policies_.Pass()); 267 provider_->UpdatePolicy(policies_.Pass());
269 } 268 }
270 269
271 } // namespace extensions 270 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/storage/settings_apitest.cc ('k') | chrome/browser/extensions/policy_handlers_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698