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

Unified Diff: chrome/browser/content_settings/content_settings_policy_provider_unittest.cc

Issue 13145003: Rewrite std::string("") to std::string(), Linux edition. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Ugh Created 7 years, 8 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/content_settings/content_settings_policy_provider_unittest.cc
diff --git a/chrome/browser/content_settings/content_settings_policy_provider_unittest.cc b/chrome/browser/content_settings/content_settings_policy_provider_unittest.cc
index 23c43f8803551c7fd390c3572dadab339834c89e..37b718c993b8c8db7fdd0a91a0ebd919b18415b2 100644
--- a/chrome/browser/content_settings/content_settings_policy_provider_unittest.cc
+++ b/chrome/browser/content_settings/content_settings_policy_provider_unittest.cc
@@ -150,22 +150,34 @@ TEST_F(PolicyProviderTest, GettingManagedContentSettings) {
GURL google_url("http://mail.google.com");
EXPECT_EQ(CONTENT_SETTING_DEFAULT,
- GetContentSetting(
- &provider, youtube_url, youtube_url,
- CONTENT_SETTINGS_TYPE_COOKIES, "", false));
+ GetContentSetting(&provider,
+ youtube_url,
+ youtube_url,
+ CONTENT_SETTINGS_TYPE_COOKIES,
+ std::string(),
+ false));
EXPECT_EQ(NULL,
- GetContentSettingValue(
- &provider, youtube_url, youtube_url,
- CONTENT_SETTINGS_TYPE_COOKIES, "", false));
+ GetContentSettingValue(&provider,
+ youtube_url,
+ youtube_url,
+ CONTENT_SETTINGS_TYPE_COOKIES,
+ std::string(),
+ false));
EXPECT_EQ(CONTENT_SETTING_BLOCK,
- GetContentSetting(
- &provider, google_url, google_url,
- CONTENT_SETTINGS_TYPE_IMAGES, "", false));
+ GetContentSetting(&provider,
+ google_url,
+ google_url,
+ CONTENT_SETTINGS_TYPE_IMAGES,
+ std::string(),
+ false));
scoped_ptr<Value> value_ptr(
- GetContentSettingValue(
- &provider, google_url, google_url,
- CONTENT_SETTINGS_TYPE_IMAGES, "", false));
+ GetContentSettingValue(&provider,
+ google_url,
+ google_url,
+ CONTENT_SETTINGS_TYPE_IMAGES,
+ std::string(),
+ false));
int int_value = -1;
value_ptr->GetAsInteger(&int_value);
@@ -176,17 +188,19 @@ TEST_F(PolicyProviderTest, GettingManagedContentSettings) {
// SetWebsiteSetting does nothing.
scoped_ptr<base::Value> value_block(
Value::CreateIntegerValue(CONTENT_SETTING_BLOCK));
- bool owned = provider.SetWebsiteSetting(
- yt_url_pattern,
- yt_url_pattern,
- CONTENT_SETTINGS_TYPE_COOKIES,
- "",
- value_block.get());
+ bool owned = provider.SetWebsiteSetting(yt_url_pattern,
+ yt_url_pattern,
+ CONTENT_SETTINGS_TYPE_COOKIES,
+ std::string(),
+ value_block.get());
EXPECT_FALSE(owned);
EXPECT_EQ(CONTENT_SETTING_DEFAULT,
- GetContentSetting(
- &provider, youtube_url, youtube_url,
- CONTENT_SETTINGS_TYPE_COOKIES, "", false));
+ GetContentSetting(&provider,
+ youtube_url,
+ youtube_url,
+ CONTENT_SETTINGS_TYPE_COOKIES,
+ std::string(),
+ false));
provider.ShutdownOnUIThread();
}
@@ -213,9 +227,12 @@ TEST_F(PolicyProviderTest, ResourceIdentifier) {
// There is currently no policy support for resource content settings.
// Resource identifiers are simply ignored by the PolicyProvider.
EXPECT_EQ(CONTENT_SETTING_ALLOW,
- GetContentSetting(
- &provider, google_url, google_url,
- CONTENT_SETTINGS_TYPE_PLUGINS, "", false));
+ GetContentSetting(&provider,
+ google_url,
+ google_url,
+ CONTENT_SETTINGS_TYPE_PLUGINS,
+ std::string(),
+ false));
EXPECT_EQ(CONTENT_SETTING_DEFAULT,
GetContentSetting(
@@ -232,10 +249,14 @@ TEST_F(PolicyProviderTest, AutoSelectCertificateList) {
PolicyProvider provider(prefs);
GURL google_url("https://mail.google.com");
// Tests the default setting for auto selecting certificates
- EXPECT_EQ(NULL,
- GetContentSettingValue(
- &provider, google_url, google_url,
- CONTENT_SETTINGS_TYPE_AUTO_SELECT_CERTIFICATE, "", false));
+ EXPECT_EQ(
+ NULL,
+ GetContentSettingValue(&provider,
+ google_url,
+ google_url,
+ CONTENT_SETTINGS_TYPE_AUTO_SELECT_CERTIFICATE,
+ std::string(),
+ false));
// Set the content settings pattern list for origins to auto select
// certificates.
@@ -247,13 +268,21 @@ TEST_F(PolicyProviderTest, AutoSelectCertificateList) {
prefs->SetManagedPref(prefs::kManagedAutoSelectCertificateForUrls,
value);
GURL youtube_url("https://www.youtube.com");
- EXPECT_EQ(NULL,
- GetContentSettingValue(
- &provider, youtube_url, youtube_url,
- CONTENT_SETTINGS_TYPE_AUTO_SELECT_CERTIFICATE, "", false));
- scoped_ptr<Value> cert_filter(GetContentSettingValue(
- &provider, google_url, google_url,
- CONTENT_SETTINGS_TYPE_AUTO_SELECT_CERTIFICATE, "", false));
+ EXPECT_EQ(
+ NULL,
+ GetContentSettingValue(&provider,
+ youtube_url,
+ youtube_url,
+ CONTENT_SETTINGS_TYPE_AUTO_SELECT_CERTIFICATE,
+ std::string(),
+ false));
+ scoped_ptr<Value> cert_filter(
+ GetContentSettingValue(&provider,
+ google_url,
+ google_url,
+ CONTENT_SETTINGS_TYPE_AUTO_SELECT_CERTIFICATE,
+ std::string(),
+ false));
ASSERT_EQ(Value::TYPE_DICTIONARY, cert_filter->GetType());
DictionaryValue* dict_value =

Powered by Google App Engine
This is Rietveld 408576698