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

Unified Diff: chrome/browser/extensions/api/management/management_browsertest.cc

Issue 1940153002: Use std::unique_ptr to express ownership of base::Value in PolicyMap::Entry (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: another-fix Created 4 years, 7 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/extensions/api/management/management_browsertest.cc
diff --git a/chrome/browser/extensions/api/management/management_browsertest.cc b/chrome/browser/extensions/api/management/management_browsertest.cc
index 6975761c52777ea6aedbaa8530caca0089f5053a..95651faab166d87b0eea0761364c53845f1f9be7 100644
--- a/chrome/browser/extensions/api/management/management_browsertest.cc
+++ b/chrome/browser/extensions/api/management/management_browsertest.cc
@@ -572,11 +572,9 @@ IN_PROC_BROWSER_TEST_F(ExtensionManagementTest, ExternalPolicyRefresh) {
kExtensionId, "http://localhost/autoupdate/manifest"));
PolicyMap policies;
policies.Set(policy::key::kExtensionInstallForcelist,
- policy::POLICY_LEVEL_MANDATORY,
- policy::POLICY_SCOPE_USER,
- policy::POLICY_SOURCE_CLOUD,
- forcelist.DeepCopy(),
- NULL);
+ policy::POLICY_LEVEL_MANDATORY, policy::POLICY_SCOPE_USER,
+ policy::POLICY_SOURCE_CLOUD, forcelist.CreateDeepCopy(),
+ nullptr);
extensions::TestExtensionRegistryObserver install_observer(registry);
UpdateProviderPolicy(policies);
install_observer.WaitForExtensionWillBeInstalled();
@@ -661,11 +659,9 @@ IN_PROC_BROWSER_TEST_F(ExtensionManagementTest,
kExtensionId, "http://localhost/autoupdate/manifest"));
PolicyMap policies;
policies.Set(policy::key::kExtensionInstallForcelist,
- policy::POLICY_LEVEL_MANDATORY,
- policy::POLICY_SCOPE_USER,
- policy::POLICY_SOURCE_CLOUD,
- forcelist.DeepCopy(),
- NULL);
+ policy::POLICY_LEVEL_MANDATORY, policy::POLICY_SCOPE_USER,
+ policy::POLICY_SOURCE_CLOUD, forcelist.CreateDeepCopy(),
+ nullptr);
extensions::TestExtensionRegistryObserver install_observer(registry);
UpdateProviderPolicy(policies);
install_observer.WaitForExtensionWillBeInstalled();
@@ -704,11 +700,9 @@ IN_PROC_BROWSER_TEST_F(ExtensionManagementTest,
// Install the policy again. It should overwrite the extension's location,
// and force enable it too.
policies.Set(policy::key::kExtensionInstallForcelist,
- policy::POLICY_LEVEL_MANDATORY,
- policy::POLICY_SCOPE_USER,
- policy::POLICY_SOURCE_CLOUD,
- forcelist.DeepCopy(),
- NULL);
+ policy::POLICY_LEVEL_MANDATORY, policy::POLICY_SCOPE_USER,
+ policy::POLICY_SOURCE_CLOUD, forcelist.CreateDeepCopy(),
+ nullptr);
extensions::TestExtensionRegistryObserver extension_observer(registry);
UpdateProviderPolicy(policies);

Powered by Google App Engine
This is Rietveld 408576698