summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoravi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-24 23:12:15 +0000
committeravi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-24 23:12:15 +0000
commitcc2a2a22ebb171ff4c1eb528b3f8d7e551512732 (patch)
tree9a010de6ab6210b43e4bc7cfa187ef3a80312a0b
parent8af3b22a0f64133ba32f4deaedc6540060520ff7 (diff)
downloadchromium_src-cc2a2a22ebb171ff4c1eb528b3f8d7e551512732.zip
chromium_src-cc2a2a22ebb171ff4c1eb528b3f8d7e551512732.tar.gz
chromium_src-cc2a2a22ebb171ff4c1eb528b3f8d7e551512732.tar.bz2
Revert 242455 "Revert 242449 "Update some uses of UTF conversion..."
> Revert 242449 "Update some uses of UTF conversions in chrome/bro..." > > > Update some uses of UTF conversions in chrome/browser to use the base:: namespace. > > > > BUG=330556 > > TEST=no change > > TBR=ben@chromium.org > > > > Review URL: https://codereview.chromium.org/120943002 > > TBR=avi@chromium.org > > Review URL: https://codereview.chromium.org/103853007 TBR=avi@chromium.org Review URL: https://codereview.chromium.org/120993002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@242463 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/background/background_contents_service.cc51
-rw-r--r--chrome/browser/background/background_contents_service_unittest.cc18
-rw-r--r--chrome/browser/background/background_mode_manager.cc2
-rw-r--r--chrome/browser/background/background_mode_manager_unittest.cc32
-rw-r--r--chrome/browser/background/background_mode_manager_win.cc2
-rw-r--r--chrome/browser/bookmarks/bookmark_codec_unittest.cc2
-rw-r--r--chrome/browser/bookmarks/bookmark_expanded_state_tracker_unittest.cc4
-rw-r--r--chrome/browser/bookmarks/bookmark_html_writer_unittest.cc35
-rw-r--r--chrome/browser/bookmarks/bookmark_index_unittest.cc16
-rw-r--r--chrome/browser/bookmarks/bookmark_model.cc3
-rw-r--r--chrome/browser/bookmarks/bookmark_model_unittest.cc5
-rw-r--r--chrome/browser/bookmarks/bookmark_node_data.cc2
-rw-r--r--chrome/browser/bookmarks/bookmark_node_data_unittest.cc2
-rw-r--r--chrome/browser/bookmarks/bookmark_node_data_views.cc2
-rw-r--r--chrome/browser/bookmarks/bookmark_tag_model_unittest.cc1
-rw-r--r--chrome/browser/bookmarks/bookmark_test_helpers.cc9
-rw-r--r--chrome/browser/bookmarks/bookmark_utils.cc5
-rw-r--r--chrome/browser/bookmarks/bookmark_utils_unittest.cc1
-rw-r--r--chrome/browser/browser_keyevents_browsertest.cc6
-rw-r--r--chrome/browser/browsing_data/browsing_data_database_helper.cc6
-rw-r--r--chrome/browser/browsing_data/browsing_data_database_helper_browsertest.cc4
-rw-r--r--chrome/browser/browsing_data/browsing_data_indexed_db_helper_browsertest.cc4
-rw-r--r--chrome/browser/browsing_data/browsing_data_indexed_db_helper_unittest.cc4
-rw-r--r--chrome/browser/browsing_data/browsing_data_remover_unittest.cc12
-rw-r--r--chrome/browser/browsing_data/cookies_tree_model.cc29
-rw-r--r--chrome/browser/browsing_data/cookies_tree_model_unittest.cc12
-rw-r--r--chrome/browser/captive_portal/captive_portal_browsertest.cc12
-rw-r--r--chrome/browser/certificate_manager_model.cc6
-rw-r--r--chrome/browser/character_encoding.cc4
-rw-r--r--chrome/browser/chrome_browser_main.cc2
-rw-r--r--chrome/browser/chrome_browser_main_win.cc9
-rw-r--r--chrome/browser/chrome_content_browser_client.cc2
-rw-r--r--chrome/browser/chrome_plugin_browsertest.cc11
-rw-r--r--chrome/browser/chrome_process_finder_win.cc2
-rw-r--r--chrome/browser/chromeos/attestation/platform_verification_dialog.cc2
-rw-r--r--chrome/browser/chromeos/drive/file_system_util_unittest.cc2
-rw-r--r--chrome/browser/chromeos/enrollment_dialog_view.cc2
-rw-r--r--chrome/browser/chromeos/extensions/device_local_account_management_policy_provider.cc4
-rw-r--r--chrome/browser/chromeos/extensions/echo_private_api.cc4
-rw-r--r--chrome/browser/chromeos/external_protocol_dialog.cc6
-rw-r--r--chrome/browser/chromeos/file_manager/desktop_notifications.cc8
-rw-r--r--chrome/browser/chromeos/file_manager/desktop_notifications_unittest.cc16
-rw-r--r--chrome/browser/chromeos/file_manager/file_browser_handlers.cc4
-rw-r--r--chrome/browser/chromeos/file_manager/open_util.cc2
-rw-r--r--chrome/browser/chromeos/first_run/drive_first_run_controller.cc8
-rw-r--r--chrome/browser/chromeos/input_method/accessibility.cc2
-rw-r--r--chrome/browser/chromeos/input_method/candidate_window_controller_impl.cc4
-rw-r--r--chrome/browser/chromeos/input_method/candidate_window_view.cc14
-rw-r--r--chrome/browser/chromeos/input_method/candidate_window_view_unittest.cc6
-rw-r--r--chrome/browser/chromeos/input_method/input_method_util.cc14
-rw-r--r--chrome/browser/chromeos/input_method/input_method_util_unittest.cc10
-rw-r--r--chrome/browser/chromeos/input_method/textinput_surroundingtext_browsertest.cc12
-rw-r--r--chrome/browser/chromeos/login/captive_portal_view.cc2
-rw-r--r--chrome/browser/chromeos/login/eula_browsertest.cc15
-rw-r--r--chrome/browser/chromeos/login/helper.cc4
-rw-r--r--chrome/browser/chromeos/login/language_list.cc6
-rw-r--r--chrome/browser/chromeos/login/login_display_host_impl.cc2
-rw-r--r--chrome/browser/chromeos/login/managed/supervised_user_creation_browsertest.cc10
-rw-r--r--chrome/browser/chromeos/login/proxy_settings_dialog.cc2
-rw-r--r--chrome/browser/chromeos/login/screen_locker_tester.cc2
-rw-r--r--chrome/browser/chromeos/login/supervised_user_manager_impl.cc2
-rw-r--r--chrome/browser/chromeos/login/user.cc4
-rw-r--r--chrome/browser/chromeos/login/user_manager_impl.cc4
-rw-r--r--chrome/browser/chromeos/login/version_info_updater.cc6
-rw-r--r--chrome/browser/chromeos/login/webui_login_view.cc2
-rw-r--r--chrome/browser/chromeos/login/wizard_controller_browsertest.cc6
-rw-r--r--chrome/browser/chromeos/memory/oom_priority_manager.cc12
-rw-r--r--chrome/browser/chromeos/options/cert_library.cc4
-rw-r--r--chrome/browser/chromeos/options/passphrase_textfield.cc4
-rw-r--r--chrome/browser/chromeos/options/vpn_config_view.cc10
-rw-r--r--chrome/browser/chromeos/options/wifi_config_view.cc23
-rw-r--r--chrome/browser/chromeos/options/wimax_config_view.cc9
-rw-r--r--chrome/browser/chromeos/policy/device_local_account_browsertest.cc12
-rw-r--r--chrome/browser/chromeos/policy/recommendation_restorer_unittest.cc4
-rw-r--r--chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos_unittest.cc2
-rw-r--r--chrome/browser/chromeos/power/peripheral_battery_observer.cc4
-rw-r--r--chrome/browser/chromeos/profiles/profile_list_chromeos_unittest.cc2
-rw-r--r--chrome/browser/chromeos/status/data_promo_notification.cc2
-rw-r--r--chrome/browser/chromeos/status/network_menu.cc22
-rw-r--r--chrome/browser/chromeos/system/ash_system_tray_delegate.cc4
-rw-r--r--chrome/browser/chromeos/system/timezone_util.cc8
-rw-r--r--chrome/browser/component_updater/pepper_flash_component_installer.cc2
-rw-r--r--chrome/browser/content_settings/content_settings_browsertest.cc24
-rw-r--r--chrome/browser/content_settings/content_settings_usages_state.cc2
-rw-r--r--chrome/browser/content_settings/tab_specific_content_settings.cc4
-rw-r--r--chrome/browser/content_settings/tab_specific_content_settings_unittest.cc6
-rw-r--r--chrome/browser/custom_handlers/protocol_handler_registry_browsertest.cc4
-rw-r--r--chrome/browser/custom_handlers/protocol_handler_registry_unittest.cc2
-rw-r--r--chrome/browser/custom_handlers/register_protocol_handler_infobar_delegate.cc6
89 files changed, 357 insertions, 319 deletions
diff --git a/chrome/browser/background/background_contents_service.cc b/chrome/browser/background/background_contents_service.cc
index b3c6a6a..337141f 100644
--- a/chrome/browser/background/background_contents_service.cc
+++ b/chrome/browser/background/background_contents_service.cc
@@ -119,9 +119,11 @@ class CrashNotificationDelegate : public NotificationDelegate {
// loading the background page.
BackgroundContentsService* service =
BackgroundContentsServiceFactory::GetForProfile(profile_);
- if (!service->GetAppBackgroundContents(ASCIIToUTF16(copied_extension_id)))
+ if (!service->GetAppBackgroundContents(
+ base::ASCIIToUTF16(copied_extension_id))) {
service->LoadBackgroundContentsForExtension(profile_,
copied_extension_id);
+ }
} else if (is_platform_app_) {
apps::AppLoadService::Get(profile_)->
RestartApplication(copied_extension_id);
@@ -192,7 +194,7 @@ void ShowBalloon(const Extension* extension, Profile* profile) {
const base::string16 message = l10n_util::GetStringFUTF16(
extension->is_app() ? IDS_BACKGROUND_CRASHED_APP_BALLOON_MESSAGE :
IDS_BACKGROUND_CRASHED_EXTENSION_BALLOON_MESSAGE,
- UTF8ToUTF16(extension->name()));
+ base::UTF8ToUTF16(extension->name()));
extension_misc::ExtensionIcons size(extension_misc::EXTENSION_ICON_MEDIUM);
extensions::ExtensionResource resource =
extensions::IconsInfo::GetIconResource(
@@ -372,8 +374,8 @@ void BackgroundContentsService::Observe(
extensions::ExtensionSystem::Get(profile)->extension_service();
// extension_service can be NULL when running tests.
if (extension_service) {
- const Extension* extension =
- extension_service->GetExtensionById(UTF16ToUTF8(appid), false);
+ const Extension* extension = extension_service->GetExtensionById(
+ base::UTF16ToUTF8(appid), false);
if (extension && BackgroundInfo::HasBackgroundPage(extension))
break;
}
@@ -388,7 +390,8 @@ void BackgroundContentsService::Observe(
BackgroundInfo::HasBackgroundPage(extension)) {
// If there is a background page specified in the manifest for a hosted
// app, then blow away registered urls in the pref.
- ShutdownAssociatedBackgroundContents(ASCIIToUTF16(extension->id()));
+ ShutdownAssociatedBackgroundContents(
+ base::ASCIIToUTF16(extension->id()));
ExtensionService* service =
extensions::ExtensionSystem::Get(profile)->extension_service();
@@ -398,8 +401,8 @@ void BackgroundContentsService::Observe(
// EXTENSIONS_READY callback.
LoadBackgroundContents(profile,
BackgroundInfo::GetBackgroundURL(extension),
- ASCIIToUTF16("background"),
- UTF8ToUTF16(extension->id()));
+ base::ASCIIToUTF16("background"),
+ base::UTF8ToUTF16(extension->id()));
}
}
@@ -445,8 +448,8 @@ void BackgroundContentsService::Observe(
case UnloadedExtensionInfo::REASON_TERMINATE: // Fall through.
case UnloadedExtensionInfo::REASON_UNINSTALL: // Fall through.
case UnloadedExtensionInfo::REASON_BLACKLIST:
- ShutdownAssociatedBackgroundContents(
- ASCIIToUTF16(content::Details<UnloadedExtensionInfo>(details)->
+ ShutdownAssociatedBackgroundContents(base::ASCIIToUTF16(
+ content::Details<UnloadedExtensionInfo>(details)->
extension->id()));
SendChangeNotification(content::Source<Profile>(source).ptr());
break;
@@ -459,14 +462,16 @@ void BackgroundContentsService::Observe(
// from the LOADED callback.
const Extension* extension =
content::Details<UnloadedExtensionInfo>(details)->extension;
- if (BackgroundInfo::HasBackgroundPage(extension))
- ShutdownAssociatedBackgroundContents(ASCIIToUTF16(extension->id()));
+ if (BackgroundInfo::HasBackgroundPage(extension)) {
+ ShutdownAssociatedBackgroundContents(
+ base::ASCIIToUTF16(extension->id()));
+ }
break;
}
default:
NOTREACHED();
- ShutdownAssociatedBackgroundContents(
- ASCIIToUTF16(content::Details<UnloadedExtensionInfo>(details)->
+ ShutdownAssociatedBackgroundContents(base::ASCIIToUTF16(
+ content::Details<UnloadedExtensionInfo>(details)->
extension->id()));
break;
}
@@ -544,8 +549,8 @@ void BackgroundContentsService::LoadBackgroundContentsForExtension(
if (extension && BackgroundInfo::HasBackgroundPage(extension)) {
LoadBackgroundContents(profile,
BackgroundInfo::GetBackgroundURL(extension),
- ASCIIToUTF16("background"),
- UTF8ToUTF16(extension->id()));
+ base::ASCIIToUTF16("background"),
+ base::UTF8ToUTF16(extension->id()));
return;
}
@@ -579,7 +584,7 @@ void BackgroundContentsService::LoadBackgroundContentsFromDictionary(
LoadBackgroundContents(profile,
GURL(url),
frame_name,
- UTF8ToUTF16(extension_id));
+ base::UTF8ToUTF16(extension_id));
}
void BackgroundContentsService::LoadBackgroundContentsFromManifests(
@@ -594,8 +599,8 @@ void BackgroundContentsService::LoadBackgroundContentsFromManifests(
BackgroundInfo::HasBackgroundPage(extension)) {
LoadBackgroundContents(profile,
BackgroundInfo::GetBackgroundURL(extension),
- ASCIIToUTF16("background"),
- UTF8ToUTF16(extension->id()));
+ base::ASCIIToUTF16("background"),
+ base::UTF8ToUTF16(extension->id()));
}
}
}
@@ -669,21 +674,23 @@ void BackgroundContentsService::RegisterBackgroundContents(
base::DictionaryValue* pref = update.Get();
const base::string16& appid = GetParentApplicationId(background_contents);
base::DictionaryValue* current;
- if (pref->GetDictionaryWithoutPathExpansion(UTF16ToUTF8(appid), &current))
+ if (pref->GetDictionaryWithoutPathExpansion(base::UTF16ToUTF8(appid),
+ &current)) {
return;
+ }
// No entry for this application yet, so add one.
base::DictionaryValue* dict = new base::DictionaryValue();
dict->SetString(kUrlKey, background_contents->GetURL().spec());
dict->SetString(kFrameNameKey, contents_map_[appid].frame_name);
- pref->SetWithoutPathExpansion(UTF16ToUTF8(appid), dict);
+ pref->SetWithoutPathExpansion(base::UTF16ToUTF8(appid), dict);
}
bool BackgroundContentsService::HasRegisteredBackgroundContents(
const base::string16& app_id) {
if (!prefs_)
return false;
- std::string app = UTF16ToUTF8(app_id);
+ std::string app = base::UTF16ToUTF8(app_id);
const base::DictionaryValue* contents =
prefs_->GetDictionary(prefs::kRegisteredBackgroundContents);
return contents->HasKey(app);
@@ -696,7 +703,7 @@ void BackgroundContentsService::UnregisterBackgroundContents(
DCHECK(IsTracked(background_contents));
const base::string16 appid = GetParentApplicationId(background_contents);
DictionaryPrefUpdate update(prefs_, prefs::kRegisteredBackgroundContents);
- update.Get()->RemoveWithoutPathExpansion(UTF16ToUTF8(appid), NULL);
+ update.Get()->RemoveWithoutPathExpansion(base::UTF16ToUTF8(appid), NULL);
}
void BackgroundContentsService::ShutdownAssociatedBackgroundContents(
diff --git a/chrome/browser/background/background_contents_service_unittest.cc b/chrome/browser/background/background_contents_service_unittest.cc
index fcb81cb..0148254 100644
--- a/chrome/browser/background/background_contents_service_unittest.cc
+++ b/chrome/browser/background/background_contents_service_unittest.cc
@@ -39,9 +39,9 @@ class BackgroundContentsServiceTest : public testing::Test {
// Returns the stored pref URL for the passed app id.
std::string GetPrefURLForApp(Profile* profile, const base::string16& appid) {
const base::DictionaryValue* pref = GetPrefs(profile);
- EXPECT_TRUE(pref->HasKey(UTF16ToUTF8(appid)));
+ EXPECT_TRUE(pref->HasKey(base::UTF16ToUTF8(appid)));
const base::DictionaryValue* value;
- pref->GetDictionaryWithoutPathExpansion(UTF16ToUTF8(appid), &value);
+ pref->GetDictionaryWithoutPathExpansion(base::UTF16ToUTF8(appid), &value);
std::string url;
value->GetString("url", &url);
return url;
@@ -53,16 +53,16 @@ class BackgroundContentsServiceTest : public testing::Test {
class MockBackgroundContents : public BackgroundContents {
public:
explicit MockBackgroundContents(Profile* profile)
- : appid_(ASCIIToUTF16("app_id")),
+ : appid_(base::ASCIIToUTF16("app_id")),
profile_(profile) {
}
MockBackgroundContents(Profile* profile, const std::string& id)
- : appid_(ASCIIToUTF16(id)),
+ : appid_(base::ASCIIToUTF16(id)),
profile_(profile) {
}
void SendOpenedNotification(BackgroundContentsService* service) {
- base::string16 frame_name = ASCIIToUTF16("background");
+ base::string16 frame_name = base::ASCIIToUTF16("background");
BackgroundContentsOpenedDetails details = {
this, frame_name, appid_ };
service->BackgroundContentsOpened(&details);
@@ -207,7 +207,8 @@ TEST_F(BackgroundContentsServiceTest, TestApplicationIDLinkage) {
BackgroundContentsServiceFactory::GetInstance()->
RegisterUserPrefsOnBrowserContextForTest(&profile);
- EXPECT_EQ(NULL, service.GetAppBackgroundContents(ASCIIToUTF16("appid")));
+ EXPECT_EQ(NULL,
+ service.GetAppBackgroundContents(base::ASCIIToUTF16("appid")));
MockBackgroundContents* contents = new MockBackgroundContents(&profile,
"appid");
scoped_ptr<MockBackgroundContents> contents2(
@@ -227,9 +228,10 @@ TEST_F(BackgroundContentsServiceTest, TestApplicationIDLinkage) {
EXPECT_EQ(1U, GetPrefs(&profile)->size());
contents2->Navigate(url2);
EXPECT_EQ(2U, GetPrefs(&profile)->size());
- service.ShutdownAssociatedBackgroundContents(ASCIIToUTF16("appid"));
+ service.ShutdownAssociatedBackgroundContents(base::ASCIIToUTF16("appid"));
EXPECT_FALSE(service.IsTracked(contents));
- EXPECT_EQ(NULL, service.GetAppBackgroundContents(ASCIIToUTF16("appid")));
+ EXPECT_EQ(NULL,
+ service.GetAppBackgroundContents(base::ASCIIToUTF16("appid")));
EXPECT_EQ(1U, GetPrefs(&profile)->size());
EXPECT_EQ(url2.spec(), GetPrefURLForApp(&profile, contents2->appid()));
}
diff --git a/chrome/browser/background/background_mode_manager.cc b/chrome/browser/background/background_mode_manager.cc
index 71711cc..0df7a3e 100644
--- a/chrome/browser/background/background_mode_manager.cc
+++ b/chrome/browser/background/background_mode_manager.cc
@@ -123,7 +123,7 @@ void BackgroundModeManager::BackgroundModeData::BuildProfileMenu(
// Check that the command ID is within the dynamic range.
DCHECK(command_id < IDC_MinimumLabelValue);
command_id_extension_vector_->push_back(position);
- menu->AddItem(command_id, UTF8ToUTF16(name));
+ menu->AddItem(command_id, base::UTF8ToUTF16(name));
if (icon)
menu->SetIcon(menu->GetItemCount() - 1, gfx::Image(*icon));
diff --git a/chrome/browser/background/background_mode_manager_unittest.cc b/chrome/browser/background/background_mode_manager_unittest.cc
index 9eb09d2..cdbe6bf 100644
--- a/chrome/browser/background/background_mode_manager_unittest.cc
+++ b/chrome/browser/background/background_mode_manager_unittest.cc
@@ -362,7 +362,7 @@ TEST_F(BackgroundModeManagerTest, ProfileInfoCacheObserver) {
profile1->GetPath(),
manager.GetBackgroundModeData(profile1)->name());
- EXPECT_EQ(UTF8ToUTF16("p1"),
+ EXPECT_EQ(base::UTF8ToUTF16("p1"),
manager.GetBackgroundModeData(profile1)->name());
TestingProfile* profile2 = profile_manager->CreateTestingProfile("p2");
@@ -370,14 +370,14 @@ TEST_F(BackgroundModeManagerTest, ProfileInfoCacheObserver) {
EXPECT_EQ(2, manager.NumberOfBackgroundModeData());
manager.OnProfileAdded(profile2->GetPath());
- EXPECT_EQ(UTF8ToUTF16("p2"),
+ EXPECT_EQ(base::UTF8ToUTF16("p2"),
manager.GetBackgroundModeData(profile2)->name());
manager.OnProfileWillBeRemoved(profile2->GetPath());
EXPECT_EQ(1, manager.NumberOfBackgroundModeData());
// Check that the background mode data we think is in the map actually is.
- EXPECT_EQ(UTF8ToUTF16("p1"),
+ EXPECT_EQ(base::UTF8ToUTF16("p1"),
manager.GetBackgroundModeData(profile1)->name());
}
@@ -497,19 +497,19 @@ TEST_F(BackgroundModeManagerTest, BackgroundMenuGeneration) {
bmd->BuildProfileMenu(submenu.get(), menu.get());
EXPECT_TRUE(
submenu->GetLabelAt(0) ==
- UTF8ToUTF16("Component Extension"));
+ base::UTF8ToUTF16("Component Extension"));
EXPECT_FALSE(submenu->IsCommandIdEnabled(submenu->GetCommandIdAt(0)));
EXPECT_TRUE(
submenu->GetLabelAt(1) ==
- UTF8ToUTF16("Component Extension with Options"));
+ base::UTF8ToUTF16("Component Extension with Options"));
EXPECT_TRUE(submenu->IsCommandIdEnabled(submenu->GetCommandIdAt(1)));
EXPECT_TRUE(
submenu->GetLabelAt(2) ==
- UTF8ToUTF16("Regular Extension"));
+ base::UTF8ToUTF16("Regular Extension"));
EXPECT_TRUE(submenu->IsCommandIdEnabled(submenu->GetCommandIdAt(2)));
EXPECT_TRUE(
submenu->GetLabelAt(3) ==
- UTF8ToUTF16("Regular Extension with Options"));
+ base::UTF8ToUTF16("Regular Extension with Options"));
EXPECT_TRUE(submenu->IsCommandIdEnabled(submenu->GetCommandIdAt(3)));
// We have to destroy the profile now because we created it with real thread
@@ -644,12 +644,12 @@ TEST_F(BackgroundModeManagerTest, BackgroundMenuGenerationMultipleProfile) {
EXPECT_TRUE(context_menu != NULL);
// Background Profile Enable Checks
- EXPECT_TRUE(context_menu->GetLabelAt(3) == UTF8ToUTF16("p1"));
+ EXPECT_TRUE(context_menu->GetLabelAt(3) == base::UTF8ToUTF16("p1"));
EXPECT_TRUE(
context_menu->IsCommandIdEnabled(context_menu->GetCommandIdAt(3)));
EXPECT_TRUE(context_menu->GetCommandIdAt(3) == 4);
- EXPECT_TRUE(context_menu->GetLabelAt(4) == UTF8ToUTF16("p2"));
+ EXPECT_TRUE(context_menu->GetLabelAt(4) == base::UTF8ToUTF16("p2"));
EXPECT_TRUE(
context_menu->IsCommandIdEnabled(context_menu->GetCommandIdAt(4)));
EXPECT_TRUE(context_menu->GetCommandIdAt(4) == 8);
@@ -659,28 +659,28 @@ TEST_F(BackgroundModeManagerTest, BackgroundMenuGenerationMultipleProfile) {
static_cast<StatusIconMenuModel*>(context_menu->GetSubmenuModelAt(3));
EXPECT_TRUE(
profile1_submenu->GetLabelAt(0) ==
- UTF8ToUTF16("Component Extension"));
+ base::UTF8ToUTF16("Component Extension"));
EXPECT_FALSE(
profile1_submenu->IsCommandIdEnabled(
profile1_submenu->GetCommandIdAt(0)));
EXPECT_TRUE(profile1_submenu->GetCommandIdAt(0) == 0);
EXPECT_TRUE(
profile1_submenu->GetLabelAt(1) ==
- UTF8ToUTF16("Component Extension with Options"));
+ base::UTF8ToUTF16("Component Extension with Options"));
EXPECT_TRUE(
profile1_submenu->IsCommandIdEnabled(
profile1_submenu->GetCommandIdAt(1)));
EXPECT_TRUE(profile1_submenu->GetCommandIdAt(1) == 1);
EXPECT_TRUE(
profile1_submenu->GetLabelAt(2) ==
- UTF8ToUTF16("Regular Extension"));
+ base::UTF8ToUTF16("Regular Extension"));
EXPECT_TRUE(
profile1_submenu->IsCommandIdEnabled(
profile1_submenu->GetCommandIdAt(2)));
EXPECT_TRUE(profile1_submenu->GetCommandIdAt(2) == 2);
EXPECT_TRUE(
profile1_submenu->GetLabelAt(3) ==
- UTF8ToUTF16("Regular Extension with Options"));
+ base::UTF8ToUTF16("Regular Extension with Options"));
EXPECT_TRUE(
profile1_submenu->IsCommandIdEnabled(
profile1_submenu->GetCommandIdAt(3)));
@@ -691,21 +691,21 @@ TEST_F(BackgroundModeManagerTest, BackgroundMenuGenerationMultipleProfile) {
static_cast<StatusIconMenuModel*>(context_menu->GetSubmenuModelAt(4));
EXPECT_TRUE(
profile2_submenu->GetLabelAt(0) ==
- UTF8ToUTF16("Component Extension"));
+ base::UTF8ToUTF16("Component Extension"));
EXPECT_FALSE(
profile2_submenu->IsCommandIdEnabled(
profile2_submenu->GetCommandIdAt(0)));
EXPECT_TRUE(profile2_submenu->GetCommandIdAt(0) == 5);
EXPECT_TRUE(
profile2_submenu->GetLabelAt(1) ==
- UTF8ToUTF16("Regular Extension"));
+ base::UTF8ToUTF16("Regular Extension"));
EXPECT_TRUE(
profile2_submenu->IsCommandIdEnabled(
profile2_submenu->GetCommandIdAt(1)));
EXPECT_TRUE(profile2_submenu->GetCommandIdAt(1) == 6);
EXPECT_TRUE(
profile2_submenu->GetLabelAt(2) ==
- UTF8ToUTF16("Regular Extension with Options"));
+ base::UTF8ToUTF16("Regular Extension with Options"));
EXPECT_TRUE(
profile2_submenu->IsCommandIdEnabled(
profile2_submenu->GetCommandIdAt(2)));
diff --git a/chrome/browser/background/background_mode_manager_win.cc b/chrome/browser/background/background_mode_manager_win.cc
index e8865e9..4dd0728 100644
--- a/chrome/browser/background/background_mode_manager_win.cc
+++ b/chrome/browser/background/background_mode_manager_win.cc
@@ -42,7 +42,7 @@ void BackgroundModeManager::DisplayAppInstalledNotification(
l10n_util::GetStringUTF16(IDS_BACKGROUND_APP_INSTALLED_BALLOON_TITLE),
l10n_util::GetStringFUTF16(
IDS_BACKGROUND_APP_INSTALLED_BALLOON_BODY,
- UTF8ToUTF16(extension->name()),
+ base::UTF8ToUTF16(extension->name()),
l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)));
}
diff --git a/chrome/browser/bookmarks/bookmark_codec_unittest.cc b/chrome/browser/bookmarks/bookmark_codec_unittest.cc
index c1022f8..4735779 100644
--- a/chrome/browser/bookmarks/bookmark_codec_unittest.cc
+++ b/chrome/browser/bookmarks/bookmark_codec_unittest.cc
@@ -17,6 +17,8 @@
#include "chrome/common/chrome_paths.h"
#include "testing/gtest/include/gtest/gtest.h"
+using base::ASCIIToUTF16;
+
namespace {
const char kUrl1Title[] = "url1";
diff --git a/chrome/browser/bookmarks/bookmark_expanded_state_tracker_unittest.cc b/chrome/browser/bookmarks/bookmark_expanded_state_tracker_unittest.cc
index 520f638..ba6ac07 100644
--- a/chrome/browser/bookmarks/bookmark_expanded_state_tracker_unittest.cc
+++ b/chrome/browser/bookmarks/bookmark_expanded_state_tracker_unittest.cc
@@ -60,7 +60,7 @@ TEST_F(BookmarkExpandedStateTrackerTest, SetExpandedNodes) {
// Add a folder and mark it expanded.
const BookmarkNode* n1 = model->AddFolder(model->bookmark_bar_node(), 0,
- ASCIIToUTF16("x"));
+ base::ASCIIToUTF16("x"));
nodes.insert(n1);
tracker->SetExpandedNodes(nodes);
EXPECT_EQ(nodes, tracker->GetExpandedNodes());
@@ -78,7 +78,7 @@ TEST_F(BookmarkExpandedStateTrackerTest, RemoveAll) {
// Add a folder and mark it expanded.
const BookmarkNode* n1 =
- model->AddFolder(model->bookmark_bar_node(), 0, ASCIIToUTF16("x"));
+ model->AddFolder(model->bookmark_bar_node(), 0, base::ASCIIToUTF16("x"));
BookmarkExpandedStateTracker::Nodes nodes;
nodes.insert(n1);
tracker->SetExpandedNodes(nodes);
diff --git a/chrome/browser/bookmarks/bookmark_html_writer_unittest.cc b/chrome/browser/bookmarks/bookmark_html_writer_unittest.cc
index 09bae52..c2331be 100644
--- a/chrome/browser/bookmarks/bookmark_html_writer_unittest.cc
+++ b/chrome/browser/bookmarks/bookmark_html_writer_unittest.cc
@@ -59,25 +59,26 @@ class BookmarkHTMLWriterTest : public testing::Test {
// testing.
base::string16 BookmarkEntryToString(const ImportedBookmarkEntry& entry) {
base::string16 result;
- result.append(ASCIIToUTF16("on_toolbar="));
+ result.append(base::ASCIIToUTF16("on_toolbar="));
if (entry.in_toolbar)
- result.append(ASCIIToUTF16("true"));
+ result.append(base::ASCIIToUTF16("true"));
else
- result.append(ASCIIToUTF16("false"));
+ result.append(base::ASCIIToUTF16("false"));
- result.append(ASCIIToUTF16(" url=") + UTF8ToUTF16(entry.url.spec()));
+ result.append(base::ASCIIToUTF16(" url=") +
+ base::UTF8ToUTF16(entry.url.spec()));
- result.append(ASCIIToUTF16(" path="));
+ result.append(base::ASCIIToUTF16(" path="));
for (size_t i = 0; i < entry.path.size(); ++i) {
if (i != 0)
- result.append(ASCIIToUTF16("/"));
+ result.append(base::ASCIIToUTF16("/"));
result.append(entry.path[i]);
}
- result.append(ASCIIToUTF16(" title="));
+ result.append(base::ASCIIToUTF16(" title="));
result.append(entry.title);
- result.append(ASCIIToUTF16(" time="));
+ result.append(base::ASCIIToUTF16(" time="));
result.append(base::TimeFormatFriendlyDateAndTime(entry.creation_time));
return result;
}
@@ -177,15 +178,15 @@ TEST_F(BookmarkHTMLWriterTest, Test) {
// Mobile
// url1
// <bookmark without a title.>
- base::string16 f1_title = ASCIIToUTF16("F\"&;<1\"");
- base::string16 f2_title = ASCIIToUTF16("F2");
- base::string16 f3_title = ASCIIToUTF16("F 3");
- base::string16 f4_title = ASCIIToUTF16("F4");
- base::string16 url1_title = ASCIIToUTF16("url 1");
- base::string16 url2_title = ASCIIToUTF16("url&2");
- base::string16 url3_title = ASCIIToUTF16("url\"3");
- base::string16 url4_title = ASCIIToUTF16("url\"&;");
- base::string16 unnamed_bookmark_title = ASCIIToUTF16("");
+ base::string16 f1_title = base::ASCIIToUTF16("F\"&;<1\"");
+ base::string16 f2_title = base::ASCIIToUTF16("F2");
+ base::string16 f3_title = base::ASCIIToUTF16("F 3");
+ base::string16 f4_title = base::ASCIIToUTF16("F4");
+ base::string16 url1_title = base::ASCIIToUTF16("url 1");
+ base::string16 url2_title = base::ASCIIToUTF16("url&2");
+ base::string16 url3_title = base::ASCIIToUTF16("url\"3");
+ base::string16 url4_title = base::ASCIIToUTF16("url\"&;");
+ base::string16 unnamed_bookmark_title = base::ASCIIToUTF16("");
GURL url1("http://url1");
GURL url1_favicon("http://url1/icon.ico");
GURL url2("http://url2");
diff --git a/chrome/browser/bookmarks/bookmark_index_unittest.cc b/chrome/browser/bookmarks/bookmark_index_unittest.cc
index 73ce918..f80c294 100644
--- a/chrome/browser/bookmarks/bookmark_index_unittest.cc
+++ b/chrome/browser/bookmarks/bookmark_index_unittest.cc
@@ -23,6 +23,8 @@
#include "content/public/test/test_browser_thread_bundle.h"
#include "testing/gtest/include/gtest/gtest.h"
+using base::ASCIIToUTF16;
+
class BookmarkIndexTest : public testing::Test {
public:
BookmarkIndexTest() : model_(new BookmarkModel(NULL)) {}
@@ -220,7 +222,7 @@ TEST_F(BookmarkIndexTest, HonorMax) {
// than the upper case string no match positions are returned.
TEST_F(BookmarkIndexTest, EmptyMatchOnMultiwideLowercaseString) {
const BookmarkNode* n1 = model_->AddURL(model_->other_node(), 0,
- WideToUTF16(L"\u0130 i"),
+ base::WideToUTF16(L"\u0130 i"),
GURL("http://www.google.com"));
std::vector<BookmarkTitleMatch> matches;
@@ -261,31 +263,31 @@ TEST_F(BookmarkIndexTest, GetResultsSortedByTypedCount) {
for (size_t i = 0; i < ARRAYSIZE_UNSAFE(data); ++i) {
history::URLRow info(data[i].url);
- info.set_title(UTF8ToUTF16(data[i].title));
+ info.set_title(base::UTF8ToUTF16(data[i].title));
info.set_typed_count(data[i].typed_count);
// Populate the InMemoryDatabase....
url_db->AddURL(info);
// Populate the BookmarkIndex.
- model->AddURL(model->other_node(), i, UTF8ToUTF16(data[i].title),
+ model->AddURL(model->other_node(), i, base::UTF8ToUTF16(data[i].title),
data[i].url);
}
// Check that the InMemoryDatabase stored the URLs properly.
history::URLRow result1;
url_db->GetRowForURL(data[0].url, &result1);
- EXPECT_EQ(data[0].title, UTF16ToUTF8(result1.title()));
+ EXPECT_EQ(data[0].title, base::UTF16ToUTF8(result1.title()));
history::URLRow result2;
url_db->GetRowForURL(data[1].url, &result2);
- EXPECT_EQ(data[1].title, UTF16ToUTF8(result2.title()));
+ EXPECT_EQ(data[1].title, base::UTF16ToUTF8(result2.title()));
history::URLRow result3;
url_db->GetRowForURL(data[2].url, &result3);
- EXPECT_EQ(data[2].title, UTF16ToUTF8(result3.title()));
+ EXPECT_EQ(data[2].title, base::UTF16ToUTF8(result3.title()));
history::URLRow result4;
url_db->GetRowForURL(data[3].url, &result4);
- EXPECT_EQ(data[3].title, UTF16ToUTF8(result4.title()));
+ EXPECT_EQ(data[3].title, base::UTF16ToUTF8(result4.title()));
// Populate match nodes.
std::vector<BookmarkTitleMatch> matches;
diff --git a/chrome/browser/bookmarks/bookmark_model.cc b/chrome/browser/bookmarks/bookmark_model.cc
index 5354d6c..926526e 100644
--- a/chrome/browser/bookmarks/bookmark_model.cc
+++ b/chrome/browser/bookmarks/bookmark_model.cc
@@ -74,7 +74,8 @@ void BookmarkNode::SetTitle(const base::string16& title) {
// Replace newlines and other problematic whitespace characters in
// folder/bookmark names with spaces.
base::string16 trimmed_title;
- base::ReplaceChars(title, kInvalidChars, ASCIIToUTF16(" "), &trimmed_title);
+ base::ReplaceChars(title, kInvalidChars, base::ASCIIToUTF16(" "),
+ &trimmed_title);
ui::TreeNode<BookmarkNode>::SetTitle(trimmed_title);
}
diff --git a/chrome/browser/bookmarks/bookmark_model_unittest.cc b/chrome/browser/bookmarks/bookmark_model_unittest.cc
index cb6d20f..8bf18f8 100644
--- a/chrome/browser/bookmarks/bookmark_model_unittest.cc
+++ b/chrome/browser/bookmarks/bookmark_model_unittest.cc
@@ -30,6 +30,7 @@
#include "ui/base/models/tree_node_model.h"
#include "url/gurl.h"
+using base::ASCIIToUTF16;
using base::Time;
using base::TimeDelta;
@@ -328,7 +329,7 @@ TEST_F(BookmarkModelTest, AddURL) {
TEST_F(BookmarkModelTest, AddURLWithUnicodeTitle) {
const BookmarkNode* root = model_.bookmark_bar_node();
- const base::string16 title(WideToUTF16(
+ const base::string16 title(base::WideToUTF16(
L"\u767e\u5ea6\u4e00\u4e0b\uff0c\u4f60\u5c31\u77e5\u9053"));
const GURL url("https://www.baidu.com/");
@@ -815,7 +816,7 @@ void PopulateNodeImpl(const std::vector<std::string>& description,
// likely means a space was forgotten.
DCHECK(element.find('[') == std::string::npos);
DCHECK(element.find(']') == std::string::npos);
- parent->Add(new TestNode(UTF8ToUTF16(element), BookmarkNode::URL),
+ parent->Add(new TestNode(base::UTF8ToUTF16(element), BookmarkNode::URL),
parent->child_count());
}
}
diff --git a/chrome/browser/bookmarks/bookmark_node_data.cc b/chrome/browser/bookmarks/bookmark_node_data.cc
index ec235b7..cb254af 100644
--- a/chrome/browser/bookmarks/bookmark_node_data.cc
+++ b/chrome/browser/bookmarks/bookmark_node_data.cc
@@ -175,7 +175,7 @@ void BookmarkNodeData::WriteToClipboard(ui::ClipboardType type) {
// want to clobber the X clipboard when the user copies out of the omnibox
// on Linux (on Windows and Mac, there is no difference between these
// functions).
- scw.WriteText(UTF8ToUTF16(url));
+ scw.WriteText(base::UTF8ToUTF16(url));
}
Pickle pickle;
diff --git a/chrome/browser/bookmarks/bookmark_node_data_unittest.cc b/chrome/browser/bookmarks/bookmark_node_data_unittest.cc
index 5ea0137..438f678 100644
--- a/chrome/browser/bookmarks/bookmark_node_data_unittest.cc
+++ b/chrome/browser/bookmarks/bookmark_node_data_unittest.cc
@@ -17,6 +17,8 @@
#include "ui/base/dragdrop/os_exchange_data.h"
#include "url/gurl.h"
+using base::ASCIIToUTF16;
+
class BookmarkNodeDataTest : public testing::Test {
public:
BookmarkNodeDataTest() : model_(NULL) {}
diff --git a/chrome/browser/bookmarks/bookmark_node_data_views.cc b/chrome/browser/bookmarks/bookmark_node_data_views.cc
index 9bc87ea..a41de32 100644
--- a/chrome/browser/bookmarks/bookmark_node_data_views.cc
+++ b/chrome/browser/bookmarks/bookmark_node_data_views.cc
@@ -28,7 +28,7 @@ void BookmarkNodeData::Write(Profile* profile, ui::OSExchangeData* data) const {
// clipboard.
if (elements.size() == 1 && elements[0].is_url) {
if (elements[0].url.SchemeIs(content::kJavaScriptScheme)) {
- data->SetString(UTF8ToUTF16(elements[0].url.spec()));
+ data->SetString(base::UTF8ToUTF16(elements[0].url.spec()));
} else {
data->SetURL(elements[0].url, elements[0].title);
}
diff --git a/chrome/browser/bookmarks/bookmark_tag_model_unittest.cc b/chrome/browser/bookmarks/bookmark_tag_model_unittest.cc
index ccdf19f..18fa57b 100644
--- a/chrome/browser/bookmarks/bookmark_tag_model_unittest.cc
+++ b/chrome/browser/bookmarks/bookmark_tag_model_unittest.cc
@@ -8,6 +8,7 @@
#include "chrome/browser/bookmarks/bookmark_tag_model_observer.h"
#include "testing/gtest/include/gtest/gtest.h"
+using base::ASCIIToUTF16;
namespace {
diff --git a/chrome/browser/bookmarks/bookmark_test_helpers.cc b/chrome/browser/bookmarks/bookmark_test_helpers.cc
index d2d0b6d..73898d8 100644
--- a/chrome/browser/bookmarks/bookmark_test_helpers.cc
+++ b/chrome/browser/bookmarks/bookmark_test_helpers.cc
@@ -69,14 +69,15 @@ std::string::size_type AddNodesFromString(BookmarkModel* model,
if (tell == folder_tell) {
node_name = node_name.substr(0, part_length - 2);
const BookmarkNode* new_node =
- model->AddFolder(node, index, UTF8ToUTF16(node_name));
+ model->AddFolder(node, index, base::UTF8ToUTF16(node_name));
end_pos = AddNodesFromString(model, new_node, model_string,
end_pos + 1);
} else {
std::string url_string("http://");
url_string += std::string(node_name.begin(), node_name.end());
url_string += ".com";
- model->AddURL(node, index, UTF8ToUTF16(node_name), GURL(url_string));
+ model->AddURL(
+ node, index, base::UTF8ToUTF16(node_name), GURL(url_string));
++end_pos;
}
++index;
@@ -117,10 +118,10 @@ std::string ModelStringFromNode(const BookmarkNode* node) {
for (int i = 0; i < child_count; ++i) {
const BookmarkNode* child = node->GetChild(i);
if (child->is_folder()) {
- child_string += UTF16ToUTF8(child->GetTitle()) + ":[ " +
+ child_string += base::UTF16ToUTF8(child->GetTitle()) + ":[ " +
ModelStringFromNode(child) + "] ";
} else {
- child_string += UTF16ToUTF8(child->GetTitle()) + " ";
+ child_string += base::UTF16ToUTF8(child->GetTitle()) + " ";
}
}
return child_string;
diff --git a/chrome/browser/bookmarks/bookmark_utils.cc b/chrome/browser/bookmarks/bookmark_utils.cc
index 7115a73..df92315 100644
--- a/chrome/browser/bookmarks/bookmark_utils.cc
+++ b/chrome/browser/bookmarks/bookmark_utils.cc
@@ -83,7 +83,8 @@ bool DoesBookmarkContainWords(const BookmarkNode* node,
const std::string& languages) {
return
DoesBookmarkTextContainWords(node->GetTitle(), words) ||
- DoesBookmarkTextContainWords(UTF8ToUTF16(node->url().spec()), words) ||
+ DoesBookmarkTextContainWords(
+ base::UTF8ToUTF16(node->url().spec()), words) ||
DoesBookmarkTextContainWords(net::FormatUrl(
node->url(), languages, net::kFormatUrlOmitNothing,
net::UnescapeRule::NORMAL, NULL, NULL, NULL), words);
@@ -252,7 +253,7 @@ void GetBookmarksMatchingProperties(BookmarkModel* model,
if (query.url) {
// Check against bare url spec and IDN-decoded url.
if (!node->is_url() ||
- !(UTF8ToUTF16(node->url().spec()) == *query.url ||
+ !(base::UTF8ToUTF16(node->url().spec()) == *query.url ||
net::FormatUrl(
node->url(), languages, net::kFormatUrlOmitNothing,
net::UnescapeRule::NORMAL, NULL, NULL, NULL) == *query.url)) {
diff --git a/chrome/browser/bookmarks/bookmark_utils_unittest.cc b/chrome/browser/bookmarks/bookmark_utils_unittest.cc
index 3b44b96..f859c5f 100644
--- a/chrome/browser/bookmarks/bookmark_utils_unittest.cc
+++ b/chrome/browser/bookmarks/bookmark_utils_unittest.cc
@@ -14,6 +14,7 @@
#include "ui/base/clipboard/clipboard.h"
#include "ui/base/clipboard/scoped_clipboard_writer.h"
+using base::ASCIIToUTF16;
using std::string;
namespace bookmark_utils {
diff --git a/chrome/browser/browser_keyevents_browsertest.cc b/chrome/browser/browser_keyevents_browsertest.cc
index d81468c..724dbea 100644
--- a/chrome/browser/browser_keyevents_browsertest.cc
+++ b/chrome/browser/browser_keyevents_browsertest.cc
@@ -210,7 +210,7 @@ class BrowserKeyEventsTest : public InProcessBrowserTest {
browser()->tab_strip_model()->GetWebContentsAt(tab_index),
kGetFocusedElementJS,
&actual));
- ASSERT_EQ(WideToUTF8(focused), actual);
+ ASSERT_EQ(base::WideToUTF8(focused), actual);
}
void SetFocusedElement(int tab_index, const wchar_t* focused) {
@@ -231,7 +231,7 @@ class BrowserKeyEventsTest : public InProcessBrowserTest {
browser()->tab_strip_model()->GetWebContentsAt(tab_index),
base::StringPrintf(kGetTextBoxValueJS, id),
&actual));
- ASSERT_EQ(WideToUTF8(value), actual);
+ ASSERT_EQ(base::WideToUTF8(value), actual);
}
void SetTextBoxValue(int tab_index, const wchar_t* id,
@@ -242,7 +242,7 @@ class BrowserKeyEventsTest : public InProcessBrowserTest {
browser()->tab_strip_model()->GetWebContentsAt(tab_index),
base::StringPrintf(kSetTextBoxValueJS, id, value),
&actual));
- ASSERT_EQ(WideToUTF8(value), actual);
+ ASSERT_EQ(base::WideToUTF8(value), actual);
}
void StartTest(int tab_index, int result_length) {
diff --git a/chrome/browser/browsing_data/browsing_data_database_helper.cc b/chrome/browser/browsing_data/browsing_data_database_helper.cc
index 891fe1b..29f65fd 100644
--- a/chrome/browser/browsing_data/browsing_data_database_helper.cc
+++ b/chrome/browser/browsing_data/browsing_data_database_helper.cc
@@ -91,8 +91,8 @@ void BrowsingDataDatabaseHelper::FetchDatabaseInfoOnFileThread() {
if (base::GetFileInfo(file_path, &file_info)) {
database_info_.push_back(DatabaseInfo(
identifier,
- UTF16ToUTF8(*db),
- UTF16ToUTF8(ori->GetDatabaseDescription(*db)),
+ base::UTF16ToUTF8(*db),
+ base::UTF16ToUTF8(ori->GetDatabaseDescription(*db)),
file_info.size,
file_info.last_modified));
}
@@ -120,7 +120,7 @@ void BrowsingDataDatabaseHelper::DeleteDatabaseOnFileThread(
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
if (!tracker_.get())
return;
- tracker_->DeleteDatabase(origin, UTF8ToUTF16(name),
+ tracker_->DeleteDatabase(origin, base::UTF8ToUTF16(name),
net::CompletionCallback());
}
diff --git a/chrome/browser/browsing_data/browsing_data_database_helper_browsertest.cc b/chrome/browser/browsing_data/browsing_data_database_helper_browsertest.cc
index 6037323..cc56690 100644
--- a/chrome/browser/browsing_data/browsing_data_database_helper_browsertest.cc
+++ b/chrome/browser/browsing_data/browsing_data_database_helper_browsertest.cc
@@ -33,8 +33,8 @@ class BrowsingDataDatabaseHelperTest : public InProcessBrowserTest {
webkit_database::DatabaseTracker* db_tracker =
BrowserContext::GetDefaultStoragePartition(browser()->profile())->
GetDatabaseTracker();
- base::string16 db_name = ASCIIToUTF16("db");
- base::string16 description = ASCIIToUTF16("db_description");
+ base::string16 db_name = base::ASCIIToUTF16("db");
+ base::string16 description = base::ASCIIToUTF16("db_description");
int64 size;
db_tracker->DatabaseOpened(kTestIdentifier1, db_name, description,
1, &size);
diff --git a/chrome/browser/browsing_data/browsing_data_indexed_db_helper_browsertest.cc b/chrome/browser/browsing_data/browsing_data_indexed_db_helper_browsertest.cc
index b851f50..049d4a8 100644
--- a/chrome/browser/browsing_data/browsing_data_indexed_db_helper_browsertest.cc
+++ b/chrome/browser/browsing_data/browsing_data_indexed_db_helper_browsertest.cc
@@ -27,7 +27,7 @@ typedef InProcessBrowserTest BrowsingDataIndexedDBHelperTest;
IN_PROC_BROWSER_TEST_F(BrowsingDataIndexedDBHelperTest, CannedAddIndexedDB) {
const GURL origin1("http://host1:1/");
const GURL origin2("http://host2:1/");
- const base::string16 description(ASCIIToUTF16("description"));
+ const base::string16 description(base::ASCIIToUTF16("description"));
scoped_refptr<CannedBrowsingDataIndexedDBHelper> helper(
new CannedBrowsingDataIndexedDBHelper());
@@ -52,7 +52,7 @@ IN_PROC_BROWSER_TEST_F(BrowsingDataIndexedDBHelperTest, CannedAddIndexedDB) {
IN_PROC_BROWSER_TEST_F(BrowsingDataIndexedDBHelperTest, CannedUnique) {
const GURL origin("http://host1:1/");
- const base::string16 description(ASCIIToUTF16("description"));
+ const base::string16 description(base::ASCIIToUTF16("description"));
scoped_refptr<CannedBrowsingDataIndexedDBHelper> helper(
new CannedBrowsingDataIndexedDBHelper());
diff --git a/chrome/browser/browsing_data/browsing_data_indexed_db_helper_unittest.cc b/chrome/browser/browsing_data/browsing_data_indexed_db_helper_unittest.cc
index ae5bcc4..fc59ce6 100644
--- a/chrome/browser/browsing_data/browsing_data_indexed_db_helper_unittest.cc
+++ b/chrome/browser/browsing_data/browsing_data_indexed_db_helper_unittest.cc
@@ -14,7 +14,7 @@ typedef testing::Test CannedBrowsingDataIndexedDBHelperTest;
TEST_F(CannedBrowsingDataIndexedDBHelperTest, Empty) {
const GURL origin("http://host1:1/");
- const base::string16 description(ASCIIToUTF16("description"));
+ const base::string16 description(base::ASCIIToUTF16("description"));
scoped_refptr<CannedBrowsingDataIndexedDBHelper> helper(
new CannedBrowsingDataIndexedDBHelper());
@@ -29,7 +29,7 @@ TEST_F(CannedBrowsingDataIndexedDBHelperTest, Empty) {
TEST_F(CannedBrowsingDataIndexedDBHelperTest, IgnoreExtensionsAndDevTools) {
const GURL origin1("chrome-extension://abcdefghijklmnopqrstuvwxyz/");
const GURL origin2("chrome-devtools://abcdefghijklmnopqrstuvwxyz/");
- const base::string16 description(ASCIIToUTF16("description"));
+ const base::string16 description(base::ASCIIToUTF16("description"));
scoped_refptr<CannedBrowsingDataIndexedDBHelper> helper(
new CannedBrowsingDataIndexedDBHelper());
diff --git a/chrome/browser/browsing_data/browsing_data_remover_unittest.cc b/chrome/browser/browsing_data/browsing_data_remover_unittest.cc
index 99c3f73..5c9c7e7 100644
--- a/chrome/browser/browsing_data/browsing_data_remover_unittest.cc
+++ b/chrome/browser/browsing_data/browsing_data_remover_unittest.cc
@@ -489,12 +489,12 @@ class RemoveAutofillTester : public autofill::PersonalDataManagerObserver {
autofill::AutofillProfile profile;
profile.set_guid(base::GenerateGUID());
profile.set_origin(kWebOrigin);
- profile.SetRawInfo(autofill::NAME_FIRST, ASCIIToUTF16("Bob"));
- profile.SetRawInfo(autofill::NAME_LAST, ASCIIToUTF16("Smith"));
- profile.SetRawInfo(autofill::ADDRESS_HOME_ZIP, ASCIIToUTF16("94043"));
+ profile.SetRawInfo(autofill::NAME_FIRST, base::ASCIIToUTF16("Bob"));
+ profile.SetRawInfo(autofill::NAME_LAST, base::ASCIIToUTF16("Smith"));
+ profile.SetRawInfo(autofill::ADDRESS_HOME_ZIP, base::ASCIIToUTF16("94043"));
profile.SetRawInfo(autofill::EMAIL_ADDRESS,
- ASCIIToUTF16("sue@example.com"));
- profile.SetRawInfo(autofill::COMPANY_NAME, ASCIIToUTF16("Company X"));
+ base::ASCIIToUTF16("sue@example.com"));
+ profile.SetRawInfo(autofill::COMPANY_NAME, base::ASCIIToUTF16("Company X"));
profiles.push_back(profile);
profile.set_guid(base::GenerateGUID());
@@ -509,7 +509,7 @@ class RemoveAutofillTester : public autofill::PersonalDataManagerObserver {
card.set_guid(base::GenerateGUID());
card.set_origin(kWebOrigin);
card.SetRawInfo(autofill::CREDIT_CARD_NUMBER,
- ASCIIToUTF16("1234-5678-9012-3456"));
+ base::ASCIIToUTF16("1234-5678-9012-3456"));
cards.push_back(card);
card.set_guid(base::GenerateGUID());
diff --git a/chrome/browser/browsing_data/cookies_tree_model.cc b/chrome/browser/browsing_data/cookies_tree_model.cc
index 184d587..a6c7372 100644
--- a/chrome/browser/browsing_data/cookies_tree_model.cc
+++ b/chrome/browser/browsing_data/cookies_tree_model.cc
@@ -279,7 +279,7 @@ CookiesTreeModel* CookieTreeNode::GetModel() const {
CookieTreeCookieNode::CookieTreeCookieNode(
std::list<net::CanonicalCookie>::iterator cookie)
- : CookieTreeNode(UTF8ToUTF16(cookie->Name())),
+ : CookieTreeNode(base::UTF8ToUTF16(cookie->Name())),
cookie_(cookie) {
}
@@ -302,7 +302,7 @@ CookieTreeNode::DetailedInfo CookieTreeCookieNode::GetDetailedInfo() const {
CookieTreeAppCacheNode::CookieTreeAppCacheNode(
const GURL& origin_url,
std::list<appcache::AppCacheInfo>::iterator appcache_info)
- : CookieTreeNode(UTF8ToUTF16(appcache_info->manifest_url.spec())),
+ : CookieTreeNode(base::UTF8ToUTF16(appcache_info->manifest_url.spec())),
origin_url_(origin_url),
appcache_info_(appcache_info) {
}
@@ -332,7 +332,7 @@ CookieTreeDatabaseNode::CookieTreeDatabaseNode(
std::list<BrowsingDataDatabaseHelper::DatabaseInfo>::iterator database_info)
: CookieTreeNode(database_info->database_name.empty() ?
l10n_util::GetStringUTF16(IDS_COOKIES_WEB_DATABASE_UNNAMED_NAME) :
- UTF8ToUTF16(database_info->database_name)),
+ base::UTF8ToUTF16(database_info->database_name)),
database_info_(database_info) {
}
@@ -358,7 +358,7 @@ CookieTreeNode::DetailedInfo CookieTreeDatabaseNode::GetDetailedInfo() const {
CookieTreeLocalStorageNode::CookieTreeLocalStorageNode(
std::list<BrowsingDataLocalStorageHelper::LocalStorageInfo>::iterator
local_storage_info)
- : CookieTreeNode(UTF8ToUTF16(local_storage_info->origin_url.spec())),
+ : CookieTreeNode(base::UTF8ToUTF16(local_storage_info->origin_url.spec())),
local_storage_info_(local_storage_info) {
}
@@ -386,7 +386,8 @@ CookieTreeLocalStorageNode::GetDetailedInfo() const {
CookieTreeSessionStorageNode::CookieTreeSessionStorageNode(
std::list<BrowsingDataLocalStorageHelper::LocalStorageInfo>::iterator
session_storage_info)
- : CookieTreeNode(UTF8ToUTF16(session_storage_info->origin_url.spec())),
+ : CookieTreeNode(
+ base::UTF8ToUTF16(session_storage_info->origin_url.spec())),
session_storage_info_(session_storage_info) {
}
@@ -411,7 +412,7 @@ CookieTreeSessionStorageNode::GetDetailedInfo() const {
CookieTreeIndexedDBNode::CookieTreeIndexedDBNode(
std::list<content::IndexedDBInfo>::iterator
indexed_db_info)
- : CookieTreeNode(UTF8ToUTF16(
+ : CookieTreeNode(base::UTF8ToUTF16(
indexed_db_info->origin_.spec())),
indexed_db_info_(indexed_db_info) {
}
@@ -438,7 +439,7 @@ CookieTreeNode::DetailedInfo CookieTreeIndexedDBNode::GetDetailedInfo() const {
CookieTreeFileSystemNode::CookieTreeFileSystemNode(
std::list<BrowsingDataFileSystemHelper::FileSystemInfo>::iterator
file_system_info)
- : CookieTreeNode(UTF8ToUTF16(
+ : CookieTreeNode(base::UTF8ToUTF16(
file_system_info->origin.spec())),
file_system_info_(file_system_info) {
}
@@ -464,7 +465,7 @@ CookieTreeNode::DetailedInfo CookieTreeFileSystemNode::GetDetailedInfo() const {
CookieTreeQuotaNode::CookieTreeQuotaNode(
std::list<BrowsingDataQuotaHelper::QuotaInfo>::iterator quota_info)
- : CookieTreeNode(UTF8ToUTF16(quota_info->host)),
+ : CookieTreeNode(base::UTF8ToUTF16(quota_info->host)),
quota_info_(quota_info) {
}
@@ -490,7 +491,7 @@ CookieTreeNode::DetailedInfo CookieTreeQuotaNode::GetDetailedInfo() const {
CookieTreeServerBoundCertNode::CookieTreeServerBoundCertNode(
net::ServerBoundCertStore::ServerBoundCertList::iterator cert)
- : CookieTreeNode(ASCIIToUTF16(cert->server_identifier())),
+ : CookieTreeNode(base::ASCIIToUTF16(cert->server_identifier())),
server_bound_cert_(cert) {
}
@@ -555,7 +556,8 @@ CookieTreeNode::DetailedInfo CookieTreeRootNode::GetDetailedInfo() const {
base::string16 CookieTreeHostNode::TitleForUrl(const GURL& url) {
const std::string file_origin_node_name(
std::string(chrome::kFileScheme) + content::kStandardSchemeSeparator);
- return UTF8ToUTF16(url.SchemeIsFile() ? file_origin_node_name : url.host());
+ return base::UTF8ToUTF16(url.SchemeIsFile() ? file_origin_node_name
+ : url.host());
}
CookieTreeHostNode::CookieTreeHostNode(const GURL& url)
@@ -1050,7 +1052,7 @@ void CookiesTreeModel::PopulateAppCacheInfoWithFilter(
notifier->StartBatchUpdate();
for (InfoByOrigin::iterator origin = container->appcache_info_.begin();
origin != container->appcache_info_.end(); ++origin) {
- base::string16 host_node_name = UTF8ToUTF16(origin->first.host());
+ base::string16 host_node_name = base::UTF8ToUTF16(origin->first.host());
if (filter.empty() ||
(host_node_name.find(filter) != base::string16::npos)) {
CookieTreeHostNode* host_node = root->GetOrCreateHostNode(origin->first);
@@ -1286,7 +1288,8 @@ void CookiesTreeModel::PopulateQuotaInfoWithFilter(
quota_info != container->quota_info_list_.end();
++quota_info) {
if (!filter.size() ||
- (UTF8ToUTF16(quota_info->host).find(filter) != base::string16::npos)) {
+ (base::UTF8ToUTF16(quota_info->host).find(filter) !=
+ base::string16::npos)) {
CookieTreeHostNode* host_node =
root->GetOrCreateHostNode(GURL("http://" + quota_info->host));
host_node->UpdateOrCreateQuotaNode(quota_info);
@@ -1303,7 +1306,7 @@ void CookiesTreeModel::PopulateFlashLSOInfoWithFilter(
if (container->flash_lso_domain_list_.empty())
return;
- std::string filter_utf8 = UTF16ToUTF8(filter);
+ std::string filter_utf8 = base::UTF16ToUTF8(filter);
notifier->StartBatchUpdate();
for (std::vector<std::string>::iterator it =
container->flash_lso_domain_list_.begin();
diff --git a/chrome/browser/browsing_data/cookies_tree_model_unittest.cc b/chrome/browser/browsing_data/cookies_tree_model_unittest.cc
index e1ac03a..b8dafda 100644
--- a/chrome/browser/browsing_data/cookies_tree_model_unittest.cc
+++ b/chrome/browser/browsing_data/cookies_tree_model_unittest.cc
@@ -1135,15 +1135,15 @@ TEST_F(CookiesTreeModelTest, FileSystemFilter) {
scoped_ptr<CookiesTreeModel> cookies_model(
CreateCookiesTreeModelWithInitialSample());
- cookies_model->UpdateSearchResults(ASCIIToUTF16("fshost1"));
+ cookies_model->UpdateSearchResults(base::ASCIIToUTF16("fshost1"));
EXPECT_EQ("http://fshost1:1/",
GetDisplayedFileSystems(cookies_model.get()));
- cookies_model->UpdateSearchResults(ASCIIToUTF16("fshost2"));
+ cookies_model->UpdateSearchResults(base::ASCIIToUTF16("fshost2"));
EXPECT_EQ("http://fshost2:2/",
GetDisplayedFileSystems(cookies_model.get()));
- cookies_model->UpdateSearchResults(ASCIIToUTF16("fshost3"));
+ cookies_model->UpdateSearchResults(base::ASCIIToUTF16("fshost3"));
EXPECT_EQ("http://fshost3:3/",
GetDisplayedFileSystems(cookies_model.get()));
@@ -1178,13 +1178,13 @@ TEST_F(CookiesTreeModelTest, CookiesFilter) {
mock_browsing_data_cookie_helper_->Notify();
EXPECT_EQ("A,B,C,D", GetDisplayedCookies(&cookies_model));
- cookies_model.UpdateSearchResults(base::string16(ASCIIToUTF16("foo")));
+ cookies_model.UpdateSearchResults(base::string16(base::ASCIIToUTF16("foo")));
EXPECT_EQ("B,C,D", GetDisplayedCookies(&cookies_model));
- cookies_model.UpdateSearchResults(base::string16(ASCIIToUTF16("2")));
+ cookies_model.UpdateSearchResults(base::string16(base::ASCIIToUTF16("2")));
EXPECT_EQ("A,C", GetDisplayedCookies(&cookies_model));
- cookies_model.UpdateSearchResults(base::string16(ASCIIToUTF16("foo3")));
+ cookies_model.UpdateSearchResults(base::string16(base::ASCIIToUTF16("foo3")));
EXPECT_EQ("D", GetDisplayedCookies(&cookies_model));
cookies_model.UpdateSearchResults(base::string16());
diff --git a/chrome/browser/captive_portal/captive_portal_browsertest.cc b/chrome/browser/captive_portal/captive_portal_browsertest.cc
index 413b12f..aecf168 100644
--- a/chrome/browser/captive_portal/captive_portal_browsertest.cc
+++ b/chrome/browser/captive_portal/captive_portal_browsertest.cc
@@ -660,7 +660,7 @@ void FailLoadsAfterLoginObserver::Observe(
ASSERT_EQ(1u, tabs_needing_navigation_.count(contents));
ASSERT_EQ(0u, tabs_navigated_to_final_destination_.count(contents));
- if (contents->GetTitle() != ASCIIToUTF16(kInternetConnectedTitle))
+ if (contents->GetTitle() != base::ASCIIToUTF16(kInternetConnectedTitle))
return;
tabs_navigated_to_final_destination_.insert(contents);
@@ -1319,8 +1319,8 @@ void CaptivePortalBrowserTest::NavigateLoginTab(Browser* browser,
// Do the navigation.
content::RenderViewHost* render_view_host =
tab_strip_model->GetActiveWebContents()->GetRenderViewHost();
- render_view_host->ExecuteJavascriptInWebFrame(base::string16(),
- ASCIIToUTF16("submitForm()"));
+ render_view_host->ExecuteJavascriptInWebFrame(
+ base::string16(), base::ASCIIToUTF16("submitForm()"));
portal_observer.WaitForResults(1);
navigation_observer.WaitForNavigations(1);
@@ -1367,8 +1367,8 @@ void CaptivePortalBrowserTest::Login(Browser* browser,
// Trigger a navigation.
content::RenderViewHost* render_view_host =
tab_strip_model->GetActiveWebContents()->GetRenderViewHost();
- render_view_host->ExecuteJavascriptInWebFrame(base::string16(),
- ASCIIToUTF16("submitForm()"));
+ render_view_host->ExecuteJavascriptInWebFrame(
+ base::string16(), base::ASCIIToUTF16("submitForm()"));
portal_observer.WaitForResults(1);
@@ -1723,7 +1723,7 @@ IN_PROC_BROWSER_TEST_F(CaptivePortalBrowserTest, SSLCertErrorLogin) {
tab_strip_model->GetActiveWebContents()->GetRenderViewHost();
render_view_host->ExecuteJavascriptInWebFrame(
base::string16(),
- ASCIIToUTF16("submitForm()"));
+ base::ASCIIToUTF16("submitForm()"));
// The captive portal tab navigation will trigger a captive portal check,
// and reloading the original tab will bring up the interstitial page again,
diff --git a/chrome/browser/certificate_manager_model.cc b/chrome/browser/certificate_manager_model.cc
index 4832cdb..609da35 100644
--- a/chrome/browser/certificate_manager_model.cc
+++ b/chrome/browser/certificate_manager_model.cc
@@ -72,7 +72,7 @@ base::string16 CertificateManagerModel::GetColumnText(
base::string16 rv;
switch (column) {
case COL_SUBJECT_NAME:
- rv = UTF8ToUTF16(
+ rv = base::UTF8ToUTF16(
x509_certificate_model::GetCertNameOrNickname(cert.os_cert_handle()));
// TODO(xiyuan): Put this into a column when we have js tree-table.
@@ -84,11 +84,11 @@ base::string16 CertificateManagerModel::GetColumnText(
}
break;
case COL_CERTIFICATE_STORE:
- rv = UTF8ToUTF16(
+ rv = base::UTF8ToUTF16(
x509_certificate_model::GetTokenName(cert.os_cert_handle()));
break;
case COL_SERIAL_NUMBER:
- rv = ASCIIToUTF16(x509_certificate_model::GetSerialNumberHexified(
+ rv = base::ASCIIToUTF16(x509_certificate_model::GetSerialNumberHexified(
cert.os_cert_handle(), std::string()));
break;
case COL_EXPIRES_ON:
diff --git a/chrome/browser/character_encoding.cc b/chrome/browser/character_encoding.cc
index 950ad4ae..3d78bae 100644
--- a/chrome/browser/character_encoding.cc
+++ b/chrome/browser/character_encoding.cc
@@ -265,7 +265,7 @@ base::string16 GetEncodingDisplayName(const std::string& encoding_name,
DCHECK(found_name != map->end());
return l10n_util::GetStringFUTF16(IDS_ENCODING_DISPLAY_TEMPLATE,
category_name,
- ASCIIToUTF16(found_name->second));
+ base::ASCIIToUTF16(found_name->second));
}
return category_name;
}
@@ -293,7 +293,7 @@ std::string GetEncodingCategoryStringByCommandId(int id) {
CharacterEncoding::EncodingInfo::EncodingInfo(int id)
: encoding_id(id) {
encoding_category_name =
- UTF8ToUTF16(GetEncodingCategoryStringByCommandId(id));
+ base::UTF8ToUTF16(GetEncodingCategoryStringByCommandId(id));
encoding_display_name = GetCanonicalEncodingDisplayNameByCommandId(id);
}
diff --git a/chrome/browser/chrome_browser_main.cc b/chrome/browser/chrome_browser_main.cc
index 1d046c5..d8cdf79 100644
--- a/chrome/browser/chrome_browser_main.cc
+++ b/chrome/browser/chrome_browser_main.cc
@@ -1176,7 +1176,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
case ProcessSingleton::PROCESS_NOTIFIED:
#if defined(OS_POSIX) && !defined(OS_MACOSX)
- printf("%s\n", base::SysWideToNativeMB(UTF16ToWide(
+ printf("%s\n", base::SysWideToNativeMB(base::UTF16ToWide(
l10n_util::GetStringUTF16(IDS_USED_EXISTING_BROWSER))).c_str());
#endif
// Having a differentiated return type for testing allows for tests to
diff --git a/chrome/browser/chrome_browser_main_win.cc b/chrome/browser/chrome_browser_main_win.cc
index 38ffa82..fe8965e 100644
--- a/chrome/browser/chrome_browser_main_win.cc
+++ b/chrome/browser/chrome_browser_main_win.cc
@@ -236,8 +236,9 @@ int ChromeBrowserMainPartsWin::PreCreateThreads() {
}
void ChromeBrowserMainPartsWin::ShowMissingLocaleMessageBox() {
- ui::MessageBox(NULL, ASCIIToUTF16(chrome_browser::kMissingLocaleDataMessage),
- ASCIIToUTF16(chrome_browser::kMissingLocaleDataTitle),
+ ui::MessageBox(NULL,
+ base::ASCIIToUTF16(chrome_browser::kMissingLocaleDataMessage),
+ base::ASCIIToUTF16(chrome_browser::kMissingLocaleDataTitle),
MB_OK | MB_ICONERROR | MB_TOPMOST);
}
@@ -281,10 +282,10 @@ void ChromeBrowserMainPartsWin::PrepareRestartOnCrashEnviroment(
base::i18n::AdjustStringForLocaleDirection(&adjusted_string);
dlg_strings.append(adjusted_string);
dlg_strings.push_back('|');
- dlg_strings.append(ASCIIToUTF16(
+ dlg_strings.append(base::ASCIIToUTF16(
base::i18n::IsRTL() ? env_vars::kRtlLocale : env_vars::kLtrLocale));
- env->SetVar(env_vars::kRestartInfo, UTF16ToUTF8(dlg_strings));
+ env->SetVar(env_vars::kRestartInfo, base::UTF16ToUTF8(dlg_strings));
}
// static
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc
index 70f73f7..cca4767 100644
--- a/chrome/browser/chrome_content_browser_client.cc
+++ b/chrome/browser/chrome_content_browser_client.cc
@@ -483,7 +483,7 @@ void FillFontFamilyMap(const PrefService* prefs,
std::string pref_name = base::StringPrintf("%s.%s", map_name, script);
std::string font_family = prefs->GetString(pref_name.c_str());
if (!font_family.empty())
- (*map)[script] = UTF8ToUTF16(font_family);
+ (*map)[script] = base::UTF8ToUTF16(font_family);
}
}
diff --git a/chrome/browser/chrome_plugin_browsertest.cc b/chrome/browser/chrome_plugin_browsertest.cc
index 4cddad3..3a23969 100644
--- a/chrome/browser/chrome_plugin_browsertest.cc
+++ b/chrome/browser/chrome_plugin_browsertest.cc
@@ -85,10 +85,11 @@ class ChromePluginTest : public InProcessBrowserTest {
static void LoadAndWait(Browser* window, const GURL& url, bool pass) {
content::WebContents* web_contents =
window->tab_strip_model()->GetActiveWebContents();
- base::string16 expected_title(ASCIIToUTF16(pass ? "OK" : "plugin_not_found"));
+ base::string16 expected_title(
+ base::ASCIIToUTF16(pass ? "OK" : "plugin_not_found"));
content::TitleWatcher title_watcher(web_contents, expected_title);
- title_watcher.AlsoWaitForTitle(ASCIIToUTF16("FAIL"));
- title_watcher.AlsoWaitForTitle(ASCIIToUTF16(
+ title_watcher.AlsoWaitForTitle(base::ASCIIToUTF16("FAIL"));
+ title_watcher.AlsoWaitForTitle(base::ASCIIToUTF16(
pass ? "plugin_not_found" : "OK"));
ui_test_utils::NavigateToURL(window, url);
ASSERT_EQ(expected_title, title_watcher.WaitAndGetTitle());
@@ -109,7 +110,7 @@ class ChromePluginTest : public InProcessBrowserTest {
std::vector<content::WebPluginInfo> plugins = GetPlugins();
for (std::vector<content::WebPluginInfo>::const_iterator it =
plugins.begin(); it != plugins.end(); ++it) {
- if (it->name == ASCIIToUTF16(content::kFlashPluginName))
+ if (it->name == base::ASCIIToUTF16(content::kFlashPluginName))
paths->push_back(it->path);
}
}
@@ -256,7 +257,7 @@ IN_PROC_BROWSER_TEST_F(ChromePluginTest, InstalledPlugins) {
for (size_t i = 0; i < ARRAYSIZE_UNSAFE(expected); ++i) {
size_t j = 0;
for (; j < plugins.size(); ++j) {
- if (plugins[j].name == ASCIIToUTF16(expected[i]))
+ if (plugins[j].name == base::ASCIIToUTF16(expected[i]))
break;
}
ASSERT_TRUE(j != plugins.size()) << "Didn't find " << expected[i];
diff --git a/chrome/browser/chrome_process_finder_win.cc b/chrome/browser/chrome_process_finder_win.cc
index 594d251..93116af 100644
--- a/chrome/browser/chrome_process_finder_win.cc
+++ b/chrome/browser/chrome_process_finder_win.cc
@@ -124,7 +124,7 @@ NotifyChromeResult AttemptToNotifyRunningChrome(HWND remote_window,
if (launch != base::win::METRO_SEARCH) {
LOG(WARNING) << "In metro mode, but and launch is " << launch;
} else {
- std::string query = EscapeQueryParamValue(UTF16ToUTF8(terms), true);
+ std::string query = EscapeQueryParamValue(base::UTF16ToUTF8(terms), true);
std::string url = base::StringPrintf(kSearchUrl, query.c_str());
SHELLEXECUTEINFOA sei = { sizeof(sei) };
sei.fMask = SEE_MASK_FLAG_LOG_USAGE;
diff --git a/chrome/browser/chromeos/attestation/platform_verification_dialog.cc b/chrome/browser/chromeos/attestation/platform_verification_dialog.cc
index e10877d..c4c1c66 100644
--- a/chrome/browser/chromeos/attestation/platform_verification_dialog.cc
+++ b/chrome/browser/chromeos/attestation/platform_verification_dialog.cc
@@ -39,7 +39,7 @@ void PlatformVerificationDialog::ShowDialog(
PlatformVerificationDialog* dialog = new PlatformVerificationDialog(
chrome::FindBrowserWithWebContents(web_contents),
- UTF8ToUTF16(origin),
+ base::UTF8ToUTF16(origin),
callback);
// Sets up the dialog widget and shows it.
diff --git a/chrome/browser/chromeos/drive/file_system_util_unittest.cc b/chrome/browser/chromeos/drive/file_system_util_unittest.cc
index f78865e..2be00f3 100644
--- a/chrome/browser/chromeos/drive/file_system_util_unittest.cc
+++ b/chrome/browser/chromeos/drive/file_system_util_unittest.cc
@@ -43,7 +43,7 @@ TEST(FileSystemUtilTest, FilePathToDriveURL) {
utf16_string.push_back(0x307b); // HIRAGANA_LETTER_HO
utf16_string.push_back(0x3052); // HIRAGANA_LETTER_GE
path = GetDriveMyDriveRootPath().Append(
- base::FilePath::FromUTF8Unsafe(UTF16ToUTF8(utf16_string) + ".txt"));
+ base::FilePath::FromUTF8Unsafe(base::UTF16ToUTF8(utf16_string) + ".txt"));
EXPECT_EQ(path, DriveURLToFilePath(FilePathToDriveURL(path)));
}
diff --git a/chrome/browser/chromeos/enrollment_dialog_view.cc b/chrome/browser/chromeos/enrollment_dialog_view.cc
index 3aaaa8d..47d6ebd 100644
--- a/chrome/browser/chromeos/enrollment_dialog_view.cc
+++ b/chrome/browser/chromeos/enrollment_dialog_view.cc
@@ -152,7 +152,7 @@ void EnrollmentDialogView::InitDialog() {
// Create the views and layout manager and set them up.
views::Label* label = new views::Label(
l10n_util::GetStringFUTF16(IDS_NETWORK_ENROLLMENT_HANDLER_INSTRUCTIONS,
- UTF8ToUTF16(network_name_)));
+ base::UTF8ToUTF16(network_name_)));
label->SetFont(ui::ResourceBundle::GetSharedInstance().GetFont(
ui::ResourceBundle::BaseFont));
label->SetHorizontalAlignment(gfx::ALIGN_LEFT);
diff --git a/chrome/browser/chromeos/extensions/device_local_account_management_policy_provider.cc b/chrome/browser/chromeos/extensions/device_local_account_management_policy_provider.cc
index 5e1899d..3fdb9fe 100644
--- a/chrome/browser/chromeos/extensions/device_local_account_management_policy_provider.cc
+++ b/chrome/browser/chromeos/extensions/device_local_account_management_policy_provider.cc
@@ -115,8 +115,8 @@ bool DeviceLocalAccountManagementPolicyProvider::UserMayLoad(
if (error) {
*error = l10n_util::GetStringFUTF16(
IDS_EXTENSION_CANT_INSTALL_IN_DEVICE_LOCAL_ACCOUNT,
- UTF8ToUTF16(extension->name()),
- UTF8ToUTF16(extension->id()));
+ base::UTF8ToUTF16(extension->name()),
+ base::UTF8ToUTF16(extension->id()));
}
return false;
}
diff --git a/chrome/browser/chromeos/extensions/echo_private_api.cc b/chrome/browser/chromeos/extensions/echo_private_api.cc
index 505ffc3..34915ea 100644
--- a/chrome/browser/chromeos/extensions/echo_private_api.cc
+++ b/chrome/browser/chromeos/extensions/echo_private_api.cc
@@ -259,8 +259,8 @@ void EchoPrivateGetUserConsentFunction::OnRedeemOffersAllowedChecked(
chromeos::EchoDialogView* dialog = new chromeos::EchoDialogView(this);
if (redeem_offers_allowed_) {
dialog->InitForEnabledEcho(
- UTF8ToUTF16(params->consent_requester.service_name),
- UTF8ToUTF16(params->consent_requester.origin));
+ base::UTF8ToUTF16(params->consent_requester.service_name),
+ base::UTF8ToUTF16(params->consent_requester.origin));
} else {
dialog->InitForDisabledEcho();
}
diff --git a/chrome/browser/chromeos/external_protocol_dialog.cc b/chrome/browser/chromeos/external_protocol_dialog.cc
index 30f10f2..5cc0362 100644
--- a/chrome/browser/chromeos/external_protocol_dialog.cc
+++ b/chrome/browser/chromeos/external_protocol_dialog.cc
@@ -95,13 +95,13 @@ ExternalProtocolDialog::ExternalProtocolDialog(WebContents* web_contents,
scheme_(url.scheme()) {
const int kMaxUrlWithoutSchemeSize = 256;
base::string16 elided_url_without_scheme;
- gfx::ElideString(ASCIIToUTF16(url.possibly_invalid_spec()),
+ gfx::ElideString(base::ASCIIToUTF16(url.possibly_invalid_spec()),
kMaxUrlWithoutSchemeSize, &elided_url_without_scheme);
views::MessageBoxView::InitParams params(
l10n_util::GetStringFUTF16(IDS_EXTERNAL_PROTOCOL_INFORMATION,
- ASCIIToUTF16(url.scheme() + ":"),
- elided_url_without_scheme) + ASCIIToUTF16("\n\n"));
+ base::ASCIIToUTF16(url.scheme() + ":"),
+ elided_url_without_scheme) + base::ASCIIToUTF16("\n\n"));
params.message_width = kMessageWidth;
message_box_view_ = new views::MessageBoxView(params);
message_box_view_->SetCheckBoxLabel(
diff --git a/chrome/browser/chromeos/file_manager/desktop_notifications.cc b/chrome/browser/chromeos/file_manager/desktop_notifications.cc
index 4675bdd..ef3e761 100644
--- a/chrome/browser/chromeos/file_manager/desktop_notifications.cc
+++ b/chrome/browser/chromeos/file_manager/desktop_notifications.cc
@@ -168,7 +168,7 @@ class DesktopNotifications::NotificationMessage {
ResourceBundle::GetSharedInstance().GetNativeImageNamed(
GetIconId(type));
// TODO(mukai): refactor here to invoke NotificationUIManager directly.
- const base::string16 replace_id = UTF8ToUTF16(notification_id);
+ const base::string16 replace_id = base::UTF8ToUTF16(notification_id);
DesktopNotificationService::AddIconNotification(
util::GetFileManagerBaseUrl(), GetTitle(type),
message, icon, replace_id,
@@ -257,19 +257,19 @@ void DesktopNotifications::ManageNotificationsOnMountCompleted(
l10n_util::GetStringUTF16(
IDS_MULTIPART_DEVICE_UNSUPPORTED_DEFAULT_MESSAGE) :
l10n_util::GetStringFUTF16(
- IDS_MULTIPART_DEVICE_UNSUPPORTED_MESSAGE, UTF8ToUTF16(label));
+ IDS_MULTIPART_DEVICE_UNSUPPORTED_MESSAGE, base::UTF8ToUTF16(label));
} else if (!success) {
// First device failed.
if (!is_unsupported) {
message = label.empty() ?
l10n_util::GetStringUTF16(IDS_DEVICE_UNKNOWN_DEFAULT_MESSAGE) :
l10n_util::GetStringFUTF16(IDS_DEVICE_UNKNOWN_MESSAGE,
- UTF8ToUTF16(label));
+ base::UTF8ToUTF16(label));
} else {
message = label.empty() ?
l10n_util::GetStringUTF16(IDS_DEVICE_UNSUPPORTED_DEFAULT_MESSAGE) :
l10n_util::GetStringFUTF16(IDS_DEVICE_UNSUPPORTED_MESSAGE,
- UTF8ToUTF16(label));
+ base::UTF8ToUTF16(label));
}
}
diff --git a/chrome/browser/chromeos/file_manager/desktop_notifications_unittest.cc b/chrome/browser/chromeos/file_manager/desktop_notifications_unittest.cc
index 7548d10..577c984 100644
--- a/chrome/browser/chromeos/file_manager/desktop_notifications_unittest.cc
+++ b/chrome/browser/chromeos/file_manager/desktop_notifications_unittest.cc
@@ -174,7 +174,7 @@ TEST(FileManagerMountNotificationsTest, UnsupportedDevice) {
EXPECT_EQ(notification_path, notifications.params()[1].path);
EXPECT_EQ(
l10n_util::GetStringFUTF16(IDS_DEVICE_UNSUPPORTED_MESSAGE,
- UTF8ToUTF16(device_label)),
+ base::UTF8ToUTF16(device_label)),
notifications.params()[1].message);
}
@@ -226,7 +226,7 @@ TEST(FileManagerMountNotificationsTest, UnsupportedWithUnknownParent) {
EXPECT_EQ(notification_path, notifications.params()[3].path);
EXPECT_EQ(
l10n_util::GetStringFUTF16(IDS_DEVICE_UNSUPPORTED_MESSAGE,
- UTF8ToUTF16(device_label)),
+ base::UTF8ToUTF16(device_label)),
notifications.params()[3].message);
}
@@ -266,7 +266,7 @@ TEST(FileManagerMountNotificationsTest, MountPartialSuccess) {
EXPECT_EQ(notification_path, notifications.params()[1].path);
EXPECT_EQ(
l10n_util::GetStringFUTF16(IDS_MULTIPART_DEVICE_UNSUPPORTED_MESSAGE,
- UTF8ToUTF16(device_label)),
+ base::UTF8ToUTF16(device_label)),
notifications.params()[1].message);
}
@@ -298,7 +298,7 @@ TEST(FileManagerMountNotificationsTest, Unknown) {
EXPECT_EQ(notification_path, notifications.params()[1].path);
EXPECT_EQ(
l10n_util::GetStringFUTF16(IDS_DEVICE_UNKNOWN_MESSAGE,
- UTF8ToUTF16(device_label)),
+ base::UTF8ToUTF16(device_label)),
notifications.params()[1].message);
}
@@ -331,7 +331,7 @@ TEST(FileManagerMountNotificationsTest, NonASCIILabel) {
EXPECT_EQ(notification_path, notifications.params()[1].path);
EXPECT_EQ(
l10n_util::GetStringFUTF16(IDS_DEVICE_UNKNOWN_MESSAGE,
- UTF8ToUTF16(device_label)),
+ base::UTF8ToUTF16(device_label)),
notifications.params()[1].message);
}
@@ -363,7 +363,7 @@ TEST(FileManagerMountNotificationsTest, MulitpleFail) {
EXPECT_EQ(notification_path, notifications.params()[1].path);
EXPECT_EQ(
l10n_util::GetStringFUTF16(IDS_DEVICE_UNKNOWN_MESSAGE,
- UTF8ToUTF16(device_label)),
+ base::UTF8ToUTF16(device_label)),
notifications.params()[1].message);
notifications.ManageNotificationsOnMountCompleted(
@@ -386,7 +386,7 @@ TEST(FileManagerMountNotificationsTest, MulitpleFail) {
EXPECT_EQ(notification_path, notifications.params()[3].path);
EXPECT_EQ(
l10n_util::GetStringFUTF16(IDS_DEVICE_UNKNOWN_MESSAGE,
- UTF8ToUTF16(device_label)),
+ base::UTF8ToUTF16(device_label)),
notifications.params()[3].message);
notifications.ManageNotificationsOnMountCompleted(
@@ -409,7 +409,7 @@ TEST(FileManagerMountNotificationsTest, MulitpleFail) {
EXPECT_EQ(notification_path, notifications.params()[5].path);
EXPECT_EQ(
l10n_util::GetStringFUTF16(IDS_MULTIPART_DEVICE_UNSUPPORTED_MESSAGE,
- UTF8ToUTF16(device_label)),
+ base::UTF8ToUTF16(device_label)),
notifications.params()[5].message);
notifications.ManageNotificationsOnMountCompleted(
diff --git a/chrome/browser/chromeos/file_manager/file_browser_handlers.cc b/chrome/browser/chromeos/file_manager/file_browser_handlers.cc
index 1ab6d56..8877a1c 100644
--- a/chrome/browser/chromeos/file_manager/file_browser_handlers.cc
+++ b/chrome/browser/chromeos/file_manager/file_browser_handlers.cc
@@ -80,10 +80,10 @@ const FileBrowserHandler* FindFileBrowserHandlerForActionId(
}
std::string EscapedUtf8ToLower(const std::string& str) {
- base::string16 utf16 = UTF8ToUTF16(
+ base::string16 utf16 = base::UTF8ToUTF16(
net::UnescapeURLComponent(str, net::UnescapeRule::NORMAL));
return net::EscapeUrlEncodedData(
- UTF16ToUTF8(base::i18n::ToLower(utf16)),
+ base::UTF16ToUTF8(base::i18n::ToLower(utf16)),
false /* do not replace space with plus */);
}
diff --git a/chrome/browser/chromeos/file_manager/open_util.cc b/chrome/browser/chromeos/file_manager/open_util.cc
index 825f56a..86952cb 100644
--- a/chrome/browser/chromeos/file_manager/open_util.cc
+++ b/chrome/browser/chromeos/file_manager/open_util.cc
@@ -58,7 +58,7 @@ void ShowWarningMessageBox(Profile* profile, const base::FilePath& file_path) {
browser ? browser->window()->GetNativeWindow() : NULL,
l10n_util::GetStringFUTF16(
IDS_FILE_BROWSER_ERROR_VIEWING_FILE_TITLE,
- UTF8ToUTF16(file_path.BaseName().value())),
+ base::UTF8ToUTF16(file_path.BaseName().value())),
l10n_util::GetStringUTF16(IDS_FILE_BROWSER_ERROR_VIEWING_FILE),
chrome::MESSAGE_BOX_TYPE_WARNING);
}
diff --git a/chrome/browser/chromeos/first_run/drive_first_run_controller.cc b/chrome/browser/chromeos/first_run/drive_first_run_controller.cc
index 766c6e6..2a55681 100644
--- a/chrome/browser/chromeos/first_run/drive_first_run_controller.cc
+++ b/chrome/browser/chromeos/first_run/drive_first_run_controller.cc
@@ -291,7 +291,7 @@ bool DriveWebContentsManager::ShouldCreateWebContents(
// Prevent redirection if background contents already exists.
if (background_contents_service->GetAppBackgroundContents(
- UTF8ToUTF16(app_id_))) {
+ base::UTF8ToUTF16(app_id_))) {
return false;
}
BackgroundContents* contents = background_contents_service
@@ -299,7 +299,7 @@ bool DriveWebContentsManager::ShouldCreateWebContents(
route_id,
profile_,
frame_name,
- ASCIIToUTF16(app_id_),
+ base::ASCIIToUTF16(app_id_),
partition_id,
session_storage_namespace);
@@ -318,7 +318,7 @@ void DriveWebContentsManager::Observe(
const content::NotificationSource& source,
const content::NotificationDetails& details) {
if (type == chrome::NOTIFICATION_BACKGROUND_CONTENTS_OPENED) {
- const std::string app_id = UTF16ToUTF8(
+ const std::string app_id = base::UTF16ToUTF8(
content::Details<BackgroundContentsOpenedDetails>(details)
->application_id);
if (app_id == app_id_)
@@ -370,7 +370,7 @@ void DriveFirstRunController::EnableOfflineMode() {
BackgroundContentsService* background_contents_service =
BackgroundContentsServiceFactory::GetForProfile(profile_);
if (background_contents_service->GetAppBackgroundContents(
- UTF8ToUTF16(drive_hosted_app_id_))) {
+ base::UTF8ToUTF16(drive_hosted_app_id_))) {
LOG(WARNING) << "Background page for Drive app already exists";
OnOfflineInit(false, OUTCOME_BACKGROUND_PAGE_EXISTS);
return;
diff --git a/chrome/browser/chromeos/input_method/accessibility.cc b/chrome/browser/chromeos/input_method/accessibility.cc
index 0dac232..5047d12 100644
--- a/chrome/browser/chromeos/input_method/accessibility.cc
+++ b/chrome/browser/chromeos/input_method/accessibility.cc
@@ -45,7 +45,7 @@ void Accessibility::InputMethodChanged(InputMethodManager* imm,
// Get the medium name of the changed input method (e.g. US, INTL, etc.)
const InputMethodDescriptor descriptor = imm_->GetCurrentInputMethod();
- const std::string medium_name = UTF16ToUTF8(
+ const std::string medium_name = base::UTF16ToUTF8(
imm_->GetInputMethodUtil()->GetInputMethodMediumName(descriptor));
AccessibilityAlertInfo event(ProfileManager::GetActiveUserProfile(),
diff --git a/chrome/browser/chromeos/input_method/candidate_window_controller_impl.cc b/chrome/browser/chromeos/input_method/candidate_window_controller_impl.cc
index 131fd50..41e2710 100644
--- a/chrome/browser/chromeos/input_method/candidate_window_controller_impl.cc
+++ b/chrome/browser/chromeos/input_method/candidate_window_controller_impl.cc
@@ -141,8 +141,8 @@ void CandidateWindowControllerImpl::ConvertLookupTableToInfolistEntry(
if (ibus_entry.description_title.empty() &&
ibus_entry.description_body.empty())
continue;
- InfolistEntry entry(UTF8ToUTF16(ibus_entry.description_title),
- UTF8ToUTF16(ibus_entry.description_body));
+ InfolistEntry entry(base::UTF8ToUTF16(ibus_entry.description_title),
+ base::UTF8ToUTF16(ibus_entry.description_body));
if (i == cursor_index_in_page) {
entry.highlighted = true;
*has_highlighted = true;
diff --git a/chrome/browser/chromeos/input_method/candidate_window_view.cc b/chrome/browser/chromeos/input_method/candidate_window_view.cc
index f2423f7..7efcdd5 100644
--- a/chrome/browser/chromeos/input_method/candidate_window_view.cc
+++ b/chrome/browser/chromeos/input_method/candidate_window_view.cc
@@ -75,12 +75,12 @@ views::View* WrapWithPadding(views::View* view, const gfx::Insets& insets) {
base::string16 CreateShortcutText(size_t index,
const CandidateWindow& candidate_window) {
if (index >= candidate_window.candidates().size())
- return UTF8ToUTF16("");
+ return base::string16();
std::string shortcut_text = candidate_window.candidates()[index].label;
if (!shortcut_text.empty() &&
candidate_window.orientation() != CandidateWindow::VERTICAL)
shortcut_text += '.';
- return UTF8ToUTF16(shortcut_text);
+ return base::UTF8ToUTF16(shortcut_text);
}
// Creates the shortcut label, and returns it (never returns NULL).
@@ -245,7 +245,7 @@ gfx::Size ComputeCandidateColumnSize(
const size_t index = start_from + i;
candidate_label->SetText(
- UTF8ToUTF16(candidate_window.candidates()[index].value));
+ base::UTF8ToUTF16(candidate_window.candidates()[index].value));
gfx::Size text_size = candidate_label->GetPreferredSize();
candidate_column_width = std::max(candidate_column_width,
text_size.width());
@@ -279,7 +279,7 @@ gfx::Size ComputeAnnotationColumnSize(
const size_t index = start_from + i;
annotation_label->SetText(
- UTF8ToUTF16(candidate_window.candidates()[index].annotation));
+ base::UTF8ToUTF16(candidate_window.candidates()[index].annotation));
gfx::Size text_size = annotation_label->GetPreferredSize();
annotation_column_width = std::max(annotation_column_width,
text_size.width());
@@ -318,7 +318,7 @@ class InformationTextArea : public HidableArea {
// Set the displayed text.
void SetText(const std::string& utf8_text) {
- label_->SetText(UTF8ToUTF16(utf8_text));
+ label_->SetText(base::UTF8ToUTF16(utf8_text));
}
protected:
@@ -745,8 +745,8 @@ void CandidateWindowView::UpdateCandidates(
if (candidate_index < new_candidate_window.candidates().size()) {
const CandidateWindow::Entry& entry =
new_candidate_window.candidates()[candidate_index];
- candidate_view->SetCandidateText(UTF8ToUTF16(entry.value));
- candidate_view->SetAnnotationText(UTF8ToUTF16(entry.annotation));
+ candidate_view->SetCandidateText(base::UTF8ToUTF16(entry.value));
+ candidate_view->SetAnnotationText(base::UTF8ToUTF16(entry.annotation));
candidate_view->SetRowEnabled(true);
candidate_view->SetInfolistIcon(!entry.description_title.empty());
} else {
diff --git a/chrome/browser/chromeos/input_method/candidate_window_view_unittest.cc b/chrome/browser/chromeos/input_method/candidate_window_view_unittest.cc
index 7702d1f..19b5a5a 100644
--- a/chrome/browser/chromeos/input_method/candidate_window_view_unittest.cc
+++ b/chrome/browser/chromeos/input_method/candidate_window_view_unittest.cc
@@ -68,9 +68,9 @@ class CandidateWindowViewTest : public views::ViewsTestBase {
const std::string& candidate,
const std::string& annotation,
const CandidateView* row) {
- EXPECT_EQ(shortcut, UTF16ToUTF8(row->shortcut_label_->text()));
- EXPECT_EQ(candidate, UTF16ToUTF8(row->candidate_label_->text()));
- EXPECT_EQ(annotation, UTF16ToUTF8(row->annotation_label_->text()));
+ EXPECT_EQ(shortcut, base::UTF16ToUTF8(row->shortcut_label_->text()));
+ EXPECT_EQ(candidate, base::UTF16ToUTF8(row->candidate_label_->text()));
+ EXPECT_EQ(annotation, base::UTF16ToUTF8(row->annotation_label_->text()));
}
};
diff --git a/chrome/browser/chromeos/input_method/input_method_util.cc b/chrome/browser/chromeos/input_method/input_method_util.cc
index 8bc71ac..2e62d5d 100644
--- a/chrome/browser/chromeos/input_method/input_method_util.cc
+++ b/chrome/browser/chromeos/input_method/input_method_util.cc
@@ -337,7 +337,7 @@ base::string16 InputMethodUtil::TranslateString(
if (TranslateStringInternal(english_string, &localized_string)) {
return localized_string;
}
- return UTF8ToUTF16(english_string);
+ return base::UTF8ToUTF16(english_string);
}
bool InputMethodUtil::IsValidInputMethodId(
@@ -380,7 +380,7 @@ std::string InputMethodUtil::GetInputMethodDisplayNameFromId(
base::string16 display_name;
if (!extension_ime_util::IsExtensionIME(input_method_id) &&
TranslateStringInternal(input_method_id, &display_name)) {
- return UTF16ToUTF8(display_name);
+ return base::UTF16ToUTF8(display_name);
}
// Return an empty string if the display name is not found.
return "";
@@ -395,7 +395,7 @@ base::string16 InputMethodUtil::GetInputMethodShortName(
// Check special cases first.
for (size_t i = 0; i < kMappingFromIdToIndicatorTextLen; ++i) {
if (kMappingFromIdToIndicatorText[i].input_method_id == input_method.id()) {
- text = UTF8ToUTF16(kMappingFromIdToIndicatorText[i].indicator_text);
+ text = base::UTF8ToUTF16(kMappingFromIdToIndicatorText[i].indicator_text);
break;
}
}
@@ -405,7 +405,7 @@ base::string16 InputMethodUtil::GetInputMethodShortName(
IsKeyboardLayout(input_method.id())) {
const size_t kMaxKeyboardLayoutNameLen = 2;
const base::string16 keyboard_layout =
- UTF8ToUTF16(GetKeyboardLayoutName(input_method.id()));
+ base::UTF8ToUTF16(GetKeyboardLayoutName(input_method.id()));
text = StringToUpperASCII(keyboard_layout).substr(
0, kMaxKeyboardLayoutNameLen);
}
@@ -420,7 +420,7 @@ base::string16 InputMethodUtil::GetInputMethodShortName(
const size_t kMaxLanguageNameLen = 2;
DCHECK(!input_method.language_codes().empty());
const std::string language_code = input_method.language_codes().at(0);
- text = StringToUpperASCII(UTF8ToUTF16(language_code)).substr(
+ text = StringToUpperASCII(base::UTF8ToUTF16(language_code)).substr(
0, kMaxLanguageNameLen);
}
DCHECK(!text.empty());
@@ -446,7 +446,7 @@ base::string16 InputMethodUtil::GetInputMethodLongName(
const InputMethodDescriptor& input_method) const {
if (!input_method.name().empty()) {
// If the descriptor has a name, use it.
- return UTF8ToUTF16(input_method.name());
+ return base::UTF8ToUTF16(input_method.name());
}
// We don't show language here. Name of keyboard layout or input method
@@ -470,7 +470,7 @@ base::string16 InputMethodUtil::GetInputMethodLongName(
const base::string16 language_name = delegate_->GetDisplayLanguageName(
language_code);
- text = language_name + UTF8ToUTF16(" - ") + text;
+ text = language_name + base::UTF8ToUTF16(" - ") + text;
}
DCHECK(!text.empty());
diff --git a/chrome/browser/chromeos/input_method/input_method_util_unittest.cc b/chrome/browser/chromeos/input_method/input_method_util_unittest.cc
index 9cb861b..2c1cc1d 100644
--- a/chrome/browser/chromeos/input_method/input_method_util_unittest.cc
+++ b/chrome/browser/chromeos/input_method/input_method_util_unittest.cc
@@ -16,6 +16,8 @@
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/base/l10n/l10n_util.h"
+using base::ASCIIToUTF16;
+
namespace chromeos {
extern const char* kExtensionImePrefix;
@@ -120,7 +122,7 @@ TEST_F(InputMethodUtilTest, GetInputMethodShortNameTest) {
}
{
InputMethodDescriptor desc = GetDesc("mozc-hangul", "us", "ko");
- EXPECT_EQ(UTF8ToUTF16("\xed\x95\x9c"),
+ EXPECT_EQ(base::UTF8ToUTF16("\xed\x95\x9c"),
util_.GetInputMethodShortName(desc));
}
{
@@ -157,12 +159,12 @@ TEST_F(InputMethodUtilTest, GetInputMethodShortNameTest) {
}
{
InputMethodDescriptor desc = GetDesc(pinyin_ime_id, "us", "zh-CN");
- EXPECT_EQ(UTF8ToUTF16("\xe6\x8b\xbc"),
+ EXPECT_EQ(base::UTF8ToUTF16("\xe6\x8b\xbc"),
util_.GetInputMethodShortName(desc));
}
{
InputMethodDescriptor desc = GetDesc(zhuyin_ime_id, "us", "zh-TW");
- EXPECT_EQ(UTF8ToUTF16("\xE6\xB3\xA8"),
+ EXPECT_EQ(base::UTF8ToUTF16("\xE6\xB3\xA8"),
util_.GetInputMethodShortName(desc));
}
}
@@ -478,7 +480,7 @@ TEST_F(InputMethodUtilTest, TestIBusInputMethodText) {
EXPECT_FALSE(display_name.empty())
<< "Invalid language code " << language_code;
// On error, GetDisplayNameForLocale() returns the |language_code| as-is.
- EXPECT_NE(language_code, UTF16ToUTF8(display_name))
+ EXPECT_NE(language_code, base::UTF16ToUTF8(display_name))
<< "Invalid language code " << language_code;
}
}
diff --git a/chrome/browser/chromeos/input_method/textinput_surroundingtext_browsertest.cc b/chrome/browser/chromeos/input_method/textinput_surroundingtext_browsertest.cc
index a56dc60..d8ac3f0 100644
--- a/chrome/browser/chromeos/input_method/textinput_surroundingtext_browsertest.cc
+++ b/chrome/browser/chromeos/input_method/textinput_surroundingtext_browsertest.cc
@@ -34,8 +34,8 @@ IN_PROC_BROWSER_TEST_F(TextInput_SurroundingTextChangedTest,
helper.WaitForTextInputStateChanged(ui::TEXT_INPUT_TYPE_TEXT_AREA);
EXPECT_EQ(ui::TEXT_INPUT_TYPE_TEXT_AREA, helper.GetTextInputType());
- const base::string16 sample_text1 = UTF8ToUTF16("abcde");
- const base::string16 sample_text2 = UTF8ToUTF16("fghij");
+ const base::string16 sample_text1 = base::UTF8ToUTF16("abcde");
+ const base::string16 sample_text2 = base::UTF8ToUTF16("fghij");
const base::string16 surrounding_text2 = sample_text1 + sample_text2;
gfx::Range expected_range1(5, 5);
gfx::Range expected_range2(10, 10);
@@ -71,7 +71,7 @@ IN_PROC_BROWSER_TEST_F(TextInput_SurroundingTextChangedTest,
helper.WaitForTextInputStateChanged(ui::TEXT_INPUT_TYPE_TEXT_AREA);
EXPECT_EQ(ui::TEXT_INPUT_TYPE_TEXT_AREA, helper.GetTextInputType());
- const base::string16 sample_text = UTF8ToUTF16("abcde");
+ const base::string16 sample_text = base::UTF8ToUTF16("abcde");
gfx::Range expected_range(5, 5);
ui::CompositionText composition_text;
@@ -109,13 +109,13 @@ IN_PROC_BROWSER_TEST_F(TextInput_SurroundingTextChangedTest,
helper.ClickElement("empty_textarea", tab);
helper.WaitForTextInputStateChanged(ui::TEXT_INPUT_TYPE_TEXT_AREA);
EXPECT_EQ(ui::TEXT_INPUT_TYPE_TEXT_AREA, helper.GetTextInputType());
- helper.WaitForSurroundingTextChanged(UTF8ToUTF16(""), zero_range);
+ helper.WaitForSurroundingTextChanged(base::string16(), zero_range);
EXPECT_TRUE(helper.GetSurroundingText().empty());
EXPECT_EQ(zero_range, helper.GetSelectionRange());
// Click textarea containing text, so expecting new surrounding text comes.
helper.ClickElement("filled_textarea", tab);
- const base::string16 expected_text = UTF8ToUTF16("abcde");
+ const base::string16 expected_text = base::UTF8ToUTF16("abcde");
const gfx::Range expected_range(5, 5);
helper.WaitForSurroundingTextChanged(expected_text, expected_range);
EXPECT_EQ(expected_text, helper.GetSurroundingText());
@@ -125,7 +125,7 @@ IN_PROC_BROWSER_TEST_F(TextInput_SurroundingTextChangedTest,
helper.ClickElement("empty_textarea", tab);
helper.WaitForTextInputStateChanged(ui::TEXT_INPUT_TYPE_TEXT_AREA);
EXPECT_EQ(ui::TEXT_INPUT_TYPE_TEXT_AREA, helper.GetTextInputType());
- helper.WaitForSurroundingTextChanged(UTF8ToUTF16(""), zero_range);
+ helper.WaitForSurroundingTextChanged(base::string16(), zero_range);
EXPECT_TRUE(helper.GetSurroundingText().empty());
EXPECT_EQ(zero_range, helper.GetSelectionRange());
}
diff --git a/chrome/browser/chromeos/login/captive_portal_view.cc b/chrome/browser/chromeos/login/captive_portal_view.cc
index e909ab6..7b3c709 100644
--- a/chrome/browser/chromeos/login/captive_portal_view.cc
+++ b/chrome/browser/chromeos/login/captive_portal_view.cc
@@ -55,7 +55,7 @@ base::string16 CaptivePortalView::GetWindowTitle() const {
std::string default_network_name =
default_network ? default_network->name() : std::string();
if (!default_network_name.empty()) {
- network_name = ASCIIToUTF16(default_network_name);
+ network_name = base::ASCIIToUTF16(default_network_name);
} else {
DLOG(ERROR)
<< "No active/default network, but captive portal window is shown.";
diff --git a/chrome/browser/chromeos/login/eula_browsertest.cc b/chrome/browser/chromeos/login/eula_browsertest.cc
index d75083c..eed79c3 100644
--- a/chrome/browser/chromeos/login/eula_browsertest.cc
+++ b/chrome/browser/chromeos/login/eula_browsertest.cc
@@ -72,7 +72,7 @@ IN_PROC_BROWSER_TEST_F(TermsOfServiceProcessBrowserTest, LoadOnline) {
content::WebContents* web_contents =
browser()->tab_strip_model()->GetActiveWebContents();
EXPECT_EQ(1, ui_test_utils::FindInPage(web_contents,
- ASCIIToUTF16(kFakeOnlineEULA),
+ base::ASCIIToUTF16(kFakeOnlineEULA),
true,
true,
NULL,
@@ -91,12 +91,13 @@ IN_PROC_BROWSER_TEST_F(TermsOfServiceProcessBrowserTest, LoadOffline) {
browser()->tab_strip_model()->GetActiveWebContents();
#if defined(GOOGLE_CHROME_BUILD)
- EXPECT_NE(0, ui_test_utils::FindInPage(web_contents,
- ASCIIToUTF16(kOfflineEULAWarning),
- true,
- true,
- NULL,
- NULL));
+ EXPECT_NE(0,
+ ui_test_utils::FindInPage(web_contents,
+ base::ASCIIToUTF16(kOfflineEULAWarning),
+ true,
+ true,
+ NULL,
+ NULL));
#else
std::string body;
ASSERT_TRUE(content::ExecuteScriptAndExtractString(
diff --git a/chrome/browser/chromeos/login/helper.cc b/chrome/browser/chromeos/login/helper.cc
index dd3b84c..82662c07 100644
--- a/chrome/browser/chromeos/login/helper.cc
+++ b/chrome/browser/chromeos/login/helper.cc
@@ -52,14 +52,14 @@ base::string16 NetworkStateHelper::GetCurrentNetworkName() const {
if (network) {
if (network->Matches(NetworkTypePattern::Ethernet()))
return l10n_util::GetStringUTF16(IDS_STATUSBAR_NETWORK_DEVICE_ETHERNET);
- return UTF8ToUTF16(network->name());
+ return base::UTF8ToUTF16(network->name());
}
network = nsh->ConnectingNetworkByType(NetworkTypePattern::NonVirtual());
if (network) {
if (network->Matches(NetworkTypePattern::Ethernet()))
return l10n_util::GetStringUTF16(IDS_STATUSBAR_NETWORK_DEVICE_ETHERNET);
- return UTF8ToUTF16(network->name());
+ return base::UTF8ToUTF16(network->name());
}
return base::string16();
}
diff --git a/chrome/browser/chromeos/login/language_list.cc b/chrome/browser/chromeos/login/language_list.cc
index cffa393..f6bf251 100644
--- a/chrome/browser/chromeos/login/language_list.cc
+++ b/chrome/browser/chromeos/login/language_list.cc
@@ -47,14 +47,14 @@ base::string16 LanguageList::GetLanguageNameAt(int index) const {
// and native_name without going back to translators.
std::string formatted_item;
base::SStringPrintf(&formatted_item, "%s - %s",
- UTF16ToUTF8(locale_name).c_str(),
- UTF16ToUTF8(native_name).c_str());
+ base::UTF16ToUTF8(locale_name).c_str(),
+ base::UTF16ToUTF8(native_name).c_str());
if (base::i18n::IsRTL())
// Somehow combo box (even with LAYOUTRTL flag) doesn't get this
// right so we add RTL BDO (U+202E) to set the direction
// explicitly.
formatted_item.insert(0, "\xE2\x80\xAE"); // U+202E = UTF-8 0xE280AE
- return UTF8ToUTF16(formatted_item);
+ return base::UTF8ToUTF16(formatted_item);
}
std::string LanguageList::GetLocaleFromIndex(int index) const {
diff --git a/chrome/browser/chromeos/login/login_display_host_impl.cc b/chrome/browser/chromeos/login/login_display_host_impl.cc
index dabfb28..6b10023 100644
--- a/chrome/browser/chromeos/login/login_display_host_impl.cc
+++ b/chrome/browser/chromeos/login/login_display_host_impl.cc
@@ -197,7 +197,7 @@ void ShowLoginWizardFinish(
// user has changed to during OOBE.
if (!timezone_name.empty()) {
chromeos::system::TimezoneSettings::GetInstance()->SetTimezoneFromID(
- UTF8ToUTF16(timezone_name));
+ base::UTF8ToUTF16(timezone_name));
}
}
diff --git a/chrome/browser/chromeos/login/managed/supervised_user_creation_browsertest.cc b/chrome/browser/chromeos/login/managed/supervised_user_creation_browsertest.cc
index 0a0c27c..bd1b35e 100644
--- a/chrome/browser/chromeos/login/managed/supervised_user_creation_browsertest.cc
+++ b/chrome/browser/chromeos/login/managed/supervised_user_creation_browsertest.cc
@@ -222,7 +222,7 @@ void SupervisedUserTest::CreateSupervisedUser() {
EXPECT_TRUE(registration_utility_stub_->register_was_called());
EXPECT_EQ(registration_utility_stub_->display_name(),
- UTF8ToUTF16(kSupervisedUserDisplayName));
+ base::UTF8ToUTF16(kSupervisedUserDisplayName));
registration_utility_stub_->RunSuccessCallback("token");
@@ -240,7 +240,8 @@ void SupervisedUserTest::SigninAsSupervisedUser() {
ASSERT_EQ(3UL, UserManager::Get()->GetUsers().size());
// Created supervised user have to be first in a list.
const User* user = UserManager::Get()->GetUsers().at(0);
- ASSERT_EQ(UTF8ToUTF16(kSupervisedUserDisplayName), user->display_name());
+ ASSERT_EQ(base::UTF8ToUTF16(kSupervisedUserDisplayName),
+ user->display_name());
LoginUser(user->email());
}
@@ -250,7 +251,8 @@ void SupervisedUserTest::RemoveSupervisedUser() {
ASSERT_EQ(3UL, UserManager::Get()->GetUsers().size());
// Created supervised user have to be first in a list.
const User* user = UserManager::Get()->GetUsers().at(0);
- ASSERT_EQ(UTF8ToUTF16(kSupervisedUserDisplayName), user->display_name());
+ ASSERT_EQ(base::UTF8ToUTF16(kSupervisedUserDisplayName),
+ user->display_name());
// Open pod menu.
JSExpect("!$('pod-row').pods[0].isActionBoxMenuActive");
@@ -366,7 +368,7 @@ IN_PROC_BROWSER_TEST_F(SupervisedUserTransactionCleanupTest,
EXPECT_TRUE(registration_utility_stub_->register_was_called());
EXPECT_EQ(registration_utility_stub_->display_name(),
- UTF8ToUTF16(kSupervisedUserDisplayName));
+ base::UTF8ToUTF16(kSupervisedUserDisplayName));
std::string user_id = registration_utility_stub_->managed_user_id();
// Make sure user is already in list.
diff --git a/chrome/browser/chromeos/login/proxy_settings_dialog.cc b/chrome/browser/chromeos/login/proxy_settings_dialog.cc
index 2da776b..6fc9521 100644
--- a/chrome/browser/chromeos/login/proxy_settings_dialog.cc
+++ b/chrome/browser/chromeos/login/proxy_settings_dialog.cc
@@ -77,7 +77,7 @@ ProxySettingsDialog::ProxySettingsDialog(const NetworkState& network,
}
SetDialogTitle(l10n_util::GetStringFUTF16(IDS_PROXY_PAGE_TITLE_FORMAT,
- ASCIIToUTF16(network_name)));
+ base::ASCIIToUTF16(network_name)));
}
ProxySettingsDialog::~ProxySettingsDialog() {
diff --git a/chrome/browser/chromeos/login/screen_locker_tester.cc b/chrome/browser/chromeos/login/screen_locker_tester.cc
index 9fbf003..4372f7f 100644
--- a/chrome/browser/chromeos/login/screen_locker_tester.cc
+++ b/chrome/browser/chromeos/login/screen_locker_tester.cc
@@ -121,7 +121,7 @@ class WebUIScreenLockerTester : public ScreenLockerTester {
void WebUIScreenLockerTester::SetPassword(const std::string& password) {
RenderViewHost()->ExecuteJavascriptInWebFrame(
base::string16(),
- ASCIIToUTF16(base::StringPrintf(
+ base::ASCIIToUTF16(base::StringPrintf(
"$('pod-row').pods[0].passwordElement.value = '%s';",
password.c_str())));
}
diff --git a/chrome/browser/chromeos/login/supervised_user_manager_impl.cc b/chrome/browser/chromeos/login/supervised_user_manager_impl.cc
index d335b8a..15132ea 100644
--- a/chrome/browser/chromeos/login/supervised_user_manager_impl.cc
+++ b/chrome/browser/chromeos/login/supervised_user_manager_impl.cc
@@ -189,7 +189,7 @@ base::string16 SupervisedUserManagerImpl::GetManagerDisplayName(
if (manager_names->GetStringWithoutPathExpansion(user_id, &result) &&
!result.empty())
return result;
- return UTF8ToUTF16(GetManagerDisplayEmail(user_id));
+ return base::UTF8ToUTF16(GetManagerDisplayEmail(user_id));
}
std::string SupervisedUserManagerImpl::GetManagerUserId(
diff --git a/chrome/browser/chromeos/login/user.cc b/chrome/browser/chromeos/login/user.cc
index df4d51c..c2df4bc 100644
--- a/chrome/browser/chromeos/login/user.cc
+++ b/chrome/browser/chromeos/login/user.cc
@@ -157,7 +157,7 @@ bool UserContext::operator==(const UserContext& context) const {
base::string16 User::GetDisplayName() const {
// Fallback to the email account name in case display name haven't been set.
return display_name_.empty() ?
- UTF8ToUTF16(GetAccountName(true)) :
+ base::UTF8ToUTF16(GetAccountName(true)) :
display_name_;
}
@@ -312,7 +312,7 @@ bool LocallyManagedUser::can_lock() const {
}
std::string LocallyManagedUser::display_email() const {
- return UTF16ToUTF8(display_name());
+ return base::UTF16ToUTF8(display_name());
}
RetailModeUser::RetailModeUser() : User(UserManager::kRetailModeUserName) {
diff --git a/chrome/browser/chromeos/login/user_manager_impl.cc b/chrome/browser/chromeos/login/user_manager_impl.cc
index 9264644..5c40771 100644
--- a/chrome/browser/chromeos/login/user_manager_impl.cc
+++ b/chrome/browser/chromeos/login/user_manager_impl.cc
@@ -1247,7 +1247,7 @@ void UserManagerImpl::RegularUserLoggedIn(const std::string& user_id) {
active_user_ = User::CreateRegularUser(user_id);
active_user_->set_oauth_token_status(LoadUserOAuthStatus(user_id));
SaveUserDisplayName(active_user_->email(),
- UTF8ToUTF16(active_user_->GetAccountName(true)));
+ base::UTF8ToUTF16(active_user_->GetAccountName(true)));
WallpaperManager::Get()->SetInitialUserWallpaper(user_id, true);
}
@@ -1585,7 +1585,7 @@ void UserManagerImpl::UpdatePublicAccountDisplayName(
}
// Set or clear the display name.
- SaveUserDisplayName(user_id, UTF8ToUTF16(display_name));
+ SaveUserDisplayName(user_id, base::UTF8ToUTF16(display_name));
}
UserFlow* UserManagerImpl::GetCurrentUserFlow() const {
diff --git a/chrome/browser/chromeos/login/version_info_updater.cc b/chrome/browser/chromeos/login/version_info_updater.cc
index 8461503..fbdd31c 100644
--- a/chrome/browser/chromeos/login/version_info_updater.cc
+++ b/chrome/browser/chromeos/login/version_info_updater.cc
@@ -96,8 +96,8 @@ void VersionInfoUpdater::UpdateVersionLabel() {
std::string label_text = l10n_util::GetStringFUTF8(
IDS_LOGIN_VERSION_LABEL_FORMAT,
l10n_util::GetStringUTF16(IDS_PRODUCT_NAME),
- UTF8ToUTF16(version_info.Version()),
- UTF8ToUTF16(version_text_));
+ base::UTF8ToUTF16(version_info.Version()),
+ base::UTF8ToUTF16(version_text_));
// Workaround over incorrect width calculation in old fonts.
// TODO(glotov): remove the following line when new fonts are used.
@@ -118,7 +118,7 @@ void VersionInfoUpdater::SetEnterpriseInfo(const std::string& domain_name) {
std::string enterprise_info;
enterprise_info = l10n_util::GetStringFUTF8(
IDS_DEVICE_OWNED_BY_NOTICE,
- UTF8ToUTF16(domain_name));
+ base::UTF8ToUTF16(domain_name));
delegate_->OnEnterpriseInfoUpdated(enterprise_info);
}
}
diff --git a/chrome/browser/chromeos/login/webui_login_view.cc b/chrome/browser/chromeos/login/webui_login_view.cc
index 49a93a9..95d87eb 100644
--- a/chrome/browser/chromeos/login/webui_login_view.cc
+++ b/chrome/browser/chromeos/login/webui_login_view.cc
@@ -409,7 +409,7 @@ void WebUILoginView::DidFailProvisionalLoad(
int error_code,
const base::string16& error_description,
content::RenderViewHost* render_view_host) {
- if (frame_unique_name != UTF8ToUTF16("gaia-frame"))
+ if (frame_unique_name != base::UTF8ToUTF16("gaia-frame"))
return;
base::FundamentalValue error_value(-error_code);
diff --git a/chrome/browser/chromeos/login/wizard_controller_browsertest.cc b/chrome/browser/chromeos/login/wizard_controller_browsertest.cc
index 6df0520..90a1e8c 100644
--- a/chrome/browser/chromeos/login/wizard_controller_browsertest.cc
+++ b/chrome/browser/chromeos/login/wizard_controller_browsertest.cc
@@ -166,14 +166,14 @@ IN_PROC_BROWSER_TEST_F(WizardControllerTest, SwitchLanguage) {
EXPECT_STREQ("en", icu::Locale::getDefault().getLanguage());
EXPECT_FALSE(base::i18n::IsRTL());
const std::wstring en_str =
- UTF16ToWide(l10n_util::GetStringUTF16(IDS_NETWORK_SELECTION_TITLE));
+ base::UTF16ToWide(l10n_util::GetStringUTF16(IDS_NETWORK_SELECTION_TITLE));
RunSwitchLanguageTest("fr", "fr", true);
EXPECT_EQ("fr", g_browser_process->GetApplicationLocale());
EXPECT_STREQ("fr", icu::Locale::getDefault().getLanguage());
EXPECT_FALSE(base::i18n::IsRTL());
const std::wstring fr_str =
- UTF16ToWide(l10n_util::GetStringUTF16(IDS_NETWORK_SELECTION_TITLE));
+ base::UTF16ToWide(l10n_util::GetStringUTF16(IDS_NETWORK_SELECTION_TITLE));
EXPECT_NE(en_str, fr_str);
@@ -182,7 +182,7 @@ IN_PROC_BROWSER_TEST_F(WizardControllerTest, SwitchLanguage) {
EXPECT_STREQ("ar", icu::Locale::getDefault().getLanguage());
EXPECT_TRUE(base::i18n::IsRTL());
const std::wstring ar_str =
- UTF16ToWide(l10n_util::GetStringUTF16(IDS_NETWORK_SELECTION_TITLE));
+ base::UTF16ToWide(l10n_util::GetStringUTF16(IDS_NETWORK_SELECTION_TITLE));
EXPECT_NE(fr_str, ar_str);
}
diff --git a/chrome/browser/chromeos/memory/oom_priority_manager.cc b/chrome/browser/chromeos/memory/oom_priority_manager.cc
index c8d9538..b19715f 100644
--- a/chrome/browser/chromeos/memory/oom_priority_manager.cc
+++ b/chrome/browser/chromeos/memory/oom_priority_manager.cc
@@ -227,13 +227,13 @@ std::vector<base::string16> OomPriorityManager::GetTabTitles() {
str.reserve(4096);
int score = pid_to_oom_score_[it->renderer_handle];
str += base::IntToString16(score);
- str += ASCIIToUTF16(" - ");
+ str += base::ASCIIToUTF16(" - ");
str += it->title;
- str += ASCIIToUTF16(it->is_app ? " app" : "");
- str += ASCIIToUTF16(it->is_reloadable_ui ? " reloadable_ui" : "");
- str += ASCIIToUTF16(it->is_playing_audio ? " playing_audio" : "");
- str += ASCIIToUTF16(it->is_pinned ? " pinned" : "");
- str += ASCIIToUTF16(it->is_discarded ? " discarded" : "");
+ str += base::ASCIIToUTF16(it->is_app ? " app" : "");
+ str += base::ASCIIToUTF16(it->is_reloadable_ui ? " reloadable_ui" : "");
+ str += base::ASCIIToUTF16(it->is_playing_audio ? " playing_audio" : "");
+ str += base::ASCIIToUTF16(it->is_pinned ? " pinned" : "");
+ str += base::ASCIIToUTF16(it->is_discarded ? " discarded" : "");
titles.push_back(str);
}
return titles;
diff --git a/chrome/browser/chromeos/options/cert_library.cc b/chrome/browser/chromeos/options/cert_library.cc
index fe375ea..8c9ac18 100644
--- a/chrome/browser/chromeos/options/cert_library.cc
+++ b/chrome/browser/chromeos/options/cert_library.cc
@@ -42,10 +42,10 @@ base::string16 GetDisplayString(net::X509Certificate* cert, bool hardware_backed
org = cert->subject().organization_names[0];
if (org.empty())
org = cert->subject().GetDisplayName();
- base::string16 issued_by = UTF8ToUTF16(
+ base::string16 issued_by = base::UTF8ToUTF16(
x509_certificate_model::GetIssuerCommonName(cert->os_cert_handle(),
org)); // alternative text
- base::string16 issued_to = UTF8ToUTF16(
+ base::string16 issued_to = base::UTF8ToUTF16(
x509_certificate_model::GetCertNameOrNickname(cert->os_cert_handle()));
if (hardware_backed) {
diff --git a/chrome/browser/chromeos/options/passphrase_textfield.cc b/chrome/browser/chromeos/options/passphrase_textfield.cc
index 2cdc1d7..3370336 100644
--- a/chrome/browser/chromeos/options/passphrase_textfield.cc
+++ b/chrome/browser/chromeos/options/passphrase_textfield.cc
@@ -37,12 +37,12 @@ void PassphraseTextfield::OnBlur() {
}
std::string PassphraseTextfield::GetPassphrase() {
- return changed_ ? UTF16ToUTF8(text()) : std::string();
+ return changed_ ? base::UTF16ToUTF8(text()) : std::string();
}
void PassphraseTextfield::SetFakePassphrase() {
CR_DEFINE_STATIC_LOCAL(base::string16, fake_passphrase,
- (ASCIIToUTF16("********")));
+ (base::ASCIIToUTF16("********")));
SetText(fake_passphrase);
changed_ = false;
}
diff --git a/chrome/browser/chromeos/options/vpn_config_view.cc b/chrome/browser/chromeos/options/vpn_config_view.cc
index 574a5b0..edd4a4c 100644
--- a/chrome/browser/chromeos/options/vpn_config_view.cc
+++ b/chrome/browser/chromeos/options/vpn_config_view.cc
@@ -742,17 +742,17 @@ void VPNConfigView::InitFromProperties(
provider_type_index_ = ProviderTypeToIndex(provider_type, client_cert_id_);
if (service_text_)
- service_text_->SetText(ASCIIToUTF16(vpn->name()));
+ service_text_->SetText(base::ASCIIToUTF16(vpn->name()));
if (provider_type_text_label_)
provider_type_text_label_->SetText(
ProviderTypeIndexToString(provider_type_index_));
if (server_textfield_ && !server_hostname.empty())
- server_textfield_->SetText(UTF8ToUTF16(server_hostname));
+ server_textfield_->SetText(base::UTF8ToUTF16(server_hostname));
if (username_textfield_ && !username.empty())
- username_textfield_->SetText(UTF8ToUTF16(username));
+ username_textfield_->SetText(base::UTF8ToUTF16(username));
if (group_name_textfield_ && !group_name.empty())
- group_name_textfield_->SetText(UTF8ToUTF16(group_name));
+ group_name_textfield_->SetText(base::UTF8ToUTF16(group_name));
if (psk_passphrase_textfield_)
psk_passphrase_textfield_->SetShowFake(!psk_passphrase_required);
if (save_credentials_checkbox_)
@@ -1024,7 +1024,7 @@ const std::string VPNConfigView::GetTextFromField(views::Textfield* textfield,
bool trim_whitespace) const {
if (!textfield)
return std::string();
- std::string untrimmed = UTF16ToUTF8(textfield->text());
+ std::string untrimmed = base::UTF16ToUTF8(textfield->text());
if (!trim_whitespace)
return untrimmed;
std::string result;
diff --git a/chrome/browser/chromeos/options/wifi_config_view.cc b/chrome/browser/chromeos/options/wifi_config_view.cc
index 8bd223d..c0e1bcd 100644
--- a/chrome/browser/chromeos/options/wifi_config_view.cc
+++ b/chrome/browser/chromeos/options/wifi_config_view.cc
@@ -732,7 +732,7 @@ bool WifiConfigView::Login() {
std::string WifiConfigView::GetSsid() const {
std::string result;
if (ssid_textfield_ != NULL) {
- std::string untrimmed = UTF16ToUTF8(ssid_textfield_->text());
+ std::string untrimmed = base::UTF16ToUTF8(ssid_textfield_->text());
TrimWhitespaceASCII(untrimmed, TRIM_ALL, &result);
}
return result;
@@ -741,7 +741,7 @@ std::string WifiConfigView::GetSsid() const {
std::string WifiConfigView::GetPassphrase() const {
std::string result;
if (passphrase_textfield_ != NULL)
- result = UTF16ToUTF8(passphrase_textfield_->text());
+ result = base::UTF16ToUTF8(passphrase_textfield_->text());
return result;
}
@@ -820,7 +820,7 @@ bool WifiConfigView::GetEapUseSystemCas() const {
std::string WifiConfigView::GetEapSubjectMatch() const {
DCHECK(subject_match_textfield_);
- return UTF16ToUTF8(subject_match_textfield_->text());
+ return base::UTF16ToUTF8(subject_match_textfield_->text());
}
std::string WifiConfigView::GetEapClientCertPkcs11Id() const {
@@ -837,12 +837,12 @@ std::string WifiConfigView::GetEapClientCertPkcs11Id() const {
std::string WifiConfigView::GetEapIdentity() const {
DCHECK(identity_textfield_);
- return UTF16ToUTF8(identity_textfield_->text());
+ return base::UTF16ToUTF8(identity_textfield_->text());
}
std::string WifiConfigView::GetEapAnonymousIdentity() const {
DCHECK(identity_anonymous_textfield_);
- return UTF16ToUTF8(identity_anonymous_textfield_->text());
+ return base::UTF16ToUTF8(identity_anonymous_textfield_->text());
}
void WifiConfigView::SetEapProperties(base::DictionaryValue* properties) {
@@ -942,7 +942,7 @@ void WifiConfigView::Init(bool show_8021x) {
IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_NETWORK_ID));
layout->AddView(ssid_textfield_);
} else {
- views::Label* label = new views::Label(UTF8ToUTF16(wifi->name()));
+ views::Label* label = new views::Label(base::UTF8ToUTF16(wifi->name()));
label->SetHorizontalAlignment(gfx::ALIGN_LEFT);
layout->AddView(label);
}
@@ -1192,7 +1192,7 @@ void WifiConfigView::InitFromProperties(
std::string passphrase;
properties.GetStringWithoutPathExpansion(
shill::kPassphraseProperty, &passphrase);
- passphrase_textfield_->SetText(UTF8ToUTF16(passphrase));
+ passphrase_textfield_->SetText(base::UTF8ToUTF16(passphrase));
return;
}
@@ -1229,14 +1229,15 @@ void WifiConfigView::InitFromProperties(
std::string eap_anonymous_identity;
properties.GetStringWithoutPathExpansion(
shill::kEapAnonymousIdentityProperty, &eap_anonymous_identity);
- identity_anonymous_textfield_->SetText(UTF8ToUTF16(eap_anonymous_identity));
+ identity_anonymous_textfield_->SetText(
+ base::UTF8ToUTF16(eap_anonymous_identity));
}
// Subject match
std::string subject_match;
properties.GetStringWithoutPathExpansion(
shill::kEapSubjectMatchProperty, &subject_match);
- subject_match_textfield_->SetText(UTF8ToUTF16(subject_match));
+ subject_match_textfield_->SetText(base::UTF8ToUTF16(subject_match));
// Server CA certificate.
if (CaCertActive()) {
@@ -1288,14 +1289,14 @@ void WifiConfigView::InitFromProperties(
std::string eap_identity;
properties.GetStringWithoutPathExpansion(
shill::kEapIdentityProperty, &eap_identity);
- identity_textfield_->SetText(UTF8ToUTF16(eap_identity));
+ identity_textfield_->SetText(base::UTF8ToUTF16(eap_identity));
// Passphrase
if (PassphraseActive()) {
std::string eap_password;
properties.GetStringWithoutPathExpansion(
shill::kEapPasswordProperty, &eap_password);
- passphrase_textfield_->SetText(UTF8ToUTF16(eap_password));
+ passphrase_textfield_->SetText(base::UTF8ToUTF16(eap_password));
// If 'Connectable' is True, show a fake passphrase to indicate that it
// has already been set.
bool connectable = false;
diff --git a/chrome/browser/chromeos/options/wimax_config_view.cc b/chrome/browser/chromeos/options/wimax_config_view.cc
index 6a8e57f..5f59a25 100644
--- a/chrome/browser/chromeos/options/wimax_config_view.cc
+++ b/chrome/browser/chromeos/options/wimax_config_view.cc
@@ -174,11 +174,12 @@ bool WimaxConfigView::Login() {
std::string WimaxConfigView::GetEapIdentity() const {
DCHECK(identity_textfield_);
- return UTF16ToUTF8(identity_textfield_->text());
+ return base::UTF16ToUTF8(identity_textfield_->text());
}
std::string WimaxConfigView::GetEapPassphrase() const {
- return passphrase_textfield_ ? UTF16ToUTF8(passphrase_textfield_->text()) :
+ return passphrase_textfield_ ? base::UTF16ToUTF8(
+ passphrase_textfield_->text()) :
std::string();
}
@@ -230,7 +231,7 @@ void WimaxConfigView::Init() {
layout->StartRow(0, column_view_set_id);
layout->AddView(new views::Label(l10n_util::GetStringUTF16(
IDS_OPTIONS_SETTINGS_INTERNET_TAB_NETWORK)));
- views::Label* label = new views::Label(UTF8ToUTF16(wimax->name()));
+ views::Label* label = new views::Label(base::UTF8ToUTF16(wimax->name()));
label->SetHorizontalAlignment(gfx::ALIGN_LEFT);
layout->AddView(label);
layout->AddPaddingRow(0, views::kRelatedControlVerticalSpacing);
@@ -360,7 +361,7 @@ void WimaxConfigView::InitFromProperties(
std::string eap_identity;
properties.GetStringWithoutPathExpansion(
shill::kEapIdentityProperty, &eap_identity);
- identity_textfield_->SetText(UTF8ToUTF16(eap_identity));
+ identity_textfield_->SetText(base::UTF8ToUTF16(eap_identity));
// Save credentials
if (save_credentials_checkbox_) {
diff --git a/chrome/browser/chromeos/policy/device_local_account_browsertest.cc b/chrome/browser/chromeos/policy/device_local_account_browsertest.cc
index 2e90224..8748bbc 100644
--- a/chrome/browser/chromeos/policy/device_local_account_browsertest.cc
+++ b/chrome/browser/chromeos/policy/device_local_account_browsertest.cc
@@ -252,8 +252,8 @@ bool DoesInstallSuccessReferToId(const std::string& id,
bool DoesInstallFailureReferToId(const std::string& id,
const content::NotificationSource& source,
const content::NotificationDetails& details) {
- return content::Details<const base::string16>(details)->find(UTF8ToUTF16(id)) !=
- base::string16::npos;
+ return content::Details<const base::string16>(details)->
+ find(base::UTF8ToUTF16(id)) != base::string16::npos;
}
scoped_ptr<net::FakeURLFetcher> RunCallbackAndReturnFakeURLFetcher(
@@ -453,7 +453,7 @@ static bool DisplayNameMatches(const std::string& account_id,
chromeos::UserManager::Get()->FindUser(account_id);
if (!user || user->display_name().empty())
return false;
- EXPECT_EQ(UTF8ToUTF16(display_name), user->display_name());
+ EXPECT_EQ(base::UTF8ToUTF16(display_name), user->display_name());
return true;
}
@@ -1156,15 +1156,15 @@ IN_PROC_BROWSER_TEST_P(TermsOfServiceTest, DISABLED_TermsOfServiceScreen) {
// Verify that the screen's headings have been set correctly.
EXPECT_EQ(
l10n_util::GetStringFUTF8(IDS_TERMS_OF_SERVICE_SCREEN_HEADING,
- UTF8ToUTF16(kDomain)),
+ base::UTF8ToUTF16(kDomain)),
heading);
EXPECT_EQ(
l10n_util::GetStringFUTF8(IDS_TERMS_OF_SERVICE_SCREEN_SUBHEADING,
- UTF8ToUTF16(kDomain)),
+ base::UTF8ToUTF16(kDomain)),
subheading);
EXPECT_EQ(
l10n_util::GetStringFUTF8(IDS_TERMS_OF_SERVICE_SCREEN_CONTENT_HEADING,
- UTF8ToUTF16(kDomain)),
+ base::UTF8ToUTF16(kDomain)),
content_heading);
if (!GetParam()) {
diff --git a/chrome/browser/chromeos/policy/recommendation_restorer_unittest.cc b/chrome/browser/chromeos/policy/recommendation_restorer_unittest.cc
index 2ae4a07..82c8776 100644
--- a/chrome/browser/chromeos/policy/recommendation_restorer_unittest.cc
+++ b/chrome/browser/chromeos/policy/recommendation_restorer_unittest.cc
@@ -129,7 +129,7 @@ void RecommendationRestorerTest::CreateLoginProfile() {
ASSERT_FALSE(restorer_);
TestingProfile* profile = profile_manager_.CreateTestingProfile(
chrome::kInitialProfile, prefs_owner_.Pass(),
- UTF8ToUTF16(chrome::kInitialProfile), 0, std::string(),
+ base::UTF8ToUTF16(chrome::kInitialProfile), 0, std::string(),
TestingProfile::TestingFactories());
restorer_ = RecommendationRestorerFactory::GetForProfile(profile);
EXPECT_TRUE(restorer_);
@@ -138,7 +138,7 @@ void RecommendationRestorerTest::CreateLoginProfile() {
void RecommendationRestorerTest::CreateUserProfile() {
ASSERT_FALSE(restorer_);
TestingProfile* profile = profile_manager_.CreateTestingProfile(
- "user", prefs_owner_.Pass(), UTF8ToUTF16("user"), 0, std::string(),
+ "user", prefs_owner_.Pass(), base::UTF8ToUTF16("user"), 0, std::string(),
TestingProfile::TestingFactories());
restorer_ = RecommendationRestorerFactory::GetForProfile(profile);
EXPECT_TRUE(restorer_);
diff --git a/chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos_unittest.cc b/chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos_unittest.cc
index 8a442c7..345d854 100644
--- a/chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos_unittest.cc
+++ b/chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos_unittest.cc
@@ -95,7 +95,7 @@ class UserCloudPolicyManagerChromeOSTest : public testing::Test {
FakeProfileOAuth2TokenService::Build));
profile_ = profile_manager_->CreateTestingProfile(
chrome::kInitialProfile, scoped_ptr<PrefServiceSyncable>(),
- UTF8ToUTF16("testing_profile"), 0, std::string(), factories);
+ base::UTF8ToUTF16("testing_profile"), 0, std::string(), factories);
signin_profile_ = profile_manager_->CreateTestingProfile(kSigninProfile);
signin_profile_->ForceIncognito(true);
// Usually the signin Profile and the main Profile are separate, but since
diff --git a/chrome/browser/chromeos/power/peripheral_battery_observer.cc b/chrome/browser/chromeos/power/peripheral_battery_observer.cc
index 6b38fcd..aed7048 100644
--- a/chrome/browser/chromeos/power/peripheral_battery_observer.cc
+++ b/chrome/browser/chromeos/power/peripheral_battery_observer.cc
@@ -219,11 +219,11 @@ bool PeripheralBatteryObserver::PostNotification(const std::string& address,
GURL(kNotificationOriginUrl),
ui::ResourceBundle::GetSharedInstance().GetImageNamed(
IDR_NOTIFICATION_PERIPHERAL_BATTERY_LOW),
- UTF8ToUTF16(battery.name),
+ base::UTF8ToUTF16(battery.name),
string_text,
blink::WebTextDirectionDefault,
base::string16(),
- UTF8ToUTF16(address),
+ base::UTF8ToUTF16(address),
new PeripheralBatteryNotificationDelegate(address));
notification_manager->Add(
diff --git a/chrome/browser/chromeos/profiles/profile_list_chromeos_unittest.cc b/chrome/browser/chromeos/profiles/profile_list_chromeos_unittest.cc
index d83f8f8..b44fa65 100644
--- a/chrome/browser/chromeos/profiles/profile_list_chromeos_unittest.cc
+++ b/chrome/browser/chromeos/profiles/profile_list_chromeos_unittest.cc
@@ -25,6 +25,8 @@
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/base/l10n/l10n_util.h"
+using base::ASCIIToUTF16;
+
namespace {
// As defined in /chromeos/dbus/cryptohome_client.cc.
diff --git a/chrome/browser/chromeos/status/data_promo_notification.cc b/chrome/browser/chromeos/status/data_promo_notification.cc
index 0a49377..c1a4891 100644
--- a/chrome/browser/chromeos/status/data_promo_notification.cc
+++ b/chrome/browser/chromeos/status/data_promo_notification.cc
@@ -194,7 +194,7 @@ void DataPromoNotification::ShowOptionalMobileDataPromoNotification() {
const std::string locale = g_browser_process->GetApplicationLocale();
std::string deal_text =
deal->GetLocalizedString(locale, "notification_text");
- message = UTF8ToUTF16(deal_text + "\n\n") + message;
+ message = base::UTF8ToUTF16(deal_text + "\n\n") + message;
info_url = deal->info_url();
if (info_url.empty() && carrier)
info_url = carrier->top_up_url();
diff --git a/chrome/browser/chromeos/status/network_menu.cc b/chrome/browser/chromeos/status/network_menu.cc
index 6d33ace..04d5c51 100644
--- a/chrome/browser/chromeos/status/network_menu.cc
+++ b/chrome/browser/chromeos/status/network_menu.cc
@@ -353,10 +353,10 @@ void MainMenuModel::AddWirelessNetworkMenuItem(const NetworkState* network,
if (network->IsConnectingState()) {
label = l10n_util::GetStringFUTF16(
IDS_STATUSBAR_NETWORK_DEVICE_STATUS,
- UTF8ToUTF16(wifi_name),
+ base::UTF8ToUTF16(wifi_name),
l10n_util::GetStringUTF16(IDS_STATUSBAR_NETWORK_DEVICE_CONNECTING));
} else {
- label = UTF8ToUTF16(wifi_name);
+ label = base::UTF8ToUTF16(wifi_name);
}
// We do not have convenient access to whether or not it might be possible
@@ -436,10 +436,10 @@ void MainMenuModel::InitMenuItems(bool should_open_button_options) {
if (network->IsConnectingState()) {
label = l10n_util::GetStringFUTF16(
IDS_STATUSBAR_NETWORK_DEVICE_STATUS,
- UTF8ToUTF16(network_name),
+ base::UTF8ToUTF16(network_name),
l10n_util::GetStringUTF16(IDS_STATUSBAR_NETWORK_DEVICE_CONNECTING));
} else {
- label = UTF8ToUTF16(network_name);
+ label = base::UTF8ToUTF16(network_name);
}
int flag = FLAG_CELLULAR;
@@ -617,9 +617,9 @@ void MoreMenuModel::InitMenuItems(bool should_open_button_options) {
if (default_network) {
std::string ip_address = default_network->ip_address();
if (!ip_address.empty()) {
- address_items.push_back(MenuItem(ui::MenuModel::TYPE_COMMAND,
- ASCIIToUTF16(ip_address), gfx::ImageSkia(), std::string(),
- FLAG_DISABLED));
+ address_items.push_back(MenuItem(
+ ui::MenuModel::TYPE_COMMAND, base::ASCIIToUTF16(ip_address),
+ gfx::ImageSkia(), std::string(), FLAG_DISABLED));
}
}
@@ -629,8 +629,8 @@ void MoreMenuModel::InitMenuItems(bool should_open_button_options) {
std::string label = l10n_util::GetStringUTF8(
IDS_STATUSBAR_NETWORK_DEVICE_ETHERNET) + " " + ethernet_address;
address_items.push_back(MenuItem(
- ui::MenuModel::TYPE_COMMAND,
- UTF8ToUTF16(label), gfx::ImageSkia(), std::string(), FLAG_DISABLED));
+ ui::MenuModel::TYPE_COMMAND, base::UTF8ToUTF16(label),
+ gfx::ImageSkia(), std::string(), FLAG_DISABLED));
}
std::string wifi_address =
@@ -639,8 +639,8 @@ void MoreMenuModel::InitMenuItems(bool should_open_button_options) {
std::string label = l10n_util::GetStringUTF8(
IDS_STATUSBAR_NETWORK_DEVICE_WIFI) + " " + wifi_address;
address_items.push_back(MenuItem(
- ui::MenuModel::TYPE_COMMAND,
- UTF8ToUTF16(label), gfx::ImageSkia(), std::string(), FLAG_DISABLED));
+ ui::MenuModel::TYPE_COMMAND, base::UTF8ToUTF16(label),
+ gfx::ImageSkia(), std::string(), FLAG_DISABLED));
}
menu_items_ = link_items;
diff --git a/chrome/browser/chromeos/system/ash_system_tray_delegate.cc b/chrome/browser/chromeos/system/ash_system_tray_delegate.cc
index 5a49a4d..153a18c 100644
--- a/chrome/browser/chromeos/system/ash_system_tray_delegate.cc
+++ b/chrome/browser/chromeos/system/ash_system_tray_delegate.cc
@@ -435,7 +435,7 @@ class SystemTrayDelegate : public ash::SystemTrayDelegate,
if (GetEnterpriseDomain().empty())
return base::string16();
return l10n_util::GetStringFUTF16(IDS_DEVICE_OWNED_BY_NOTICE,
- UTF8ToUTF16(GetEnterpriseDomain()));
+ base::UTF8ToUTF16(GetEnterpriseDomain()));
}
virtual const std::string GetLocallyManagedUserManager() const OVERRIDE {
@@ -460,7 +460,7 @@ class SystemTrayDelegate : public ash::SystemTrayDelegate,
return base::string16();
return l10n_util::GetStringFUTF16(
IDS_USER_IS_LOCALLY_MANAGED_BY_NOTICE,
- UTF8ToUTF16(GetLocallyManagedUserManager()));
+ base::UTF8ToUTF16(GetLocallyManagedUserManager()));
}
virtual bool SystemShouldUpgrade() const OVERRIDE {
diff --git a/chrome/browser/chromeos/system/timezone_util.cc b/chrome/browser/chromeos/system/timezone_util.cc
index 7308632..e396942 100644
--- a/chrome/browser/chromeos/system/timezone_util.cc
+++ b/chrome/browser/chromeos/system/timezone_util.cc
@@ -78,7 +78,7 @@ base::string16 GetExemplarCity(const icu::TimeZone& zone) {
zone_id_str.erase(0, slash_pos + 1);
// zone id has '_' in place of ' '.
ReplaceSubstringsAfterOffset(&zone_id_str, 0, "_", " ");
- return ASCIIToUTF16(zone_id_str);
+ return base::ASCIIToUTF16(zone_id_str);
}
// Gets the given timezone's name for visualization.
@@ -113,8 +113,10 @@ base::string16 GetTimezoneName(const icu::TimeZone& timezone) {
icu::UnicodeString name;
timezone.getDisplayName(dst_offset != 0, icu::TimeZone::LONG, name);
base::string16 result(l10n_util::GetStringFUTF16(
- IDS_OPTIONS_SETTINGS_TIMEZONE_DISPLAY_TEMPLATE, ASCIIToUTF16(offset_str),
- base::string16(name.getBuffer(), name.length()), GetExemplarCity(timezone)));
+ IDS_OPTIONS_SETTINGS_TIMEZONE_DISPLAY_TEMPLATE,
+ base::ASCIIToUTF16(offset_str),
+ base::string16(name.getBuffer(), name.length()),
+ GetExemplarCity(timezone)));
base::i18n::AdjustStringForLocaleDirection(&result);
return result;
}
diff --git a/chrome/browser/component_updater/pepper_flash_component_installer.cc b/chrome/browser/component_updater/pepper_flash_component_installer.cc
index 18b2095..ccfd49e 100644
--- a/chrome/browser/component_updater/pepper_flash_component_installer.cc
+++ b/chrome/browser/component_updater/pepper_flash_component_installer.cc
@@ -193,7 +193,7 @@ void RegisterPepperFlashWithChrome(const base::FilePath& path,
continue;
// Do it only if the version we're trying to register is newer.
- base::Version registered_version(UTF16ToUTF8(it->version));
+ base::Version registered_version(base::UTF16ToUTF8(it->version));
if (registered_version.IsValid() &&
version.CompareTo(registered_version) <= 0) {
return;
diff --git a/chrome/browser/content_settings/content_settings_browsertest.cc b/chrome/browser/content_settings/content_settings_browsertest.cc
index cfd2fc2..c0d0018 100644
--- a/chrome/browser/content_settings/content_settings_browsertest.cc
+++ b/chrome/browser/content_settings/content_settings_browsertest.cc
@@ -241,7 +241,7 @@ IN_PROC_BROWSER_TEST_F(ContentSettingsTest, RedirectLoopCookies) {
content::WebContents* web_contents =
browser()->tab_strip_model()->GetActiveWebContents();
- ASSERT_EQ(UTF8ToUTF16(test_url.spec() + " failed to load"),
+ ASSERT_EQ(base::UTF8ToUTF16(test_url.spec() + " failed to load"),
web_contents->GetTitle());
EXPECT_TRUE(TabSpecificContentSettings::FromWebContents(web_contents)->
@@ -258,7 +258,7 @@ IN_PROC_BROWSER_TEST_F(ContentSettingsTest, ContentSettingsBlockDataURLs) {
content::WebContents* web_contents =
browser()->tab_strip_model()->GetActiveWebContents();
- ASSERT_EQ(UTF8ToUTF16("Data URL"), web_contents->GetTitle());
+ ASSERT_EQ(base::UTF8ToUTF16("Data URL"), web_contents->GetTitle());
EXPECT_TRUE(TabSpecificContentSettings::FromWebContents(web_contents)->
IsContentBlocked(CONTENT_SETTINGS_TYPE_JAVASCRIPT));
@@ -316,7 +316,7 @@ IN_PROC_BROWSER_TEST_F(ClickToPlayPluginTest, Basic) {
base::FilePath(), base::FilePath().AppendASCII("clicktoplay.html"));
ui_test_utils::NavigateToURL(browser(), url);
- base::string16 expected_title(ASCIIToUTF16("OK"));
+ base::string16 expected_title(base::ASCIIToUTF16("OK"));
content::TitleWatcher title_watcher(
browser()->tab_strip_model()->GetActiveWebContents(), expected_title);
@@ -346,7 +346,7 @@ IN_PROC_BROWSER_TEST_F(ClickToPlayPluginTest, AllowException) {
std::string(),
CONTENT_SETTING_ALLOW);
- base::string16 expected_title(ASCIIToUTF16("OK"));
+ base::string16 expected_title(base::ASCIIToUTF16("OK"));
content::TitleWatcher title_watcher(
browser()->tab_strip_model()->GetActiveWebContents(), expected_title);
ui_test_utils::NavigateToURL(browser(), url);
@@ -365,7 +365,7 @@ IN_PROC_BROWSER_TEST_F(ClickToPlayPluginTest, BlockException) {
std::string(),
CONTENT_SETTING_BLOCK);
- base::string16 expected_title(ASCIIToUTF16("Click To Play"));
+ base::string16 expected_title(base::ASCIIToUTF16("Click To Play"));
content::TitleWatcher title_watcher(
browser()->tab_strip_model()->GetActiveWebContents(), expected_title);
ui_test_utils::NavigateToURL(browser(), url);
@@ -390,7 +390,7 @@ IN_PROC_BROWSER_TEST_F(ClickToPlayPluginTest, MAYBE_LoadAllBlockedPlugins) {
base::FilePath().AppendASCII("load_all_blocked_plugins.html"));
ui_test_utils::NavigateToURL(browser(), url);
- base::string16 expected_title1(ASCIIToUTF16("1"));
+ base::string16 expected_title1(base::ASCIIToUTF16("1"));
content::TitleWatcher title_watcher1(
browser()->tab_strip_model()->GetActiveWebContents(), expected_title1);
@@ -399,7 +399,7 @@ IN_PROC_BROWSER_TEST_F(ClickToPlayPluginTest, MAYBE_LoadAllBlockedPlugins) {
std::string());
EXPECT_EQ(expected_title1, title_watcher1.WaitAndGetTitle());
- base::string16 expected_title2(ASCIIToUTF16("2"));
+ base::string16 expected_title2(base::ASCIIToUTF16("2"));
content::TitleWatcher title_watcher2(
browser()->tab_strip_model()->GetActiveWebContents(), expected_title2);
@@ -424,7 +424,7 @@ IN_PROC_BROWSER_TEST_F(ClickToPlayPluginTest, NoCallbackAtLoad) {
browser()->tab_strip_model()->GetActiveWebContents(),
"CallOnStartup = function() { document.title = \"OK\"; }"));
- base::string16 expected_title(ASCIIToUTF16("OK"));
+ base::string16 expected_title(base::ASCIIToUTF16("OK"));
content::TitleWatcher title_watcher(
browser()->tab_strip_model()->GetActiveWebContents(), expected_title);
@@ -445,7 +445,7 @@ IN_PROC_BROWSER_TEST_F(ClickToPlayPluginTest, DeleteSelfAtLoad) {
base::FilePath().AppendASCII("plugin_delete_self_at_load.html"));
ui_test_utils::NavigateToURL(browser(), url);
- base::string16 expected_title(ASCIIToUTF16("OK"));
+ base::string16 expected_title(base::ASCIIToUTF16("OK"));
content::TitleWatcher title_watcher(
browser()->tab_strip_model()->GetActiveWebContents(), expected_title);
@@ -473,7 +473,7 @@ class PepperContentSettingsTest : public ContentSettingsTest {
// Platform-specific filename relative to the chrome executable.
#if defined(OS_WIN)
const std::wstring external_clear_key_mime_type =
- ASCIIToWide(kExternalClearKeyMimeType);
+ base::ASCIIToWide(kExternalClearKeyMimeType);
const char kLibraryName[] = "clearkeycdmadapter.dll";
#else // !defined(OS_WIN)
const char* external_clear_key_mime_type = kExternalClearKeyMimeType;
@@ -508,7 +508,7 @@ class PepperContentSettingsTest : public ContentSettingsTest {
content::WebContents* web_contents =
browser()->tab_strip_model()->GetActiveWebContents();
- base::string16 expected_title(ASCIIToUTF16(expected_result));
+ base::string16 expected_title(base::ASCIIToUTF16(expected_result));
content::TitleWatcher title_watcher(web_contents, expected_title);
// GetTestUrl assumes paths, so we must append query parameters to result.
@@ -534,7 +534,7 @@ class PepperContentSettingsTest : public ContentSettingsTest {
browser()->tab_strip_model()->GetActiveWebContents();
TabSpecificContentSettings* tab_settings =
TabSpecificContentSettings::FromWebContents(web_contents);
- base::string16 expected_title(ASCIIToUTF16(kExpectedTitle));
+ base::string16 expected_title(base::ASCIIToUTF16(kExpectedTitle));
content::TitleWatcher title_watcher(web_contents, expected_title);
GURL url = ui_test_utils::GetTestUrl(
diff --git a/chrome/browser/content_settings/content_settings_usages_state.cc b/chrome/browser/content_settings/content_settings_usages_state.cc
index ed95912..222b6de 100644
--- a/chrome/browser/content_settings/content_settings_usages_state.cc
+++ b/chrome/browser/content_settings/content_settings_usages_state.cc
@@ -104,5 +104,5 @@ std::string ContentSettingsUsagesState::GURLToFormattedHost(
base::string16 display_host;
net::AppendFormattedHost(url,
profile_->GetPrefs()->GetString(prefs::kAcceptLanguages), &display_host);
- return UTF16ToUTF8(display_host);
+ return base::UTF16ToUTF8(display_host);
}
diff --git a/chrome/browser/content_settings/tab_specific_content_settings.cc b/chrome/browser/content_settings/tab_specific_content_settings.cc
index a5b74ac..50caeae 100644
--- a/chrome/browser/content_settings/tab_specific_content_settings.cc
+++ b/chrome/browser/content_settings/tab_specific_content_settings.cc
@@ -412,11 +412,11 @@ void TabSpecificContentSettings::OnWebDatabaseAccessed(
bool blocked_by_policy) {
if (blocked_by_policy) {
blocked_local_shared_objects_.databases()->AddDatabase(
- url, UTF16ToUTF8(name), UTF16ToUTF8(display_name));
+ url, base::UTF16ToUTF8(name), base::UTF16ToUTF8(display_name));
OnContentBlocked(CONTENT_SETTINGS_TYPE_COOKIES);
} else {
allowed_local_shared_objects_.databases()->AddDatabase(
- url, UTF16ToUTF8(name), UTF16ToUTF8(display_name));
+ url, base::UTF16ToUTF8(name), base::UTF16ToUTF8(display_name));
OnContentAllowed(CONTENT_SETTINGS_TYPE_COOKIES);
}
diff --git a/chrome/browser/content_settings/tab_specific_content_settings_unittest.cc b/chrome/browser/content_settings/tab_specific_content_settings_unittest.cc
index 96f452d..5d08a4b 100644
--- a/chrome/browser/content_settings/tab_specific_content_settings_unittest.cc
+++ b/chrome/browser/content_settings/tab_specific_content_settings_unittest.cc
@@ -370,13 +370,13 @@ TEST_F(TabSpecificContentSettingsTest, SiteDataObserver) {
content_settings->OnFileSystemAccessed(GURL("http://google.com"),
blocked_by_policy);
content_settings->OnIndexedDBAccessed(GURL("http://google.com"),
- UTF8ToUTF16("text"),
+ base::UTF8ToUTF16("text"),
blocked_by_policy);
content_settings->OnLocalStorageAccessed(GURL("http://google.com"),
true,
blocked_by_policy);
content_settings->OnWebDatabaseAccessed(GURL("http://google.com"),
- UTF8ToUTF16("name"),
- UTF8ToUTF16("display_name"),
+ base::UTF8ToUTF16("name"),
+ base::UTF8ToUTF16("display_name"),
blocked_by_policy);
}
diff --git a/chrome/browser/custom_handlers/protocol_handler_registry_browsertest.cc b/chrome/browser/custom_handlers/protocol_handler_registry_browsertest.cc
index abb2680..7898c31 100644
--- a/chrome/browser/custom_handlers/protocol_handler_registry_browsertest.cc
+++ b/chrome/browser/custom_handlers/protocol_handler_registry_browsertest.cc
@@ -92,7 +92,7 @@ IN_PROC_BROWSER_TEST_F(RegisterProtocolHandlerBrowserTest,
AddProtocolHandler(std::string("web+search"),
GURL("http://www.google.com/%s"),
- UTF8ToUTF16(std::string("Test handler")));
+ base::UTF8ToUTF16(std::string("Test handler")));
GURL url("web+search:testing");
ProtocolHandlerRegistry* registry =
ProtocolHandlerRegistryFactory::GetForProfile(browser()->profile());
@@ -105,7 +105,7 @@ IN_PROC_BROWSER_TEST_F(RegisterProtocolHandlerBrowserTest, CustomHandler) {
ASSERT_TRUE(test_server()->Start());
GURL handler_url = test_server()->GetURL("files/custom_handler_foo.html");
AddProtocolHandler("foo", handler_url,
- UTF8ToUTF16(std::string("Test foo Handler")));
+ base::UTF8ToUTF16(std::string("Test foo Handler")));
ui_test_utils::NavigateToURL(browser(), GURL("foo:test"));
diff --git a/chrome/browser/custom_handlers/protocol_handler_registry_unittest.cc b/chrome/browser/custom_handlers/protocol_handler_registry_unittest.cc
index 3dc44191..f3e9941 100644
--- a/chrome/browser/custom_handlers/protocol_handler_registry_unittest.cc
+++ b/chrome/browser/custom_handlers/protocol_handler_registry_unittest.cc
@@ -326,7 +326,7 @@ class ProtocolHandlerRegistryTest : public testing::Test {
const GURL& url,
const std::string& title) {
return ProtocolHandler::CreateProtocolHandler(protocol, url,
- UTF8ToUTF16(title));
+ base::UTF8ToUTF16(title));
}
ProtocolHandler CreateProtocolHandler(const std::string& protocol,
diff --git a/chrome/browser/custom_handlers/register_protocol_handler_infobar_delegate.cc b/chrome/browser/custom_handlers/register_protocol_handler_infobar_delegate.cc
index 76e70b8..4864aa3 100644
--- a/chrome/browser/custom_handlers/register_protocol_handler_infobar_delegate.cc
+++ b/chrome/browser/custom_handlers/register_protocol_handler_infobar_delegate.cc
@@ -73,10 +73,10 @@ base::string16 RegisterProtocolHandlerInfoBarDelegate::GetMessageText() const {
ProtocolHandler old_handler = registry_->GetHandlerFor(handler_.protocol());
return old_handler.IsEmpty() ?
l10n_util::GetStringFUTF16(IDS_REGISTER_PROTOCOL_HANDLER_CONFIRM,
- handler_.title(), UTF8ToUTF16(handler_.url().host()),
+ handler_.title(), base::UTF8ToUTF16(handler_.url().host()),
GetProtocolName(handler_)) :
l10n_util::GetStringFUTF16(IDS_REGISTER_PROTOCOL_HANDLER_CONFIRM_REPLACE,
- handler_.title(), UTF8ToUTF16(handler_.url().host()),
+ handler_.title(), base::UTF8ToUTF16(handler_.url().host()),
GetProtocolName(handler_), old_handler.title());
}
@@ -128,5 +128,5 @@ base::string16 RegisterProtocolHandlerInfoBarDelegate::GetProtocolName(
return l10n_util::GetStringUTF16(IDS_REGISTER_PROTOCOL_HANDLER_MAILTO_NAME);
if (handler.protocol() == "webcal")
return l10n_util::GetStringUTF16(IDS_REGISTER_PROTOCOL_HANDLER_WEBCAL_NAME);
- return UTF8ToUTF16(handler.protocol());
+ return base::UTF8ToUTF16(handler.protocol());
}