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

Unified Diff: chrome/browser/policy/policy_network_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
« no previous file with comments | « chrome/browser/policy/policy_browsertest.cc ('k') | chrome/browser/policy/policy_prefs_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/policy/policy_network_browsertest.cc
diff --git a/chrome/browser/policy/policy_network_browsertest.cc b/chrome/browser/policy/policy_network_browsertest.cc
index 75765cf38789659d3a20b71eb6ff9c379fec9228..19c8dca6ddc627eed2250cdb8cc88a0d7549fdd5 100644
--- a/chrome/browser/policy/policy_network_browsertest.cc
+++ b/chrome/browser/policy/policy_network_browsertest.cc
@@ -5,6 +5,7 @@
#include "base/bind.h"
#include "base/command_line.h"
#include "base/macros.h"
+#include "base/memory/ptr_util.h"
#include "base/memory/ref_counted.h"
#include "base/run_loop.h"
#include "chrome/browser/browser_process.h"
@@ -83,7 +84,8 @@ class QuicAllowedPolicyIsFalse: public QuicAllowedPolicyTestBase {
protected:
void GetQuicAllowedPolicy(PolicyMap* values) override {
values->Set(key::kQuicAllowed, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_MACHINE,
- POLICY_SOURCE_CLOUD, new base::FundamentalValue(false), nullptr);
+ POLICY_SOURCE_CLOUD,
+ base::WrapUnique(new base::FundamentalValue(false)), nullptr);
}
private:
@@ -102,7 +104,8 @@ class QuicAllowedPolicyIsTrue: public QuicAllowedPolicyTestBase {
protected:
void GetQuicAllowedPolicy(PolicyMap* values) override {
values->Set(key::kQuicAllowed, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_MACHINE,
- POLICY_SOURCE_CLOUD, new base::FundamentalValue(true), nullptr);
+ POLICY_SOURCE_CLOUD,
+ base::WrapUnique(new base::FundamentalValue(true)), nullptr);
}
private:
« no previous file with comments | « chrome/browser/policy/policy_browsertest.cc ('k') | chrome/browser/policy/policy_prefs_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698