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

Unified Diff: chrome/browser/prefs/proxy_policy_unittest.cc

Issue 388963002: Get rid of the rest of CreateStringValue (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix bad rebase Created 6 years, 5 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/prefs/proxy_policy_unittest.cc
diff --git a/chrome/browser/prefs/proxy_policy_unittest.cc b/chrome/browser/prefs/proxy_policy_unittest.cc
index 01116463295675775ef5af9e5cf2904b81788597..17bb21bcd92a44f282253c2d8245235b71aa4b90 100644
--- a/chrome/browser/prefs/proxy_policy_unittest.cc
+++ b/chrome/browser/prefs/proxy_policy_unittest.cc
@@ -120,15 +120,21 @@ class ProxyPolicyTest : public testing::Test {
TEST_F(ProxyPolicyTest, OverridesCommandLineOptions) {
command_line_.AppendSwitchASCII(switches::kProxyBypassList, "123");
command_line_.AppendSwitchASCII(switches::kProxyServer, "789");
- base::Value* mode_name = base::Value::CreateStringValue(
- ProxyPrefs::kFixedServersProxyModeName);
+ base::Value* mode_name =
+ new base::StringValue(ProxyPrefs::kFixedServersProxyModeName);
PolicyMap policy;
policy.Set(key::kProxyMode, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER,
mode_name, NULL);
- policy.Set(key::kProxyBypassList, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER,
- base::Value::CreateStringValue("abc"), NULL);
- policy.Set(key::kProxyServer, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER,
- base::Value::CreateStringValue("ghi"), NULL);
+ policy.Set(key::kProxyBypassList,
+ POLICY_LEVEL_MANDATORY,
+ POLICY_SCOPE_USER,
+ new base::StringValue("abc"),
+ NULL);
+ policy.Set(key::kProxyServer,
+ POLICY_LEVEL_MANDATORY,
+ POLICY_SCOPE_USER,
+ new base::StringValue("ghi"),
+ NULL);
provider_.UpdateChromePolicy(policy);
// First verify that command-line options are set correctly when
@@ -154,8 +160,8 @@ TEST_F(ProxyPolicyTest, OverridesCommandLineOptions) {
TEST_F(ProxyPolicyTest, OverridesUnrelatedCommandLineOptions) {
command_line_.AppendSwitchASCII(switches::kProxyBypassList, "123");
command_line_.AppendSwitchASCII(switches::kProxyServer, "789");
- base::Value* mode_name = base::Value::CreateStringValue(
- ProxyPrefs::kAutoDetectProxyModeName);
+ base::Value* mode_name =
+ new base::StringValue(ProxyPrefs::kAutoDetectProxyModeName);
PolicyMap policy;
policy.Set(key::kProxyMode, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER,
mode_name, NULL);
@@ -181,8 +187,8 @@ TEST_F(ProxyPolicyTest, OverridesUnrelatedCommandLineOptions) {
TEST_F(ProxyPolicyTest, OverridesCommandLineNoProxy) {
command_line_.AppendSwitch(switches::kNoProxyServer);
- base::Value* mode_name = base::Value::CreateStringValue(
- ProxyPrefs::kAutoDetectProxyModeName);
+ base::Value* mode_name =
+ new base::StringValue(ProxyPrefs::kAutoDetectProxyModeName);
PolicyMap policy;
policy.Set(key::kProxyMode, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER,
mode_name, NULL);
@@ -204,8 +210,8 @@ TEST_F(ProxyPolicyTest, OverridesCommandLineNoProxy) {
TEST_F(ProxyPolicyTest, OverridesCommandLineAutoDetect) {
command_line_.AppendSwitch(switches::kProxyAutoDetect);
- base::Value* mode_name = base::Value::CreateStringValue(
- ProxyPrefs::kDirectProxyModeName);
+ base::Value* mode_name =
+ new base::StringValue(ProxyPrefs::kDirectProxyModeName);
PolicyMap policy;
policy.Set(key::kProxyMode, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER,
mode_name, NULL);
« no previous file with comments | « chrome/browser/prefs/pref_model_associator_unittest.cc ('k') | chrome/browser/prefs/session_startup_pref_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698