summaryrefslogtreecommitdiffstats
path: root/chrome/browser/prefs
diff options
context:
space:
mode:
authordcheng@chromium.org <dcheng@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-09 06:41:12 +0000
committerdcheng@chromium.org <dcheng@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-09 06:41:12 +0000
commit69d7f89d6a93e0fbce451960287066195c6d4ea0 (patch)
tree51c8c1f971d39d652ec38ed76070539bb33e85c7 /chrome/browser/prefs
parente3748a79b523a8d365d4a33ef986eebb4186fa78 (diff)
downloadchromium_src-69d7f89d6a93e0fbce451960287066195c6d4ea0.zip
chromium_src-69d7f89d6a93e0fbce451960287066195c6d4ea0.tar.gz
chromium_src-69d7f89d6a93e0fbce451960287066195c6d4ea0.tar.bz2
Revert "Rewrite std::string("") to std::string(), Linux edition."
This reverts commit e59558b78e8c6a1b0bd916a724724b638c3c91b6. Revert "Fix build after r193020." This reverts commit 558a35897f6b3ffbcaefde927c1f150b815d140a. Revert "Really fix build after r193020." This reverts commit e3748a79b523a8d365d4a33ef986eebb4186fa78. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@193030 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/prefs')
-rw-r--r--chrome/browser/prefs/command_line_pref_store_unittest.cc6
-rw-r--r--chrome/browser/prefs/proxy_config_dictionary.cc30
-rw-r--r--chrome/browser/prefs/proxy_policy_unittest.cc12
-rw-r--r--chrome/browser/prefs/session_startup_pref.cc2
4 files changed, 16 insertions, 34 deletions
diff --git a/chrome/browser/prefs/command_line_pref_store_unittest.cc b/chrome/browser/prefs/command_line_pref_store_unittest.cc
index 1e23383..5d2c939 100644
--- a/chrome/browser/prefs/command_line_pref_store_unittest.cc
+++ b/chrome/browser/prefs/command_line_pref_store_unittest.cc
@@ -116,7 +116,7 @@ TEST(CommandLinePrefStoreTest, MultipleSwitches) {
ASSERT_EQ(Value::TYPE_DICTIONARY, value->GetType());
ProxyConfigDictionary dict(static_cast<const DictionaryValue*>(value));
- std::string string_result;
+ std::string string_result = "";
ASSERT_TRUE(dict.GetProxyServer(&string_result));
EXPECT_EQ("proxy", string_result);
@@ -172,9 +172,9 @@ TEST(CommandLinePrefStoreTest, ManualProxyModeInference) {
store2->VerifyProxyMode(ProxyPrefs::MODE_PAC_SCRIPT);
CommandLine cl3(CommandLine::NO_PROGRAM);
- cl3.AppendSwitchASCII(switches::kProxyServer, std::string());
+ cl3.AppendSwitchASCII(switches::kProxyServer, "");
scoped_refptr<TestCommandLinePrefStore> store3 =
- new TestCommandLinePrefStore(&cl3);
+ new TestCommandLinePrefStore(&cl3);
store3->VerifyProxyMode(ProxyPrefs::MODE_DIRECT);
}
diff --git a/chrome/browser/prefs/proxy_config_dictionary.cc b/chrome/browser/prefs/proxy_config_dictionary.cc
index b6db822..a99fa7c 100644
--- a/chrome/browser/prefs/proxy_config_dictionary.cc
+++ b/chrome/browser/prefs/proxy_config_dictionary.cc
@@ -67,20 +67,12 @@ bool ProxyConfigDictionary::HasBypassList() const {
// static
DictionaryValue* ProxyConfigDictionary::CreateDirect() {
- return CreateDictionary(ProxyPrefs::MODE_DIRECT,
- std::string(),
- false,
- std::string(),
- std::string());
+ return CreateDictionary(ProxyPrefs::MODE_DIRECT, "", false, "", "");
}
// static
DictionaryValue* ProxyConfigDictionary::CreateAutoDetect() {
- return CreateDictionary(ProxyPrefs::MODE_AUTO_DETECT,
- std::string(),
- false,
- std::string(),
- std::string());
+ return CreateDictionary(ProxyPrefs::MODE_AUTO_DETECT, "", false, "", "");
}
// static
@@ -88,10 +80,7 @@ DictionaryValue* ProxyConfigDictionary::CreatePacScript(
const std::string& pac_url,
bool pac_mandatory) {
return CreateDictionary(ProxyPrefs::MODE_PAC_SCRIPT,
- pac_url,
- pac_mandatory,
- std::string(),
- std::string());
+ pac_url, pac_mandatory, "", "");
}
// static
@@ -99,11 +88,8 @@ DictionaryValue* ProxyConfigDictionary::CreateFixedServers(
const std::string& proxy_server,
const std::string& bypass_list) {
if (!proxy_server.empty()) {
- return CreateDictionary(ProxyPrefs::MODE_FIXED_SERVERS,
- std::string(),
- false,
- proxy_server,
- bypass_list);
+ return CreateDictionary(
+ ProxyPrefs::MODE_FIXED_SERVERS, "", false, proxy_server, bypass_list);
} else {
return CreateDirect();
}
@@ -111,11 +97,7 @@ DictionaryValue* ProxyConfigDictionary::CreateFixedServers(
// static
DictionaryValue* ProxyConfigDictionary::CreateSystem() {
- return CreateDictionary(ProxyPrefs::MODE_SYSTEM,
- std::string(),
- false,
- std::string(),
- std::string());
+ return CreateDictionary(ProxyPrefs::MODE_SYSTEM, "", false, "", "");
}
// static
diff --git a/chrome/browser/prefs/proxy_policy_unittest.cc b/chrome/browser/prefs/proxy_policy_unittest.cc
index 512e514..ec51894 100644
--- a/chrome/browser/prefs/proxy_policy_unittest.cc
+++ b/chrome/browser/prefs/proxy_policy_unittest.cc
@@ -68,9 +68,9 @@ void assertBypassList(const ProxyConfigDictionary& dict,
void assertProxyModeWithoutParams(const ProxyConfigDictionary& dict,
ProxyPrefs::ProxyMode proxy_mode) {
assertProxyMode(dict, proxy_mode);
- assertProxyServer(dict, std::string());
- assertPacUrl(dict, std::string());
- assertBypassList(dict, std::string());
+ assertProxyServer(dict, "");
+ assertPacUrl(dict, "");
+ assertBypassList(dict, "");
}
} // namespace
@@ -130,7 +130,7 @@ TEST_F(ProxyPolicyTest, OverridesCommandLineOptions) {
ProxyConfigDictionary dict(prefs->GetDictionary(prefs::kProxy));
assertProxyMode(dict, ProxyPrefs::MODE_FIXED_SERVERS);
assertProxyServer(dict, "789");
- assertPacUrl(dict, std::string());
+ assertPacUrl(dict, "");
assertBypassList(dict, "123");
// Try a second time time with the managed PrefStore in place, the
@@ -140,7 +140,7 @@ TEST_F(ProxyPolicyTest, OverridesCommandLineOptions) {
ProxyConfigDictionary dict2(prefs->GetDictionary(prefs::kProxy));
assertProxyMode(dict2, ProxyPrefs::MODE_FIXED_SERVERS);
assertProxyServer(dict2, "ghi");
- assertPacUrl(dict2, std::string());
+ assertPacUrl(dict2, "");
assertBypassList(dict2, "abc");
}
@@ -160,7 +160,7 @@ TEST_F(ProxyPolicyTest, OverridesUnrelatedCommandLineOptions) {
ProxyConfigDictionary dict(prefs->GetDictionary(prefs::kProxy));
assertProxyMode(dict, ProxyPrefs::MODE_FIXED_SERVERS);
assertProxyServer(dict, "789");
- assertPacUrl(dict, std::string());
+ assertPacUrl(dict, "");
assertBypassList(dict, "123");
// Try a second time time with the managed PrefStore in place, the
diff --git a/chrome/browser/prefs/session_startup_pref.cc b/chrome/browser/prefs/session_startup_pref.cc
index fbbf62f..d822cc0 100644
--- a/chrome/browser/prefs/session_startup_pref.cc
+++ b/chrome/browser/prefs/session_startup_pref.cc
@@ -45,7 +45,7 @@ void URLListToPref(const base::ListValue* url_list, SessionStartupPref* pref) {
for (size_t i = 0; i < url_list->GetSize(); ++i) {
std::string url_text;
if (url_list->GetString(i, &url_text)) {
- GURL fixed_url = URLFixerUpper::FixupURL(url_text, std::string());
+ GURL fixed_url = URLFixerUpper::FixupURL(url_text, "");
pref->urls.push_back(fixed_url);
}
}