summaryrefslogtreecommitdiffstats
path: root/chrome/browser/ui/webui/options
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/ui/webui/options')
-rw-r--r--chrome/browser/ui/webui/options/browser_options_handler.cc7
-rw-r--r--chrome/browser/ui/webui/options/certificate_manager_handler.cc6
-rw-r--r--chrome/browser/ui/webui/options/content_settings_handler.cc40
-rw-r--r--chrome/browser/ui/webui/options/font_settings_handler.cc4
-rw-r--r--chrome/browser/ui/webui/options/managed_user_passphrase_handler.cc4
-rw-r--r--chrome/browser/ui/webui/options/preferences_browsertest.cc32
6 files changed, 52 insertions, 41 deletions
diff --git a/chrome/browser/ui/webui/options/browser_options_handler.cc b/chrome/browser/ui/webui/options/browser_options_handler.cc
index 48f4f60..54c5c31 100644
--- a/chrome/browser/ui/webui/options/browser_options_handler.cc
+++ b/chrome/browser/ui/webui/options/browser_options_handler.cc
@@ -1194,8 +1194,11 @@ void BrowserOptionsHandler::HandleSelectDownloadLocation(
ui::SelectFileDialog::SELECT_FOLDER,
l10n_util::GetStringUTF16(IDS_OPTIONS_DOWNLOADLOCATION_BROWSE_TITLE),
pref_service->GetFilePath(prefs::kDownloadDefaultDirectory),
- &info, 0, FILE_PATH_LITERAL(""),
- web_ui()->GetWebContents()->GetView()->GetTopLevelNativeWindow(), NULL);
+ &info,
+ 0,
+ base::FilePath::StringType(),
+ web_ui()->GetWebContents()->GetView()->GetTopLevelNativeWindow(),
+ NULL);
}
void BrowserOptionsHandler::FileSelected(const base::FilePath& path, int index,
diff --git a/chrome/browser/ui/webui/options/certificate_manager_handler.cc b/chrome/browser/ui/webui/options/certificate_manager_handler.cc
index c1e18da..f30eaec 100644
--- a/chrome/browser/ui/webui/options/certificate_manager_handler.cc
+++ b/chrome/browser/ui/webui/options/certificate_manager_handler.cc
@@ -326,7 +326,7 @@ void CertificateManagerHandler::GetLocalizedValues(
l10n_util::GetStringUTF16(IDS_CERT_MANAGER_DELETE_CA_DESCRIPTION));
localized_strings->SetString("unknownCertsTabDeleteConfirm",
l10n_util::GetStringUTF16(IDS_CERT_MANAGER_DELETE_UNKNOWN_FORMAT));
- localized_strings->SetString("unknownCertsTabDeleteImpact", "");
+ localized_strings->SetString("unknownCertsTabDeleteImpact", std::string());
// Certificate Restore overlay strings.
localized_strings->SetString("certificateRestorePasswordDescription",
@@ -614,7 +614,7 @@ void CertificateManagerHandler::ExportPersonalPasswordSelected(
chrome::UnlockCertSlotIfNecessary(
selected_cert_list_[0].get(),
chrome::kCryptoModulePasswordCertExport,
- "", // unused.
+ std::string(), // unused.
base::Bind(&CertificateManagerHandler::ExportPersonalSlotsUnlocked,
base::Unretained(this)));
}
@@ -723,7 +723,7 @@ void CertificateManagerHandler::ImportPersonalFileRead(
chrome::UnlockSlotsIfNecessary(
modules,
chrome::kCryptoModulePasswordCertImport,
- "", // unused.
+ std::string(), // unused.
base::Bind(&CertificateManagerHandler::ImportPersonalSlotUnlocked,
base::Unretained(this)));
}
diff --git a/chrome/browser/ui/webui/options/content_settings_handler.cc b/chrome/browser/ui/webui/options/content_settings_handler.cc
index 85249bc..549856b 100644
--- a/chrome/browser/ui/webui/options/content_settings_handler.cc
+++ b/chrome/browser/ui/webui/options/content_settings_handler.cc
@@ -123,7 +123,7 @@ std::string ContentSettingToString(ContentSetting setting) {
NOTREACHED();
}
- return "";
+ return std::string();
}
ContentSetting ContentSettingFromString(const std::string& name) {
@@ -151,8 +151,9 @@ DictionaryValue* GetExceptionForPage(
DictionaryValue* exception = new DictionaryValue();
exception->SetString(kOrigin, pattern.ToString());
exception->SetString(kEmbeddingOrigin,
- secondary_pattern == ContentSettingsPattern::Wildcard() ? "" :
- secondary_pattern.ToString());
+ secondary_pattern == ContentSettingsPattern::Wildcard()
+ ? std::string()
+ : secondary_pattern.ToString());
exception->SetString(kSetting, ContentSettingToString(setting));
exception->SetString(kSource, provider_name);
return exception;
@@ -604,7 +605,7 @@ void ContentSettingsHandler::UpdateMediaSettingsView() {
media_ui_settings.SetString("askText", "mediaStreamAsk");
media_ui_settings.SetString("blockText", "mediaStreamBlock");
media_ui_settings.SetBoolean("showBubble", false);
- media_ui_settings.SetString("bubbleText", "");
+ media_ui_settings.SetString("bubbleText", std::string());
web_ui()->CallJavascriptFunction("ContentSettings.updateMediaUI",
media_ui_settings);
@@ -1052,18 +1053,16 @@ void ContentSettingsHandler::RemoveMediaException(
mode == "normal" ? GetContentSettingsMap() :
GetOTRContentSettingsMap();
if (settings_map) {
- settings_map->SetWebsiteSetting(
- ContentSettingsPattern::FromString(pattern),
- ContentSettingsPattern::Wildcard(),
- CONTENT_SETTINGS_TYPE_MEDIASTREAM_MIC,
- "",
- NULL);
- settings_map->SetWebsiteSetting(
- ContentSettingsPattern::FromString(pattern),
- ContentSettingsPattern::Wildcard(),
- CONTENT_SETTINGS_TYPE_MEDIASTREAM_CAMERA,
- "",
- NULL);
+ settings_map->SetWebsiteSetting(ContentSettingsPattern::FromString(pattern),
+ ContentSettingsPattern::Wildcard(),
+ CONTENT_SETTINGS_TYPE_MEDIASTREAM_MIC,
+ std::string(),
+ NULL);
+ settings_map->SetWebsiteSetting(ContentSettingsPattern::FromString(pattern),
+ ContentSettingsPattern::Wildcard(),
+ CONTENT_SETTINGS_TYPE_MEDIASTREAM_CAMERA,
+ std::string(),
+ NULL);
}
}
@@ -1088,10 +1087,11 @@ void ContentSettingsHandler::RemoveExceptionFromHostContentSettingsMap(
if (settings_map) {
settings_map->SetWebsiteSetting(
ContentSettingsPattern::FromString(pattern),
- secondary_pattern.empty() ? ContentSettingsPattern::Wildcard() :
- ContentSettingsPattern::FromString(secondary_pattern),
+ secondary_pattern.empty()
+ ? ContentSettingsPattern::Wildcard()
+ : ContentSettingsPattern::FromString(secondary_pattern),
type,
- "",
+ std::string(),
NULL);
}
}
@@ -1259,7 +1259,7 @@ void ContentSettingsHandler::SetException(const ListValue* args) {
settings_map->SetContentSetting(ContentSettingsPattern::FromString(pattern),
ContentSettingsPattern::Wildcard(),
type,
- "",
+ std::string(),
ContentSettingFromString(setting));
}
}
diff --git a/chrome/browser/ui/webui/options/font_settings_handler.cc b/chrome/browser/ui/webui/options/font_settings_handler.cc
index 61f1524..558effc 100644
--- a/chrome/browser/ui/webui/options/font_settings_handler.cc
+++ b/chrome/browser/ui/webui/options/font_settings_handler.cc
@@ -188,8 +188,8 @@ void FontSettingsHandler::FontsListHasLoaded(
option->Append(new base::StringValue(has_rtl_chars ? "rtl" : "ltr"));
} else {
// Add empty name/value to indicate a separator item.
- option->Append(new base::StringValue(""));
- option->Append(new base::StringValue(""));
+ option->Append(new base::StringValue(std::string()));
+ option->Append(new base::StringValue(std::string()));
}
encoding_list.Append(option);
}
diff --git a/chrome/browser/ui/webui/options/managed_user_passphrase_handler.cc b/chrome/browser/ui/webui/options/managed_user_passphrase_handler.cc
index 2090137..f3aac91 100644
--- a/chrome/browser/ui/webui/options/managed_user_passphrase_handler.cc
+++ b/chrome/browser/ui/webui/options/managed_user_passphrase_handler.cc
@@ -110,8 +110,8 @@ void ManagedUserPassphraseHandler::IsPassphraseSet(
void ManagedUserPassphraseHandler::ResetPassphrase(
const base::ListValue* args) {
PrefService* pref_service = Profile::FromWebUI(web_ui())->GetPrefs();
- pref_service->SetString(prefs::kManagedModeLocalPassphrase, "");
- pref_service->SetString(prefs::kManagedModeLocalSalt, "");
+ pref_service->SetString(prefs::kManagedModeLocalPassphrase, std::string());
+ pref_service->SetString(prefs::kManagedModeLocalSalt, std::string());
}
void ManagedUserPassphraseHandler::SetLocalPassphrase(
diff --git a/chrome/browser/ui/webui/options/preferences_browsertest.cc b/chrome/browser/ui/webui/options/preferences_browsertest.cc
index 5839538..8dbc971 100644
--- a/chrome/browser/ui/webui/options/preferences_browsertest.cc
+++ b/chrome/browser/ui/webui/options/preferences_browsertest.cc
@@ -343,7 +343,7 @@ void PreferencesBrowserTest::VerifySetPref(const std::string& name,
std::string observed_json;
ASSERT_TRUE(content::ExecuteScriptAndExtractString(
render_view_host_, javascript.str(), &observed_json));
- VerifyObservedPref(observed_json, name, value, "", false, !commit);
+ VerifyObservedPref(observed_json, name, value, std::string(), false, !commit);
VerifyAndClearExpectations();
}
@@ -385,7 +385,7 @@ void PreferencesBrowserTest::VerifyCommit(const std::string& name,
void PreferencesBrowserTest::VerifySetCommit(const std::string& name,
const base::Value* value) {
ExpectSetCommit(name, value);
- VerifyCommit(name, value, "");
+ VerifyCommit(name, value, std::string());
VerifyAndClearExpectations();
}
@@ -476,8 +476,8 @@ IN_PROC_BROWSER_TEST_F(PreferencesBrowserTest, FetchPrefs) {
// Verify notifications when default values are in effect.
SetupJavaScriptTestEnvironment(pref_names_, &observed_json);
- VerifyObservedPrefs(observed_json, pref_names_, default_values_,
- "", false, false);
+ VerifyObservedPrefs(
+ observed_json, pref_names_, default_values_, std::string(), false, false);
// Verify notifications when recommended values are in effect.
SetUserPolicies(policy_names_, non_default_values_,
@@ -497,8 +497,12 @@ IN_PROC_BROWSER_TEST_F(PreferencesBrowserTest, FetchPrefs) {
ClearUserPolicies();
SetUserValues(pref_names_, non_default_values_);
SetupJavaScriptTestEnvironment(pref_names_, &observed_json);
- VerifyObservedPrefs(observed_json, pref_names_, non_default_values_,
- "", false, false);
+ VerifyObservedPrefs(observed_json,
+ pref_names_,
+ non_default_values_,
+ std::string(),
+ false,
+ false);
}
// Verifies that setting a user-modified pref value through the JavaScript
@@ -550,7 +554,7 @@ IN_PROC_BROWSER_TEST_F(PreferencesBrowserTest, DialogPrefsSetRollback) {
ASSERT_NO_FATAL_FAILURE(SetupJavaScriptTestEnvironment(pref_names_, NULL));
for (size_t i = 0; i < pref_names_.size(); ++i) {
VerifySetPref(pref_names_[i], types_[i], non_default_values_[i], false);
- VerifyRollback(pref_names_[i], default_values_[i], "");
+ VerifyRollback(pref_names_[i], default_values_[i], std::string());
}
// Verify behavior when recommended values are in effect.
@@ -592,7 +596,7 @@ IN_PROC_BROWSER_TEST_F(PreferencesBrowserTest, DialogPrefsClearRollback) {
ASSERT_NO_FATAL_FAILURE(SetupJavaScriptTestEnvironment(pref_names_, NULL));
for (size_t i = 0; i < pref_names_.size(); ++i) {
VerifyClearPref(pref_names_[i], default_values_[i], false);
- VerifyRollback(pref_names_[i], non_default_values_[i], "");
+ VerifyRollback(pref_names_[i], non_default_values_[i], std::string());
}
}
@@ -624,15 +628,19 @@ IN_PROC_BROWSER_TEST_F(PreferencesBrowserTest, NotificationsOnBackendChanges) {
StartObserving();
ClearUserPolicies();
FinishObserving(&observed_json);
- VerifyObservedPrefs(observed_json, pref_names_, default_values_,
- "", false, false);
+ VerifyObservedPrefs(
+ observed_json, pref_names_, default_values_, std::string(), false, false);
// Verify notifications when user-modified values come into effect.
StartObserving();
SetUserValues(pref_names_, non_default_values_);
FinishObserving(&observed_json);
- VerifyObservedPrefs(observed_json, pref_names_, non_default_values_,
- "", false, false);
+ VerifyObservedPrefs(observed_json,
+ pref_names_,
+ non_default_values_,
+ std::string(),
+ false,
+ false);
}
#if defined(OS_CHROMEOS)