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

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

Issue 2539363004: Make base::Value::TYPE a scoped enum. (Closed)
Patch Set: Rebase Created 4 years 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 #include <utility> 8 #include <utility>
9 9
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 56
57 void ExtensionManagementPrefUpdaterBase::SetBlacklistedByDefault(bool value) { 57 void ExtensionManagementPrefUpdaterBase::SetBlacklistedByDefault(bool value) {
58 pref_->SetString(make_path(schema::kWildcard, schema::kInstallationMode), 58 pref_->SetString(make_path(schema::kWildcard, schema::kInstallationMode),
59 value ? schema::kBlocked : schema::kAllowed); 59 value ? schema::kBlocked : schema::kAllowed);
60 } 60 }
61 61
62 void ExtensionManagementPrefUpdaterBase:: 62 void ExtensionManagementPrefUpdaterBase::
63 ClearInstallationModesForIndividualExtensions() { 63 ClearInstallationModesForIndividualExtensions() {
64 for (base::DictionaryValue::Iterator it(*pref_); !it.IsAtEnd(); 64 for (base::DictionaryValue::Iterator it(*pref_); !it.IsAtEnd();
65 it.Advance()) { 65 it.Advance()) {
66 DCHECK(it.value().IsType(base::Value::TYPE_DICTIONARY)); 66 DCHECK(it.value().IsType(base::Value::Type::DICTIONARY));
67 if (it.key() != schema::kWildcard) { 67 if (it.key() != schema::kWildcard) {
68 DCHECK(crx_file::id_util::IdIsValid(it.key())); 68 DCHECK(crx_file::id_util::IdIsValid(it.key()));
69 pref_->Remove(make_path(it.key(), schema::kInstallationMode), nullptr); 69 pref_->Remove(make_path(it.key(), schema::kInstallationMode), nullptr);
70 pref_->Remove(make_path(it.key(), schema::kUpdateUrl), nullptr); 70 pref_->Remove(make_path(it.key(), schema::kUpdateUrl), nullptr);
71 } 71 }
72 } 72 }
73 } 73 }
74 74
75 void 75 void
76 ExtensionManagementPrefUpdaterBase::SetIndividualExtensionInstallationAllowed( 76 ExtensionManagementPrefUpdaterBase::SetIndividualExtensionInstallationAllowed(
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 policies_ 266 policies_
267 ->Get( 267 ->Get(
268 policy::PolicyNamespace(policy::POLICY_DOMAIN_CHROME, std::string())) 268 policy::PolicyNamespace(policy::POLICY_DOMAIN_CHROME, std::string()))
269 .Set(policy::key::kExtensionSettings, policy::POLICY_LEVEL_MANDATORY, 269 .Set(policy::key::kExtensionSettings, policy::POLICY_LEVEL_MANDATORY,
270 policy::POLICY_SCOPE_USER, policy::POLICY_SOURCE_CLOUD, TakePref(), 270 policy::POLICY_SCOPE_USER, policy::POLICY_SOURCE_CLOUD, TakePref(),
271 nullptr); 271 nullptr);
272 provider_->UpdatePolicy(std::move(policies_)); 272 provider_->UpdatePolicy(std::move(policies_));
273 } 273 }
274 274
275 } // namespace extensions 275 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_management.cc ('k') | chrome/browser/extensions/extension_management_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698