summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/importer/firefox_importer_browsertest.cc14
-rw-r--r--chrome/browser/importer/in_process_importer_bridge.cc3
-rw-r--r--chrome/browser/importer/profile_writer.cc6
-rw-r--r--chrome/browser/importer/profile_writer_unittest.cc18
-rw-r--r--chrome/browser/jumplist_win.cc13
-rw-r--r--chrome/browser/local_discovery/privet_notifications.cc2
-rw-r--r--chrome/browser/managed_mode/managed_mode_browsertest.cc2
-rw-r--r--chrome/browser/managed_mode/managed_mode_interstitial.cc2
-rw-r--r--chrome/browser/managed_mode/managed_mode_site_list.cc2
-rw-r--r--chrome/browser/managed_mode/managed_user_registration_utility_unittest.cc8
-rw-r--r--chrome/browser/managed_mode/managed_user_service.cc8
-rw-r--r--chrome/browser/managed_mode/managed_user_service_browsertest.cc9
-rw-r--r--chrome/browser/managed_mode/managed_user_service_unittest.cc8
-rw-r--r--chrome/browser/media/encrypted_media_browsertest.cc6
-rw-r--r--chrome/browser/media/encrypted_media_istypesupported_browsertest.cc2
-rw-r--r--chrome/browser/media/media_browsertest.cc10
-rw-r--r--chrome/browser/media/media_capture_devices_dispatcher.cc4
-rw-r--r--chrome/browser/media/media_stream_capture_indicator.cc4
-rw-r--r--chrome/browser/media/media_stream_infobar_delegate.cc2
-rw-r--r--chrome/browser/media/native_desktop_media_list_unittest.cc4
-rw-r--r--chrome/browser/media_galleries/media_galleries_dialog_controller.cc4
-rw-r--r--chrome/browser/media_galleries/media_galleries_dialog_controller_unittest.cc12
-rw-r--r--chrome/browser/media_galleries/media_galleries_preferences.cc9
-rw-r--r--chrome/browser/media_galleries/media_galleries_preferences_unittest.cc7
-rw-r--r--chrome/browser/media_galleries/win/mtp_device_delegate_impl_win.cc2
-rw-r--r--chrome/browser/memory_details.cc8
-rw-r--r--chrome/browser/memory_details_linux.cc4
-rw-r--r--chrome/browser/memory_details_mac.cc11
-rw-r--r--chrome/browser/memory_details_win.cc4
-rw-r--r--chrome/browser/metrics/metrics_log.cc4
-rw-r--r--chrome/browser/metrics/metrics_log_unittest.cc4
-rw-r--r--chrome/browser/metrics/metrics_service.cc4
-rw-r--r--chrome/browser/mouseleave_browsertest.cc6
-rw-r--r--chrome/browser/net/connection_tester.cc12
-rw-r--r--chrome/browser/net/proxy_browsertest.cc8
-rw-r--r--chrome/browser/net/spdyproxy/data_reduction_proxy_settings.cc2
-rw-r--r--chrome/browser/net/spdyproxy/data_reduction_proxy_settings_unittest.cc2
-rw-r--r--chrome/browser/net/spdyproxy/http_auth_handler_spdyproxy.cc2
-rw-r--r--chrome/browser/net/spdyproxy/http_auth_handler_spdyproxy_unittest.cc4
-rw-r--r--chrome/browser/net/websocket_browsertest.cc8
-rw-r--r--chrome/browser/notifications/desktop_notification_service.cc25
-rw-r--r--chrome/browser/notifications/desktop_notifications_unittest.cc22
-rw-r--r--chrome/browser/notifications/message_center_notifications_browsertest.cc18
-rw-r--r--chrome/browser/notifications/message_center_settings_controller.cc4
-rw-r--r--chrome/browser/notifications/message_center_settings_controller_unittest.cc21
-rw-r--r--chrome/browser/notifications/notification_browsertest.cc19
-rw-r--r--chrome/browser/notifications/sync_notifier/synced_notification.cc16
-rw-r--r--chrome/browser/notifications/sync_notifier/synced_notification_unittest.cc10
-rw-r--r--chrome/browser/parsers/metadata_parser_filebase.cc2
-rw-r--r--chrome/browser/parsers/metadata_parser_jpeg_factory.cc2
-rw-r--r--chrome/browser/password_manager/login_database_posix.cc4
-rw-r--r--chrome/browser/password_manager/login_database_unittest.cc2
-rw-r--r--chrome/browser/password_manager/native_backend_gnome_x.cc2
-rw-r--r--chrome/browser/password_manager/native_backend_gnome_x_unittest.cc2
-rw-r--r--chrome/browser/password_manager/native_backend_kwallet_x_unittest.cc1
-rw-r--r--chrome/browser/password_manager/password_form_data.cc10
-rw-r--r--chrome/browser/password_manager/password_form_manager_unittest.cc2
-rw-r--r--chrome/browser/password_manager/password_generation_manager_unittest.cc2
-rw-r--r--chrome/browser/password_manager/password_manager_delegate_impl.cc2
-rw-r--r--chrome/browser/password_manager/password_manager_unittest.cc1
-rw-r--r--chrome/browser/password_manager/password_manager_util_win.cc6
-rw-r--r--chrome/browser/password_manager/password_store_default_unittest.cc2
-rw-r--r--chrome/browser/password_manager/password_store_mac.cc16
-rw-r--r--chrome/browser/password_manager/password_store_mac_unittest.cc2
-rw-r--r--chrome/browser/password_manager/password_store_win.cc5
-rw-r--r--chrome/browser/password_manager/password_store_x_unittest.cc2
-rw-r--r--chrome/browser/password_manager/password_syncable_service.cc14
-rw-r--r--chrome/browser/pepper_flash_settings_manager.cc2
-rw-r--r--chrome/browser/performance_monitor/database.cc2
-rw-r--r--chrome/browser/platform_util_win.cc2
-rw-r--r--chrome/browser/plugins/plugin_finder.cc2
-rw-r--r--chrome/browser/plugins/plugin_info_message_filter.cc4
-rw-r--r--chrome/browser/plugins/plugin_infobar_delegates.cc4
-rw-r--r--chrome/browser/plugins/plugin_installer_unittest.cc11
-rw-r--r--chrome/browser/plugins/plugin_metadata_unittest.cc10
-rw-r--r--chrome/browser/plugins/plugin_prefs.cc4
-rw-r--r--chrome/browser/plugins/plugin_prefs_unittest.cc1
-rw-r--r--chrome/browser/policy/browser_policy_connector.cc8
-rw-r--r--chrome/browser/policy/policy_browsertest.cc20
-rw-r--r--chrome/browser/policy/policy_path_parser_win.cc2
-rw-r--r--chrome/browser/predictors/autocomplete_action_predictor_table_unittest.cc6
-rw-r--r--chrome/browser/predictors/autocomplete_action_predictor_unittest.cc1
-rw-r--r--chrome/browser/prefetch/prefetch_browsertest.cc4
-rw-r--r--chrome/browser/prefs/chrome_pref_service_unittest.cc2
-rw-r--r--chrome/browser/prefs/pref_functional_browsertest.cc4
-rw-r--r--chrome/browser/prerender/prerender_browsertest.cc14
-rw-r--r--chrome/browser/printing/print_dialog_gtk.cc4
-rw-r--r--chrome/browser/printing/printing_layout_browsertest.cc8
-rw-r--r--chrome/browser/process_singleton_linux.cc4
-rw-r--r--chrome/browser/profile_resetter/automatic_profile_resetter_delegate_unittest.cc3
-rw-r--r--chrome/browser/profile_resetter/profile_resetter_unittest.cc9
-rw-r--r--chrome/browser/profiles/avatar_menu.cc3
-rw-r--r--chrome/browser/profiles/gaia_info_update_service_unittest.cc6
-rw-r--r--chrome/browser/profiles/profile_downloader_unittest.cc4
-rw-r--r--chrome/browser/profiles/profile_impl.cc4
-rw-r--r--chrome/browser/profiles/profile_info_cache.cc2
-rw-r--r--chrome/browser/profiles/profile_info_cache_unittest.cc1
-rw-r--r--chrome/browser/profiles/profile_list_desktop_unittest.cc2
-rw-r--r--chrome/browser/profiles/profile_manager.cc13
-rw-r--r--chrome/browser/profiles/profile_manager_unittest.cc5
-rw-r--r--chrome/browser/profiles/profile_shortcut_manager_win.cc3
-rw-r--r--chrome/browser/profiles/profiles_state.cc3
-rw-r--r--chrome/browser/referrer_policy_browsertest.cc2
103 files changed, 340 insertions, 297 deletions
diff --git a/chrome/browser/importer/firefox_importer_browsertest.cc b/chrome/browser/importer/firefox_importer_browsertest.cc
index e6b4de8..becd7e0 100644
--- a/chrome/browser/importer/firefox_importer_browsertest.cc
+++ b/chrome/browser/importer/firefox_importer_browsertest.cc
@@ -135,10 +135,10 @@ class FirefoxObserver : public ProfileWriter,
EXPECT_EQ(p.origin, form.origin.spec());
EXPECT_EQ(p.realm, form.signon_realm);
EXPECT_EQ(p.action, form.action.spec());
- EXPECT_EQ(WideToUTF16(p.username_element), form.username_element);
- EXPECT_EQ(WideToUTF16(p.username), form.username_value);
- EXPECT_EQ(WideToUTF16(p.password_element), form.password_element);
- EXPECT_EQ(WideToUTF16(p.password), form.password_value);
+ EXPECT_EQ(base::WideToUTF16(p.username_element), form.username_element);
+ EXPECT_EQ(base::WideToUTF16(p.username), form.username_value);
+ EXPECT_EQ(base::WideToUTF16(p.password_element), form.password_element);
+ EXPECT_EQ(base::WideToUTF16(p.password), form.password_value);
EXPECT_EQ(p.blacklisted, form.blacklisted_by_user);
++password_count_;
}
@@ -147,12 +147,12 @@ class FirefoxObserver : public ProfileWriter,
history::VisitSource visit_source) OVERRIDE {
ASSERT_EQ(3U, page.size());
EXPECT_EQ("http://www.google.com/", page[0].url().spec());
- EXPECT_EQ(ASCIIToUTF16("Google"), page[0].title());
+ EXPECT_EQ(base::ASCIIToUTF16("Google"), page[0].title());
EXPECT_EQ("http://www.google.com/", page[1].url().spec());
- EXPECT_EQ(ASCIIToUTF16("Google"), page[1].title());
+ EXPECT_EQ(base::ASCIIToUTF16("Google"), page[1].title());
EXPECT_EQ("http://www.cs.unc.edu/~jbs/resources/perl/perl-cgi/programs/"
"form1-POST.html", page[2].url().spec());
- EXPECT_EQ(ASCIIToUTF16("example form (POST)"), page[2].title());
+ EXPECT_EQ(base::ASCIIToUTF16("example form (POST)"), page[2].title());
EXPECT_EQ(history::SOURCE_FIREFOX_IMPORTED, visit_source);
++history_count_;
}
diff --git a/chrome/browser/importer/in_process_importer_bridge.cc b/chrome/browser/importer/in_process_importer_bridge.cc
index 435ba68..79d118a 100644
--- a/chrome/browser/importer/in_process_importer_bridge.cc
+++ b/chrome/browser/importer/in_process_importer_bridge.cc
@@ -105,7 +105,8 @@ TemplateURL* CreateTemplateURL(const base::string16& title,
// We set short name by using the title if it exists.
// Otherwise, we use the shortcut.
data.short_name = title.empty() ? keyword : title;
- data.SetURL(TemplateURLRef::DisplayURLToURLRef(UTF8ToUTF16(url.spec())));
+ data.SetURL(
+ TemplateURLRef::DisplayURLToURLRef(base::UTF8ToUTF16(url.spec())));
return new TemplateURL(NULL, data);
}
diff --git a/chrome/browser/importer/profile_writer.cc b/chrome/browser/importer/profile_writer.cc
index 1bf9dc9..2c0d0aa 100644
--- a/chrome/browser/importer/profile_writer.cc
+++ b/chrome/browser/importer/profile_writer.cc
@@ -52,8 +52,8 @@ base::string16 GenerateUniqueFolderName(BookmarkModel* model,
// Otherwise iterate until we find a unique name.
for (size_t i = 1; i <= existing_folder_names.size(); ++i) {
- base::string16 name = folder_name + ASCIIToUTF16(" (") +
- base::IntToString16(i) + ASCIIToUTF16(")");
+ base::string16 name = folder_name + base::ASCIIToUTF16(" (") +
+ base::IntToString16(i) + base::ASCIIToUTF16(")");
if (existing_folder_names.find(name) == existing_folder_names.end())
return name;
}
@@ -256,7 +256,7 @@ static std::string BuildHostPathKey(const TemplateURL* t_url,
if (t_url->url_ref().SupportsReplacement()) {
return HostPathKeyForURL(GURL(
t_url->url_ref().ReplaceSearchTerms(
- TemplateURLRef::SearchTermsArgs(ASCIIToUTF16("x")))));
+ TemplateURLRef::SearchTermsArgs(base::ASCIIToUTF16("x")))));
}
return std::string();
}
diff --git a/chrome/browser/importer/profile_writer_unittest.cc b/chrome/browser/importer/profile_writer_unittest.cc
index 6e2a9ef..8e77ac1 100644
--- a/chrome/browser/importer/profile_writer_unittest.cc
+++ b/chrome/browser/importer/profile_writer_unittest.cc
@@ -44,9 +44,9 @@ class ProfileWriterTest : public testing::Test {
// simulate bookmark importing.
void CreateImportedBookmarksEntries() {
AddImportedBookmarkEntry(GURL("http://www.google.com"),
- ASCIIToUTF16("Google"));
+ base::ASCIIToUTF16("Google"));
AddImportedBookmarkEntry(GURL("http://www.yahoo.com"),
- ASCIIToUTF16("Yahoo"));
+ base::ASCIIToUTF16("Yahoo"));
}
// Helper function to create history entries.
@@ -68,9 +68,11 @@ class ProfileWriterTest : public testing::Test {
// simulate history importing.
void CreateHistoryPageEntries() {
history::URLRow row1(
- MakeURLRow("http://www.google.com", ASCIIToUTF16("Google"), 3, 10, 1));
+ MakeURLRow("http://www.google.com", base::ASCIIToUTF16("Google"),
+ 3, 10, 1));
history::URLRow row2(
- MakeURLRow("http://www.yahoo.com", ASCIIToUTF16("Yahoo"), 3, 30, 10));
+ MakeURLRow("http://www.yahoo.com", base::ASCIIToUTF16("Yahoo"),
+ 3, 30, 10));
pages_.push_back(row1);
pages_.push_back(row2);
}
@@ -144,7 +146,7 @@ TEST_F(ProfileWriterTest, CheckBookmarksWithMultiProfile) {
test::WaitForBookmarkModelToLoad(bookmark_model2);
bookmark_utils::AddIfNotBookmarked(bookmark_model2,
GURL("http://www.bing.com"),
- ASCIIToUTF16("Bing"));
+ base::ASCIIToUTF16("Bing"));
TestingProfile profile1;
profile1.CreateBookmarkModel(true);
@@ -156,7 +158,7 @@ TEST_F(ProfileWriterTest, CheckBookmarksWithMultiProfile) {
scoped_refptr<TestProfileWriter> profile_writer(
new TestProfileWriter(&profile1));
profile_writer->AddBookmarks(bookmarks_,
- ASCIIToUTF16("Imported from Firefox"));
+ base::ASCIIToUTF16("Imported from Firefox"));
std::vector<BookmarkService::URLAndTitle> url_record1;
bookmark_model1->GetBookmarks(&url_record1);
@@ -180,7 +182,7 @@ TEST_F(ProfileWriterTest, CheckBookmarksAfterWritingDataTwice) {
scoped_refptr<TestProfileWriter> profile_writer(
new TestProfileWriter(&profile));
profile_writer->AddBookmarks(bookmarks_,
- ASCIIToUTF16("Imported from Firefox"));
+ base::ASCIIToUTF16("Imported from Firefox"));
std::vector<BookmarkService::URLAndTitle> bookmarks_record;
bookmark_model->GetBookmarks(&bookmarks_record);
EXPECT_EQ(2u, bookmarks_record.size());
@@ -188,7 +190,7 @@ TEST_F(ProfileWriterTest, CheckBookmarksAfterWritingDataTwice) {
VerifyBookmarksCount(bookmarks_record, bookmark_model, 1);
profile_writer->AddBookmarks(bookmarks_,
- ASCIIToUTF16("Imported from Firefox"));
+ base::ASCIIToUTF16("Imported from Firefox"));
// Verify that duplicate bookmarks exist.
VerifyBookmarksCount(bookmarks_record, bookmark_model, 2);
}
diff --git a/chrome/browser/jumplist_win.cc b/chrome/browser/jumplist_win.cc
index 8d9c158..9ad7720 100644
--- a/chrome/browser/jumplist_win.cc
+++ b/chrome/browser/jumplist_win.cc
@@ -278,7 +278,8 @@ HRESULT UpdateCategory(base::win::ScopedComPtr<ICustomDestinationList> list,
if (data.empty() || !max_slots)
return S_OK;
- std::wstring category = UTF16ToWide(l10n_util::GetStringUTF16(category_id));
+ std::wstring category =
+ base::UTF16ToWide(l10n_util::GetStringUTF16(category_id));
// Create an EnumerableObjectCollection object.
// We once add the given items to this collection object and add this
@@ -334,7 +335,7 @@ HRESULT UpdateTaskCategory(base::win::ScopedComPtr<ICustomDestinationList> list,
// system menu.
scoped_refptr<ShellLinkItem> chrome(new ShellLinkItem);
std::wstring chrome_title =
- UTF16ToWide(l10n_util::GetStringUTF16(IDS_NEW_WINDOW));
+ base::UTF16ToWide(l10n_util::GetStringUTF16(IDS_NEW_WINDOW));
ReplaceSubstringsAfterOffset(&chrome_title, 0, L"&", L"");
chrome->SetTitle(chrome_title);
chrome->SetIcon(chrome_path, 0, false);
@@ -345,9 +346,9 @@ HRESULT UpdateTaskCategory(base::win::ScopedComPtr<ICustomDestinationList> list,
// this item.
scoped_refptr<ShellLinkItem> incognito(new ShellLinkItem);
incognito->SetArguments(
- ASCIIToWide(std::string("--") + switches::kIncognito));
+ base::ASCIIToWide(std::string("--") + switches::kIncognito));
std::wstring incognito_title =
- UTF16ToWide(l10n_util::GetStringUTF16(IDS_NEW_INCOGNITO_WINDOW));
+ base::UTF16ToWide(l10n_util::GetStringUTF16(IDS_NEW_INCOGNITO_WINDOW));
ReplaceSubstringsAfterOffset(&incognito_title, 0, L"&", L"");
incognito->SetTitle(incognito_title);
incognito->SetIcon(chrome_path, 0, false);
@@ -576,7 +577,7 @@ void JumpList::OnMostVisitedURLsAvailable(
const history::MostVisitedURL& url = data[i];
scoped_refptr<ShellLinkItem> link(new ShellLinkItem);
std::string url_string = url.url.spec();
- link->SetArguments(UTF8ToWide(url_string));
+ link->SetArguments(base::UTF8ToWide(url_string));
link->SetTitle(!url.title.empty()? url.title : link->arguments());
most_visited_pages_.push_back(link);
icon_urls_.push_back(make_pair(url_string, link));
@@ -645,7 +646,7 @@ bool JumpList::AddTab(const TabRestoreService::Tab* tab,
const sessions::SerializedNavigationEntry& current_navigation =
tab->navigations.at(tab->current_navigation_index);
std::string url = current_navigation.virtual_url().spec();
- link->SetArguments(UTF8ToWide(url));
+ link->SetArguments(base::UTF8ToWide(url));
link->SetTitle(current_navigation.title());
list->push_back(link);
icon_urls_.push_back(make_pair(url, link));
diff --git a/chrome/browser/local_discovery/privet_notifications.cc b/chrome/browser/local_discovery/privet_notifications.cc
index d42f915..f395ce5 100644
--- a/chrome/browser/local_discovery/privet_notifications.cc
+++ b/chrome/browser/local_discovery/privet_notifications.cc
@@ -269,7 +269,7 @@ void PrivetNotificationService::PrivetNotify(bool has_multiple,
blink::WebTextDirectionDefault,
message_center::NotifierId(GURL(kPrivetNotificationOriginUrl)),
product_name,
- UTF8ToUTF16(kPrivetNotificationID),
+ base::UTF8ToUTF16(kPrivetNotificationID),
rich_notification_data,
new PrivetNotificationDelegate(profile_));
diff --git a/chrome/browser/managed_mode/managed_mode_browsertest.cc b/chrome/browser/managed_mode/managed_mode_browsertest.cc
index a7f02e3..3e89c2d 100644
--- a/chrome/browser/managed_mode/managed_mode_browsertest.cc
+++ b/chrome/browser/managed_mode/managed_mode_browsertest.cc
@@ -136,7 +136,7 @@ class ManagedModeBlockModeTest : public InProcessBrowserTest {
CancelableRequestConsumer history_request_consumer;
base::RunLoop run_loop;
history_service->QueryHistory(
- UTF8ToUTF16(text_query),
+ base::UTF8ToUTF16(text_query),
options,
&history_request_consumer,
base::Bind(&ManagedModeBlockModeTest::QueryHistoryComplete,
diff --git a/chrome/browser/managed_mode/managed_mode_interstitial.cc b/chrome/browser/managed_mode/managed_mode_interstitial.cc
index cfa05e2..75dad74 100644
--- a/chrome/browser/managed_mode/managed_mode_interstitial.cc
+++ b/chrome/browser/managed_mode/managed_mode_interstitial.cc
@@ -113,7 +113,7 @@ std::string ManagedModeInterstitial::GetHTMLContents() {
strings.SetBoolean("allowAccessRequests", allow_access_requests);
base::string16 custodian =
- UTF8ToUTF16(managed_user_service->GetCustodianName());
+ base::UTF8ToUTF16(managed_user_service->GetCustodianName());
strings.SetString(
"blockPageMessage",
allow_access_requests
diff --git a/chrome/browser/managed_mode/managed_mode_site_list.cc b/chrome/browser/managed_mode/managed_mode_site_list.cc
index 115a10b..e254381 100644
--- a/chrome/browser/managed_mode/managed_mode_site_list.cc
+++ b/chrome/browser/managed_mode/managed_mode_site_list.cc
@@ -151,7 +151,7 @@ void ManagedModeSiteList::GetCategoryNames(
std::vector<base::string16>* categories) {
// TODO(bauerb): Collect custom categories from extensions.
for (size_t i = 0; i < arraysize(g_categories); ++i) {
- categories->push_back(ASCIIToUTF16(g_categories[i].name));
+ categories->push_back(base::ASCIIToUTF16(g_categories[i].name));
}
}
diff --git a/chrome/browser/managed_mode/managed_user_registration_utility_unittest.cc b/chrome/browser/managed_mode/managed_user_registration_utility_unittest.cc
index 19da211..b0917d9 100644
--- a/chrome/browser/managed_mode/managed_user_registration_utility_unittest.cc
+++ b/chrome/browser/managed_mode/managed_user_registration_utility_unittest.cc
@@ -232,7 +232,7 @@ TEST_F(ManagedUserRegistrationUtilityTest, Register) {
StartInitialSync();
GetRegistrationUtility()->Register(
ManagedUserRegistrationUtility::GenerateNewManagedUserId(),
- ManagedUserRegistrationInfo(ASCIIToUTF16("Dug"), 0),
+ ManagedUserRegistrationInfo(base::ASCIIToUTF16("Dug"), 0),
GetRegistrationCallback());
EXPECT_EQ(1u, prefs()->GetDictionary(prefs::kManagedUsers)->size());
Acknowledge();
@@ -245,7 +245,7 @@ TEST_F(ManagedUserRegistrationUtilityTest, Register) {
TEST_F(ManagedUserRegistrationUtilityTest, RegisterBeforeInitialSync) {
GetRegistrationUtility()->Register(
ManagedUserRegistrationUtility::GenerateNewManagedUserId(),
- ManagedUserRegistrationInfo(ASCIIToUTF16("Nemo"), 5),
+ ManagedUserRegistrationInfo(base::ASCIIToUTF16("Nemo"), 5),
GetRegistrationCallback());
EXPECT_EQ(1u, prefs()->GetDictionary(prefs::kManagedUsers)->size());
StartInitialSync();
@@ -260,7 +260,7 @@ TEST_F(ManagedUserRegistrationUtilityTest, SyncServiceShutdownBeforeRegFinish) {
StartInitialSync();
GetRegistrationUtility()->Register(
ManagedUserRegistrationUtility::GenerateNewManagedUserId(),
- ManagedUserRegistrationInfo(ASCIIToUTF16("Remy"), 12),
+ ManagedUserRegistrationInfo(base::ASCIIToUTF16("Remy"), 12),
GetRegistrationCallback());
EXPECT_EQ(1u, prefs()->GetDictionary(prefs::kManagedUsers)->size());
service()->Shutdown();
@@ -274,7 +274,7 @@ TEST_F(ManagedUserRegistrationUtilityTest, StopSyncingBeforeRegFinish) {
StartInitialSync();
GetRegistrationUtility()->Register(
ManagedUserRegistrationUtility::GenerateNewManagedUserId(),
- ManagedUserRegistrationInfo(ASCIIToUTF16("Mike"), 17),
+ ManagedUserRegistrationInfo(base::ASCIIToUTF16("Mike"), 17),
GetRegistrationCallback());
EXPECT_EQ(1u, prefs()->GetDictionary(prefs::kManagedUsers)->size());
service()->StopSyncing(MANAGED_USERS);
diff --git a/chrome/browser/managed_mode/managed_user_service.cc b/chrome/browser/managed_mode/managed_user_service.cc
index b7c60ac..46cf3a8 100644
--- a/chrome/browser/managed_mode/managed_user_service.cc
+++ b/chrome/browser/managed_mode/managed_user_service.cc
@@ -241,8 +241,8 @@ std::string ManagedUserService::GetCustodianEmailAddress() const {
std::string ManagedUserService::GetCustodianName() const {
#if defined(OS_CHROMEOS)
- return UTF16ToUTF8(chromeos::UserManager::Get()->GetSupervisedUserManager()->
- GetManagerDisplayName(
+ return base::UTF16ToUTF8(chromeos::UserManager::Get()->
+ GetSupervisedUserManager()->GetManagerDisplayName(
chromeos::UserManager::Get()->GetActiveUser()->email()));
#else
std::string name = profile_->GetPrefs()->GetString(
@@ -586,7 +586,7 @@ void ManagedUserService::RegisterAndInitSync(
DCHECK(ProfileIsManaged());
DCHECK(!custodian_profile->IsManaged());
- base::string16 name = UTF8ToUTF16(
+ base::string16 name = base::UTF8ToUTF16(
profile_->GetPrefs()->GetString(prefs::kProfileName));
int avatar_index = profile_->GetPrefs()->GetInteger(
prefs::kProfileAvatarIndex);
@@ -611,7 +611,7 @@ void ManagedUserService::RegisterAndInitSync(
void ManagedUserService::OnCustodianProfileDownloaded(
const base::string16& full_name) {
profile_->GetPrefs()->SetString(prefs::kManagedUserCustodianName,
- UTF16ToUTF8(full_name));
+ base::UTF16ToUTF8(full_name));
}
void ManagedUserService::OnManagedUserRegistered(
diff --git a/chrome/browser/managed_mode/managed_user_service_browsertest.cc b/chrome/browser/managed_mode/managed_user_service_browsertest.cc
index d396822..ae89fcc 100644
--- a/chrome/browser/managed_mode/managed_user_service_browsertest.cc
+++ b/chrome/browser/managed_mode/managed_user_service_browsertest.cc
@@ -47,7 +47,7 @@ IN_PROC_BROWSER_TEST_F(ManagedUserServiceTest, ProfileName) {
const ProfileInfoCache& cache = profile_manager->GetProfileInfoCache();
size_t profile_index = cache.GetIndexOfProfileWithPath(profile->GetPath());
EXPECT_EQ(original_name,
- UTF16ToUTF8(cache.GetNameOfProfileAtIndex(profile_index)));
+ base::UTF16ToUTF8(cache.GetNameOfProfileAtIndex(profile_index)));
}
IN_PROC_BROWSER_TEST_F(ManagedUserServiceTestManaged, LocalPolicies) {
@@ -74,7 +74,8 @@ IN_PROC_BROWSER_TEST_F(ManagedUserServiceTestManaged, ProfileName) {
EXPECT_FALSE(prefs->IsUserModifiablePreference(prefs::kProfileName));
EXPECT_EQ(name, prefs->GetString(prefs::kProfileName));
size_t profile_index = cache.GetIndexOfProfileWithPath(profile->GetPath());
- EXPECT_EQ(name, UTF16ToUTF8(cache.GetNameOfProfileAtIndex(profile_index)));
+ EXPECT_EQ(name,
+ base::UTF16ToUTF8(cache.GetNameOfProfileAtIndex(profile_index)));
// Change the name once more.
std::string new_name = "New Managed User Test Name";
@@ -84,7 +85,7 @@ IN_PROC_BROWSER_TEST_F(ManagedUserServiceTestManaged, ProfileName) {
EXPECT_EQ(new_name, prefs->GetString(prefs::kProfileName));
profile_index = cache.GetIndexOfProfileWithPath(profile->GetPath());
EXPECT_EQ(new_name,
- UTF16ToUTF8(cache.GetNameOfProfileAtIndex(profile_index)));
+ base::UTF16ToUTF8(cache.GetNameOfProfileAtIndex(profile_index)));
// Remove the setting.
settings->SetLocalSettingForTesting(managed_users::kUserName,
@@ -92,5 +93,5 @@ IN_PROC_BROWSER_TEST_F(ManagedUserServiceTestManaged, ProfileName) {
EXPECT_EQ(original_name, prefs->GetString(prefs::kProfileName));
profile_index = cache.GetIndexOfProfileWithPath(profile->GetPath());
EXPECT_EQ(original_name,
- UTF16ToUTF8(cache.GetNameOfProfileAtIndex(profile_index)));
+ base::UTF16ToUTF8(cache.GetNameOfProfileAtIndex(profile_index)));
}
diff --git a/chrome/browser/managed_mode/managed_user_service_unittest.cc b/chrome/browser/managed_mode/managed_user_service_unittest.cc
index 3466fd6..d57ec9e 100644
--- a/chrome/browser/managed_mode/managed_user_service_unittest.cc
+++ b/chrome/browser/managed_mode/managed_user_service_unittest.cc
@@ -341,8 +341,8 @@ TEST_F(ManagedUserServiceExtensionTest, InstallContentPacks) {
std::vector<ManagedModeSiteList::Site> sites;
site_lists[0]->GetSites(&sites);
ASSERT_EQ(3u, sites.size());
- EXPECT_EQ(ASCIIToUTF16("YouTube"), sites[0].name);
- EXPECT_EQ(ASCIIToUTF16("Homestar Runner"), sites[1].name);
+ EXPECT_EQ(base::ASCIIToUTF16("YouTube"), sites[0].name);
+ EXPECT_EQ(base::ASCIIToUTF16("Homestar Runner"), sites[1].name);
EXPECT_EQ(base::string16(), sites[2].name);
EXPECT_EQ(ManagedModeURLFilter::ALLOW,
@@ -367,7 +367,7 @@ TEST_F(ManagedUserServiceExtensionTest, InstallContentPacks) {
std::set<std::string> site_names;
for (std::vector<ManagedModeSiteList::Site>::const_iterator it =
sites.begin(); it != sites.end(); ++it) {
- site_names.insert(UTF16ToUTF8(it->name));
+ site_names.insert(base::UTF16ToUTF8(it->name));
}
EXPECT_TRUE(site_names.count("YouTube") == 1u);
EXPECT_TRUE(site_names.count("Homestar Runner") == 1u);
@@ -389,7 +389,7 @@ TEST_F(ManagedUserServiceExtensionTest, InstallContentPacks) {
sites.clear();
site_lists[0]->GetSites(&sites);
ASSERT_EQ(1u, sites.size());
- EXPECT_EQ(ASCIIToUTF16("Moose"), sites[0].name);
+ EXPECT_EQ(base::ASCIIToUTF16("Moose"), sites[0].name);
EXPECT_EQ(ManagedModeURLFilter::WARN,
url_filter->GetFilteringBehaviorForURL(example_url));
diff --git a/chrome/browser/media/encrypted_media_browsertest.cc b/chrome/browser/media/encrypted_media_browsertest.cc
index bedf5b4..99c16a0 100644
--- a/chrome/browser/media/encrypted_media_browsertest.cc
+++ b/chrome/browser/media/encrypted_media_browsertest.cc
@@ -146,8 +146,8 @@ class EncryptedMediaTestBase : public MediaBrowserTest {
// We want to fail quickly when a test fails because an error is encountered.
virtual void AddWaitForTitles(content::TitleWatcher* title_watcher) OVERRIDE {
MediaBrowserTest::AddWaitForTitles(title_watcher);
- title_watcher->AlsoWaitForTitle(ASCIIToUTF16(kEmeNotSupportedError));
- title_watcher->AlsoWaitForTitle(ASCIIToUTF16(kEmeKeyError));
+ title_watcher->AlsoWaitForTitle(base::ASCIIToUTF16(kEmeNotSupportedError));
+ title_watcher->AlsoWaitForTitle(base::ASCIIToUTF16(kEmeKeyError));
}
virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE {
@@ -188,7 +188,7 @@ class EncryptedMediaTestBase : public MediaBrowserTest {
base::FilePath::StringType pepper_plugin = plugin_lib.value();
pepper_plugin.append(FILE_PATH_LITERAL("#CDM#0.1.0.0;"));
#if defined(OS_WIN)
- pepper_plugin.append(ASCIIToWide(GetPepperType(key_system)));
+ pepper_plugin.append(base::ASCIIToWide(GetPepperType(key_system)));
#else
pepper_plugin.append(GetPepperType(key_system));
#endif
diff --git a/chrome/browser/media/encrypted_media_istypesupported_browsertest.cc b/chrome/browser/media/encrypted_media_istypesupported_browsertest.cc
index 748089d..ed0e4da 100644
--- a/chrome/browser/media/encrypted_media_istypesupported_browsertest.cc
+++ b/chrome/browser/media/encrypted_media_istypesupported_browsertest.cc
@@ -166,7 +166,7 @@ class EncryptedMediaIsTypeSupportedTest : public InProcessBrowserTest {
base::FilePath::StringType pepper_plugin = plugin_lib.value();
pepper_plugin.append(FILE_PATH_LITERAL("#CDM#0.1.0.0;"));
#if defined(OS_WIN)
- pepper_plugin.append(ASCIIToWide(pepper_type_for_key_system));
+ pepper_plugin.append(base::ASCIIToWide(pepper_type_for_key_system));
#else
pepper_plugin.append(pepper_type_for_key_system);
#endif
diff --git a/chrome/browser/media/media_browsertest.cc b/chrome/browser/media/media_browsertest.cc
index 146309c..53a9a2a 100644
--- a/chrome/browser/media/media_browsertest.cc
+++ b/chrome/browser/media/media_browsertest.cc
@@ -50,7 +50,7 @@ void MediaBrowserTest::RunMediaTestPage(
}
base::string16 final_title = RunTest(gurl, expected_title);
- EXPECT_EQ(ASCIIToUTF16(expected_title), final_title);
+ EXPECT_EQ(base::ASCIIToUTF16(expected_title), final_title);
}
base::string16 MediaBrowserTest::RunTest(const GURL& gurl,
@@ -58,7 +58,7 @@ base::string16 MediaBrowserTest::RunTest(const GURL& gurl,
DVLOG(1) << "Running test URL: " << gurl;
content::TitleWatcher title_watcher(
browser()->tab_strip_model()->GetActiveWebContents(),
- ASCIIToUTF16(expected_title));
+ base::ASCIIToUTF16(expected_title));
AddWaitForTitles(&title_watcher);
ui_test_utils::NavigateToURL(browser(), gurl);
@@ -66,7 +66,7 @@ base::string16 MediaBrowserTest::RunTest(const GURL& gurl,
}
void MediaBrowserTest::AddWaitForTitles(content::TitleWatcher* title_watcher) {
- title_watcher->AlsoWaitForTitle(ASCIIToUTF16(kEnded));
- title_watcher->AlsoWaitForTitle(ASCIIToUTF16(kError));
- title_watcher->AlsoWaitForTitle(ASCIIToUTF16(kFailed));
+ title_watcher->AlsoWaitForTitle(base::ASCIIToUTF16(kEnded));
+ title_watcher->AlsoWaitForTitle(base::ASCIIToUTF16(kError));
+ title_watcher->AlsoWaitForTitle(base::ASCIIToUTF16(kFailed));
}
diff --git a/chrome/browser/media/media_capture_devices_dispatcher.cc b/chrome/browser/media/media_capture_devices_dispatcher.cc
index 7b4f2a5..29c7afb 100644
--- a/chrome/browser/media/media_capture_devices_dispatcher.cc
+++ b/chrome/browser/media/media_capture_devices_dispatcher.cc
@@ -116,7 +116,7 @@ base::string16 GetApplicationTitle(content::WebContents* web_contents,
} else {
title = web_contents->GetURL().GetOrigin().spec();
}
- return UTF8ToUTF16(title);
+ return base::UTF8ToUTF16(title);
}
// Helper to get list of media stream devices for desktop capture in |devices|.
@@ -361,7 +361,7 @@ void MediaCaptureDevicesDispatcher::ProcessScreenCaptureAccessRequest(
// For component extensions, bypass message box.
bool user_approved = false;
if (!component_extension) {
- base::string16 application_name = UTF8ToUTF16(
+ base::string16 application_name = base::UTF8ToUTF16(
extension ? extension->name() : request.security_origin.spec());
base::string16 confirmation_text = l10n_util::GetStringFUTF16(
request.audio_type == content::MEDIA_NO_SERVICE ?
diff --git a/chrome/browser/media/media_stream_capture_indicator.cc b/chrome/browser/media/media_stream_capture_indicator.cc
index 6b2d9b0..794eb96 100644
--- a/chrome/browser/media/media_stream_capture_indicator.cc
+++ b/chrome/browser/media/media_stream_capture_indicator.cc
@@ -74,7 +74,7 @@ base::string16 GetSecurityOrigin(WebContents* web_contents) {
security_origin.erase(it);
}
- return UTF8ToUTF16(security_origin);
+ return base::UTF8ToUTF16(security_origin);
}
base::string16 GetTitle(WebContents* web_contents) {
@@ -85,7 +85,7 @@ base::string16 GetTitle(WebContents* web_contents) {
const extensions::Extension* const extension = GetExtension(web_contents);
if (extension)
- return UTF8ToUTF16(extension->name());
+ return base::UTF8ToUTF16(extension->name());
base::string16 tab_title = web_contents->GetTitle();
diff --git a/chrome/browser/media/media_stream_infobar_delegate.cc b/chrome/browser/media/media_stream_infobar_delegate.cc
index 0828f2d..0698d09 100644
--- a/chrome/browser/media/media_stream_infobar_delegate.cc
+++ b/chrome/browser/media/media_stream_infobar_delegate.cc
@@ -102,7 +102,7 @@ base::string16 MediaStreamInfoBarDelegate::GetMessageText() const {
else if (!controller_->HasVideo())
message_id = IDS_MEDIA_CAPTURE_AUDIO_ONLY;
return l10n_util::GetStringFUTF16(
- message_id, UTF8ToUTF16(controller_->GetSecurityOriginSpec()));
+ message_id, base::UTF8ToUTF16(controller_->GetSecurityOriginSpec()));
}
base::string16 MediaStreamInfoBarDelegate::GetButtonLabel(
diff --git a/chrome/browser/media/native_desktop_media_list_unittest.cc b/chrome/browser/media/native_desktop_media_list_unittest.cc
index a4cd9f9..988156d 100644
--- a/chrome/browser/media/native_desktop_media_list_unittest.cc
+++ b/chrome/browser/media/native_desktop_media_list_unittest.cc
@@ -189,7 +189,7 @@ TEST_F(DesktopMediaListTest, InitialSourceList) {
EXPECT_EQ(model_->GetSource(0).id.id, 0);
EXPECT_EQ(model_->GetSource(1).id.type, content::DesktopMediaID::TYPE_WINDOW);
EXPECT_EQ(model_->GetSource(1).id.id, 0);
- EXPECT_EQ(model_->GetSource(1).name, UTF8ToUTF16(window.title));
+ EXPECT_EQ(model_->GetSource(1).name, base::UTF8ToUTF16(window.title));
}
// Verifies that the window specified with SetViewDialogWindowId() is filtered
@@ -229,7 +229,7 @@ TEST_F(DesktopMediaListTest, Filtering) {
EXPECT_EQ(model_->GetSource(0).id.id, 0);
EXPECT_EQ(model_->GetSource(1).id.type, content::DesktopMediaID::TYPE_WINDOW);
EXPECT_EQ(model_->GetSource(1).id.id, 1);
- EXPECT_EQ(model_->GetSource(1).name, UTF8ToUTF16(window.title));
+ EXPECT_EQ(model_->GetSource(1).name, base::UTF8ToUTF16(window.title));
}
TEST_F(DesktopMediaListTest, WindowsOnly) {
diff --git a/chrome/browser/media_galleries/media_galleries_dialog_controller.cc b/chrome/browser/media_galleries/media_galleries_dialog_controller.cc
index c2648c2..aa35c7e 100644
--- a/chrome/browser/media_galleries/media_galleries_dialog_controller.cc
+++ b/chrome/browser/media_galleries/media_galleries_dialog_controller.cc
@@ -132,7 +132,7 @@ MediaGalleriesDialogController::~MediaGalleriesDialogController() {
base::string16 MediaGalleriesDialogController::GetHeader() const {
return l10n_util::GetStringFUTF16(IDS_MEDIA_GALLERIES_DIALOG_HEADER,
- UTF8ToUTF16(extension_->name()));
+ base::UTF8ToUTF16(extension_->name()));
}
base::string16 MediaGalleriesDialogController::GetSubtext() const {
@@ -155,7 +155,7 @@ base::string16 MediaGalleriesDialogController::GetSubtext() const {
else
id = IDS_MEDIA_GALLERIES_DIALOG_SUBTEXT_READ_ONLY;
- return l10n_util::GetStringFUTF16(id, UTF8ToUTF16(extension_->name()));
+ return l10n_util::GetStringFUTF16(id, base::UTF8ToUTF16(extension_->name()));
}
base::string16 MediaGalleriesDialogController::GetUnattachedLocationsHeader()
diff --git a/chrome/browser/media_galleries/media_galleries_dialog_controller_unittest.cc b/chrome/browser/media_galleries/media_galleries_dialog_controller_unittest.cc
index 94b7645..1821d9f 100644
--- a/chrome/browser/media_galleries/media_galleries_dialog_controller_unittest.cc
+++ b/chrome/browser/media_galleries/media_galleries_dialog_controller_unittest.cc
@@ -30,11 +30,11 @@ TEST(MediaGalleriesDialogControllerTest, TestNameGeneration) {
#endif
EXPECT_EQ(galleryName, GalleryName(gallery));
- gallery.display_name = ASCIIToUTF16("override");
+ gallery.display_name = base::ASCIIToUTF16("override");
EXPECT_EQ("override", GalleryName(gallery));
gallery.display_name = base::string16();
- gallery.volume_label = ASCIIToUTF16("label");
+ gallery.volume_label = base::ASCIIToUTF16("label");
EXPECT_EQ(galleryName, GalleryName(gallery));
gallery.path = base::FilePath(FILE_PATH_LITERAL("sub/gallery2"));
@@ -52,12 +52,12 @@ TEST(MediaGalleriesDialogControllerTest, TestNameGeneration) {
gallery.device_id = StorageInfo::MakeDeviceId(
StorageInfo::REMOVABLE_MASS_STORAGE_WITH_DCIM,
"/path/to/dcim");
- gallery.display_name = ASCIIToUTF16("override");
+ gallery.display_name = base::ASCIIToUTF16("override");
EXPECT_EQ("override", GalleryName(gallery));
- gallery.volume_label = ASCIIToUTF16("volume");
- gallery.vendor_name = ASCIIToUTF16("vendor");
- gallery.model_name = ASCIIToUTF16("model");
+ gallery.volume_label = base::ASCIIToUTF16("volume");
+ gallery.vendor_name = base::ASCIIToUTF16("vendor");
+ gallery.model_name = base::ASCIIToUTF16("model");
EXPECT_EQ("override", GalleryName(gallery));
gallery.display_name = base::string16();
diff --git a/chrome/browser/media_galleries/media_galleries_preferences.cc b/chrome/browser/media_galleries/media_galleries_preferences.cc
index 4b44d30..b7df25c 100644
--- a/chrome/browser/media_galleries/media_galleries_preferences.cc
+++ b/chrome/browser/media_galleries/media_galleries_preferences.cc
@@ -251,7 +251,8 @@ base::string16 GetDisplayNameForDevice(uint64 storage_size_in_bytes,
const base::string16& name) {
DCHECK(!name.empty());
return (storage_size_in_bytes == 0) ?
- name : ui::FormatBytes(storage_size_in_bytes) + ASCIIToUTF16(" ") + name;
+ name :
+ ui::FormatBytes(storage_size_in_bytes) + base::ASCIIToUTF16(" ") + name;
}
// For a device with |device_name| and a relative path |sub_folder|, construct
@@ -261,7 +262,7 @@ base::string16 GetDisplayNameForSubFolder(const base::string16& device_name,
if (sub_folder.empty())
return device_name;
return (sub_folder.BaseName().LossyDisplayName() +
- ASCIIToUTF16(" - ") +
+ base::ASCIIToUTF16(" - ") +
device_name);
}
@@ -276,7 +277,7 @@ base::string16 GetFullProductName(const base::string16& vendor_name,
else if (model_name.empty())
product_name = vendor_name;
else if (!vendor_name.empty() && !model_name.empty())
- product_name = vendor_name + UTF8ToUTF16(", ") + model_name;
+ product_name = vendor_name + base::UTF8ToUTF16(", ") + model_name;
return product_name;
}
@@ -563,7 +564,7 @@ void MediaGalleriesPreferences::OnFinderDeviceID(const std::string& device_id) {
else
NOTREACHED();
- AddGalleryInternal(device_id, ASCIIToUTF16(gallery_name),
+ AddGalleryInternal(device_id, base::ASCIIToUTF16(gallery_name),
base::FilePath(), false /*not user added*/,
base::string16(), base::string16(), base::string16(), 0,
base::Time(), false, 2);
diff --git a/chrome/browser/media_galleries/media_galleries_preferences_unittest.cc b/chrome/browser/media_galleries/media_galleries_preferences_unittest.cc
index 45d1b5e..4ddd8f7 100644
--- a/chrome/browser/media_galleries/media_galleries_preferences_unittest.cc
+++ b/chrome/browser/media_galleries/media_galleries_preferences_unittest.cc
@@ -34,6 +34,8 @@
#include "chrome/browser/chromeos/settings/device_settings_service.h"
#endif
+using base::ASCIIToUTF16;
+
namespace {
class MockGalleryChangeObserver
@@ -284,7 +286,8 @@ class MediaGalleriesPreferencesTest : public testing::Test {
base::FilePath MakePath(std::string dir) {
#if defined(OS_WIN)
- return base::FilePath(FILE_PATH_LITERAL("C:\\")).Append(UTF8ToWide(dir));
+ return
+ base::FilePath(FILE_PATH_LITERAL("C:\\")).Append(base::UTF8ToWide(dir));
#elif defined(OS_POSIX)
return base::FilePath(FILE_PATH_LITERAL("/")).Append(dir);
#else
@@ -875,7 +878,7 @@ TEST(MediaGalleryPrefInfoTest, NameGeneration) {
info.device_id = StorageInfo::MakeDeviceId(
StorageInfo::FIXED_MASS_STORAGE, "unique");
EXPECT_EQ(base::FilePath(FILE_PATH_LITERAL("unique")).AsUTF8Unsafe(),
- UTF16ToUTF8(info.GetGalleryTooltip()));
+ base::UTF16ToUTF8(info.GetGalleryTooltip()));
TestStorageMonitor::RemoveSingleton();
}
diff --git a/chrome/browser/media_galleries/win/mtp_device_delegate_impl_win.cc b/chrome/browser/media_galleries/win/mtp_device_delegate_impl_win.cc
index 2b4775a..9a9c442 100644
--- a/chrome/browser/media_galleries/win/mtp_device_delegate_impl_win.cc
+++ b/chrome/browser/media_galleries/win/mtp_device_delegate_impl_win.cc
@@ -50,7 +50,7 @@ bool GetStorageInfoOnUIThread(const base::string16& storage_path,
StorageMonitor* monitor = StorageMonitor::GetInstance();
DCHECK(monitor);
return monitor->GetMTPStorageInfoFromDeviceId(
- UTF16ToUTF8(storage_device_id), pnp_device_id, storage_object_id);
+ base::UTF16ToUTF8(storage_device_id), pnp_device_id, storage_object_id);
}
// Returns the object id of the file object specified by the |file_path|,
diff --git a/chrome/browser/memory_details.cc b/chrome/browser/memory_details.cc
index b985564..a95d9d2 100644
--- a/chrome/browser/memory_details.cc
+++ b/chrome/browser/memory_details.cc
@@ -157,7 +157,7 @@ std::string MemoryDetails::ToLogString() {
iter2 != iter1->titles.end(); ++iter2) {
if (iter2 != iter1->titles.begin())
log += "|";
- log += UTF16ToUTF8(*iter2);
+ log += base::UTF16ToUTF8(*iter2);
}
log += "]";
}
@@ -281,7 +281,7 @@ void MemoryDetails::CollectChildInfoOnUIThread() {
const Extension* extension =
extension_service->extensions()->GetByID(url.host());
if (extension) {
- base::string16 title = UTF8ToUTF16(extension->name());
+ base::string16 title = base::UTF8ToUTF16(extension->name());
process.titles.push_back(title);
process.renderer_type =
ProcessMemoryInformation::RENDERER_EXTENSION;
@@ -296,14 +296,14 @@ void MemoryDetails::CollectChildInfoOnUIThread() {
}
if (type == extensions::VIEW_TYPE_BACKGROUND_CONTENTS) {
- process.titles.push_back(UTF8ToUTF16(url.spec()));
+ process.titles.push_back(base::UTF8ToUTF16(url.spec()));
process.renderer_type =
ProcessMemoryInformation::RENDERER_BACKGROUND_APP;
continue;
}
if (type == extensions::VIEW_TYPE_NOTIFICATION) {
- process.titles.push_back(UTF8ToUTF16(url.spec()));
+ process.titles.push_back(base::UTF8ToUTF16(url.spec()));
process.renderer_type =
ProcessMemoryInformation::RENDERER_NOTIFICATION;
continue;
diff --git a/chrome/browser/memory_details_linux.cc b/chrome/browser/memory_details_linux.cc
index 03f000e..3da6ec7 100644
--- a/chrome/browser/memory_details_linux.cc
+++ b/chrome/browser/memory_details_linux.cc
@@ -198,7 +198,7 @@ void MemoryDetails::CollectProcessData(
ProcessData current_browser =
GetProcessDataMemoryInformation(GetAllChildren(process_map, getpid()));
current_browser.name = l10n_util::GetStringUTF16(IDS_SHORT_PRODUCT_NAME);
- current_browser.process_name = ASCIIToUTF16("chrome");
+ current_browser.process_name = base::ASCIIToUTF16("chrome");
for (std::vector<ProcessMemoryInformation>::iterator
i = current_browser.processes.begin();
@@ -229,7 +229,7 @@ void MemoryDetails::CollectProcessData(
continue;
BrowserType type = GetBrowserType(process_iter->second.name);
if (type != MAX_BROWSERS)
- browser.name = ASCIIToUTF16(kBrowserPrettyNames[type]);
+ browser.name = base::ASCIIToUTF16(kBrowserPrettyNames[type]);
process_data_.push_back(browser);
}
diff --git a/chrome/browser/memory_details_mac.cc b/chrome/browser/memory_details_mac.cc
index f6ec121..32d8b79 100644
--- a/chrome/browser/memory_details_mac.cc
+++ b/chrome/browser/memory_details_mac.cc
@@ -72,8 +72,9 @@ MemoryDetails::MemoryDetails()
for (size_t index = 0; index < MAX_BROWSERS; ++index) {
ProcessData process;
- process.name = UTF8ToUTF16(process_template[index].name);
- process.process_name = UTF8ToUTF16(process_template[index].process_name);
+ process.name = base::UTF8ToUTF16(process_template[index].name);
+ process.process_name =
+ base::UTF8ToUTF16(process_template[index].process_name);
process_data_.push_back(process);
}
}
@@ -104,7 +105,7 @@ void MemoryDetails::CollectProcessData(
std::vector<base::ProcessId> all_pids;
for (size_t index = CHROME_BROWSER; index < MAX_BROWSERS; index++) {
base::NamedProcessIterator process_it(
- UTF16ToUTF8(process_data_[index].process_name), NULL);
+ base::UTF16ToUTF8(process_data_[index].process_name), NULL);
while (const base::ProcessEntry* entry = process_it.NextProcessEntry()) {
pids_by_browser[index].push_back(entry->pid());
@@ -214,8 +215,8 @@ void MemoryDetails::CollectProcessDataChrome(
chrome::VersionInfo version_info;
if (version_info.is_valid()) {
- info.product_name = ASCIIToUTF16(version_info.Name());
- info.version = ASCIIToUTF16(version_info.Version());
+ info.product_name = base::ASCIIToUTF16(version_info.Name());
+ info.version = base::ASCIIToUTF16(version_info.Version());
} else {
info.product_name = process_data_[CHROME_BROWSER].name;
info.version = base::string16();
diff --git a/chrome/browser/memory_details_win.cc b/chrome/browser/memory_details_win.cc
index ab9d36b..950ef5c 100644
--- a/chrome/browser/memory_details_win.cc
+++ b/chrome/browser/memory_details_win.cc
@@ -39,7 +39,7 @@ enum {
MemoryDetails::MemoryDetails()
: user_metrics_mode_(UPDATE_USER_METRICS) {
static const std::wstring google_browser_name =
- UTF16ToWide(l10n_util::GetStringUTF16(IDS_PRODUCT_NAME));
+ base::UTF16ToWide(l10n_util::GetStringUTF16(IDS_PRODUCT_NAME));
struct {
const wchar_t* name;
const wchar_t* process_name;
@@ -123,7 +123,7 @@ void MemoryDetails::CollectProcessData(
if (index2 == CHROME_BROWSER || index2 == CHROME_NACL_PROCESS) {
chrome::VersionInfo version_info;
if (version_info.is_valid())
- info.version = ASCIIToWide(version_info.Version());
+ info.version = base::ASCIIToWide(version_info.Version());
// Check if this is one of the child processes whose data we collected
// on the IO thread, and if so copy over that data.
for (size_t child = 0; child < child_info.size(); child++) {
diff --git a/chrome/browser/metrics/metrics_log.cc b/chrome/browser/metrics/metrics_log.cc
index d96d41f..cc23145 100644
--- a/chrome/browser/metrics/metrics_log.cc
+++ b/chrome/browser/metrics/metrics_log.cc
@@ -242,9 +242,9 @@ PluginPrefs* GetPluginPrefs() {
void SetPluginInfo(const content::WebPluginInfo& plugin_info,
const PluginPrefs* plugin_prefs,
SystemProfileProto::Plugin* plugin) {
- plugin->set_name(UTF16ToUTF8(plugin_info.name));
+ plugin->set_name(base::UTF16ToUTF8(plugin_info.name));
plugin->set_filename(plugin_info.path.BaseName().AsUTF8Unsafe());
- plugin->set_version(UTF16ToUTF8(plugin_info.version));
+ plugin->set_version(base::UTF16ToUTF8(plugin_info.version));
plugin->set_is_pepper(plugin_info.is_pepper_plugin());
if (plugin_prefs)
plugin->set_is_disabled(!plugin_prefs->IsPluginEnabled(plugin_info));
diff --git a/chrome/browser/metrics/metrics_log_unittest.cc b/chrome/browser/metrics/metrics_log_unittest.cc
index bd39ea0..d95203f 100644
--- a/chrome/browser/metrics/metrics_log_unittest.cc
+++ b/chrome/browser/metrics/metrics_log_unittest.cc
@@ -79,9 +79,9 @@ content::WebPluginInfo CreateFakePluginInfo(
const base::FilePath::CharType* path,
const std::string& version,
bool is_pepper) {
- content::WebPluginInfo plugin(UTF8ToUTF16(name),
+ content::WebPluginInfo plugin(base::UTF8ToUTF16(name),
base::FilePath(path),
- UTF8ToUTF16(version),
+ base::UTF8ToUTF16(version),
base::string16());
if (is_pepper)
plugin.type = content::WebPluginInfo::PLUGIN_TYPE_PEPPER_IN_PROCESS;
diff --git a/chrome/browser/metrics/metrics_service.cc b/chrome/browser/metrics/metrics_service.cc
index d220080..64ea202 100644
--- a/chrome/browser/metrics/metrics_service.cc
+++ b/chrome/browser/metrics/metrics_service.cc
@@ -1908,7 +1908,7 @@ void MetricsService::RecordPluginChanges(PrefService* pref) {
}
// TODO(viettrungluu): remove conversions
- base::string16 name16 = UTF8ToUTF16(plugin_name);
+ base::string16 name16 = base::UTF8ToUTF16(plugin_name);
if (child_process_stats_buffer_.find(name16) ==
child_process_stats_buffer_.end()) {
continue;
@@ -1957,7 +1957,7 @@ void MetricsService::RecordPluginChanges(PrefService* pref) {
continue;
// TODO(viettrungluu): remove conversion
- std::string plugin_name = UTF16ToUTF8(cache_iter->first);
+ std::string plugin_name = base::UTF16ToUTF8(cache_iter->first);
base::DictionaryValue* plugin_dict = new base::DictionaryValue;
diff --git a/chrome/browser/mouseleave_browsertest.cc b/chrome/browser/mouseleave_browsertest.cc
index 726a651f..d909f1a 100644
--- a/chrome/browser/mouseleave_browsertest.cc
+++ b/chrome/browser/mouseleave_browsertest.cc
@@ -41,7 +41,7 @@ class MouseLeaveTest : public InProcessBrowserTest {
above_content_point.y());
// Navigate to the test html page.
- base::string16 load_expected_title(ASCIIToUTF16("onload"));
+ base::string16 load_expected_title(base::ASCIIToUTF16("onload"));
content::TitleWatcher load_title_watcher(tab, load_expected_title);
ui_test_utils::NavigateToURL(browser(), test_url);
// Wait for the onload() handler to complete so we can do the
@@ -53,7 +53,7 @@ class MouseLeaveTest : public InProcessBrowserTest {
ui_controls::SendMouseMove(in_content_point.x(), in_content_point.y());
// Wait on the correct intermediate title.
- base::string16 entered_expected_title(ASCIIToUTF16("entered"));
+ base::string16 entered_expected_title(base::ASCIIToUTF16("entered"));
content::TitleWatcher entered_title_watcher(tab, entered_expected_title);
EXPECT_EQ(entered_expected_title, entered_title_watcher.WaitAndGetTitle());
@@ -63,7 +63,7 @@ class MouseLeaveTest : public InProcessBrowserTest {
above_content_point.y());
// Wait on the correct final value of the cookie.
- base::string16 left_expected_title(ASCIIToUTF16("left"));
+ base::string16 left_expected_title(base::ASCIIToUTF16("left"));
content::TitleWatcher left_title_watcher(tab, left_expected_title);
EXPECT_EQ(left_expected_title, left_title_watcher.WaitAndGetTitle());
}
diff --git a/chrome/browser/net/connection_tester.cc b/chrome/browser/net/connection_tester.cc
index 85b08a9..3725515 100644
--- a/chrome/browser/net/connection_tester.cc
+++ b/chrome/browser/net/connection_tester.cc
@@ -464,13 +464,13 @@ base::string16 ConnectionTester::ProxySettingsExperimentDescription(
// TODO(eroman): Use proper string resources.
switch (experiment) {
case PROXY_EXPERIMENT_USE_DIRECT:
- return ASCIIToUTF16("Don't use any proxy");
+ return base::ASCIIToUTF16("Don't use any proxy");
case PROXY_EXPERIMENT_USE_SYSTEM_SETTINGS:
- return ASCIIToUTF16("Use system proxy settings");
+ return base::ASCIIToUTF16("Use system proxy settings");
case PROXY_EXPERIMENT_USE_FIREFOX_SETTINGS:
- return ASCIIToUTF16("Use Firefox's proxy settings");
+ return base::ASCIIToUTF16("Use Firefox's proxy settings");
case PROXY_EXPERIMENT_USE_AUTO_DETECT:
- return ASCIIToUTF16("Auto-detect proxy settings");
+ return base::ASCIIToUTF16("Auto-detect proxy settings");
default:
NOTREACHED();
return base::string16();
@@ -485,9 +485,9 @@ base::string16 ConnectionTester::HostResolverExperimentDescription(
case HOST_RESOLVER_EXPERIMENT_PLAIN:
return base::string16();
case HOST_RESOLVER_EXPERIMENT_DISABLE_IPV6:
- return ASCIIToUTF16("Disable IPv6 host resolving");
+ return base::ASCIIToUTF16("Disable IPv6 host resolving");
case HOST_RESOLVER_EXPERIMENT_IPV6_PROBE:
- return ASCIIToUTF16("Probe for IPv6 host resolving");
+ return base::ASCIIToUTF16("Probe for IPv6 host resolving");
default:
NOTREACHED();
return base::string16();
diff --git a/chrome/browser/net/proxy_browsertest.cc b/chrome/browser/net/proxy_browsertest.cc
index 8b92d2b..e197f44 100644
--- a/chrome/browser/net/proxy_browsertest.cc
+++ b/chrome/browser/net/proxy_browsertest.cc
@@ -60,8 +60,8 @@ class LoginPromptObserver : public content::NotificationObserver {
content::Details<LoginNotificationDetails>(details).ptr();
// |login_details->handler()| is the associated LoginHandler object.
// SetAuth() will close the login dialog.
- login_details->handler()->SetAuth(ASCIIToUTF16("foo"),
- ASCIIToUTF16("bar"));
+ login_details->handler()->SetAuth(base::ASCIIToUTF16("foo"),
+ base::ASCIIToUTF16("bar"));
auth_handled_ = true;
}
}
@@ -125,8 +125,8 @@ IN_PROC_BROWSER_TEST_F(ProxyBrowserTest, MAYBE_BasicAuthWSConnect) {
registrar.Add(&observer, chrome::NOTIFICATION_AUTH_NEEDED,
content::Source<content::NavigationController>(controller));
- content::TitleWatcher watcher(tab, ASCIIToUTF16("PASS"));
- watcher.AlsoWaitForTitle(ASCIIToUTF16("FAIL"));
+ content::TitleWatcher watcher(tab, base::ASCIIToUTF16("PASS"));
+ watcher.AlsoWaitForTitle(base::ASCIIToUTF16("FAIL"));
// Visit a page that tries to establish WebSocket connection. The title
// of the page will be 'PASS' on success.
diff --git a/chrome/browser/net/spdyproxy/data_reduction_proxy_settings.cc b/chrome/browser/net/spdyproxy/data_reduction_proxy_settings.cc
index 2358b81..206678e 100644
--- a/chrome/browser/net/spdyproxy/data_reduction_proxy_settings.cc
+++ b/chrome/browser/net/spdyproxy/data_reduction_proxy_settings.cc
@@ -657,7 +657,7 @@ base::string16 DataReductionProxySettings::AuthHashForSalt(int64 salt) {
std::string salted_key =
base::StringPrintf("%lld%s%lld", salt, key.c_str(), salt);
- return UTF8ToUTF16(base::MD5String(salted_key));
+ return base::UTF8ToUTF16(base::MD5String(salted_key));
}
net::URLFetcher* DataReductionProxySettings::GetURLFetcher() {
diff --git a/chrome/browser/net/spdyproxy/data_reduction_proxy_settings_unittest.cc b/chrome/browser/net/spdyproxy/data_reduction_proxy_settings_unittest.cc
index b632768..67b2264 100644
--- a/chrome/browser/net/spdyproxy/data_reduction_proxy_settings_unittest.cc
+++ b/chrome/browser/net/spdyproxy/data_reduction_proxy_settings_unittest.cc
@@ -314,7 +314,7 @@ TEST_F(DataReductionProxySettingsTest, TestAuthHashGeneration) {
AddProxyToCommandLine();
std::string salt = "8675309"; // Jenny's number to test the hash generator.
std::string salted_key = salt + kDataReductionProxyAuth + salt;
- base::string16 expected_hash = UTF8ToUTF16(base::MD5String(salted_key));
+ base::string16 expected_hash = base::UTF8ToUTF16(base::MD5String(salted_key));
EXPECT_EQ(expected_hash,
DataReductionProxySettings::AuthHashForSalt(8675309));
}
diff --git a/chrome/browser/net/spdyproxy/http_auth_handler_spdyproxy.cc b/chrome/browser/net/spdyproxy/http_auth_handler_spdyproxy.cc
index 968abf0..207fc31 100644
--- a/chrome/browser/net/spdyproxy/http_auth_handler_spdyproxy.cc
+++ b/chrome/browser/net/spdyproxy/http_auth_handler_spdyproxy.cc
@@ -114,7 +114,7 @@ int HttpAuthHandlerSpdyProxy::GenerateAuthTokenImpl(
return -1;
}
*auth_token = "SpdyProxy ps=\"" + ps_token_ + "\", sid=\"" +
- UTF16ToUTF8(credentials->password()) + "\"";
+ base::UTF16ToUTF8(credentials->password()) + "\"";
return net::OK;
}
diff --git a/chrome/browser/net/spdyproxy/http_auth_handler_spdyproxy_unittest.cc b/chrome/browser/net/spdyproxy/http_auth_handler_spdyproxy_unittest.cc
index 3d0035c..f777e2b 100644
--- a/chrome/browser/net/spdyproxy/http_auth_handler_spdyproxy_unittest.cc
+++ b/chrome/browser/net/spdyproxy/http_auth_handler_spdyproxy_unittest.cc
@@ -93,8 +93,8 @@ TEST(HttpAuthHandlerSpdyProxyTest, GenerateAuthToken) {
&spdyproxy));
if (tests[j].err1 != OK)
continue;
- AuthCredentials credentials(ASCIIToUTF16(""),
- ASCIIToUTF16("sid-string"));
+ AuthCredentials credentials(base::ASCIIToUTF16(""),
+ base::ASCIIToUTF16("sid-string"));
HttpRequestInfo request_info;
std::string auth_token;
int rv = spdyproxy->GenerateAuthToken(&credentials, &request_info,
diff --git a/chrome/browser/net/websocket_browsertest.cc b/chrome/browser/net/websocket_browsertest.cc
index 58b4f65..27bf3f9 100644
--- a/chrome/browser/net/websocket_browsertest.cc
+++ b/chrome/browser/net/websocket_browsertest.cc
@@ -44,8 +44,8 @@ IN_PROC_BROWSER_TEST_F(WebSocketBrowserTest, WebSocketSplitSegments) {
// Setup page title observer.
content::WebContents* tab =
browser()->tab_strip_model()->GetActiveWebContents();
- content::TitleWatcher watcher(tab, ASCIIToUTF16("PASS"));
- watcher.AlsoWaitForTitle(ASCIIToUTF16("FAIL"));
+ content::TitleWatcher watcher(tab, base::ASCIIToUTF16("PASS"));
+ watcher.AlsoWaitForTitle(base::ASCIIToUTF16("FAIL"));
// Visit a HTTP page for testing.
std::string scheme("http");
@@ -75,8 +75,8 @@ IN_PROC_BROWSER_TEST_F(WebSocketBrowserTest,
// Setup page title observer.
content::WebContents* tab =
browser()->tab_strip_model()->GetActiveWebContents();
- content::TitleWatcher watcher(tab, ASCIIToUTF16("PASS"));
- watcher.AlsoWaitForTitle(ASCIIToUTF16("FAIL"));
+ content::TitleWatcher watcher(tab, base::ASCIIToUTF16("PASS"));
+ watcher.AlsoWaitForTitle(base::ASCIIToUTF16("FAIL"));
// Visit a HTTPS page for testing.
std::string scheme("https");
diff --git a/chrome/browser/notifications/desktop_notification_service.cc b/chrome/browser/notifications/desktop_notification_service.cc
index 43ab144..a5dfa7f 100644
--- a/chrome/browser/notifications/desktop_notification_service.cc
+++ b/chrome/browser/notifications/desktop_notification_service.cc
@@ -222,8 +222,8 @@ base::string16 DesktopNotificationService::CreateDataUrl(
if (icon_url.is_valid()) {
resource = IDR_NOTIFICATION_ICON_HTML;
subst.push_back(icon_url.spec());
- subst.push_back(net::EscapeForHTML(UTF16ToUTF8(title)));
- subst.push_back(net::EscapeForHTML(UTF16ToUTF8(body)));
+ subst.push_back(net::EscapeForHTML(base::UTF16ToUTF8(title)));
+ subst.push_back(net::EscapeForHTML(base::UTF16ToUTF8(body)));
// icon float position
subst.push_back(dir == blink::WebTextDirectionRightToLeft ?
"right" : "left");
@@ -231,14 +231,15 @@ base::string16 DesktopNotificationService::CreateDataUrl(
resource = IDR_NOTIFICATION_1LINE_HTML;
base::string16 line = title.empty() ? body : title;
// Strings are div names in the template file.
- base::string16 line_name = title.empty() ? ASCIIToUTF16("description")
- : ASCIIToUTF16("title");
- subst.push_back(net::EscapeForHTML(UTF16ToUTF8(line_name)));
- subst.push_back(net::EscapeForHTML(UTF16ToUTF8(line)));
+ base::string16 line_name =
+ title.empty() ? base::ASCIIToUTF16("description")
+ : base::ASCIIToUTF16("title");
+ subst.push_back(net::EscapeForHTML(base::UTF16ToUTF8(line_name)));
+ subst.push_back(net::EscapeForHTML(base::UTF16ToUTF8(line)));
} else {
resource = IDR_NOTIFICATION_2LINE_HTML;
- subst.push_back(net::EscapeForHTML(UTF16ToUTF8(title)));
- subst.push_back(net::EscapeForHTML(UTF16ToUTF8(body)));
+ subst.push_back(net::EscapeForHTML(base::UTF16ToUTF8(title)));
+ subst.push_back(net::EscapeForHTML(base::UTF16ToUTF8(body)));
}
// body text direction
subst.push_back(dir == blink::WebTextDirectionRightToLeft ?
@@ -260,8 +261,8 @@ base::string16 DesktopNotificationService::CreateDataUrl(
}
std::string data = ReplaceStringPlaceholders(template_html, subst, NULL);
- return UTF8ToUTF16("data:text/html;charset=utf-8," +
- net::EscapeQueryParamValue(data, false));
+ return base::UTF8ToUTF16("data:text/html;charset=utf-8," +
+ net::EscapeQueryParamValue(data, false));
}
// static
@@ -524,11 +525,11 @@ base::string16 DesktopNotificationService::DisplayNameForOriginInProcessId(
iter != extensions.end(); ++iter) {
NotifierId notifier_id(NotifierId::APPLICATION, (*iter)->id());
if (IsNotifierEnabled(notifier_id))
- return UTF8ToUTF16((*iter)->name());
+ return base::UTF8ToUTF16((*iter)->name());
}
}
}
- return UTF8ToUTF16(origin.host());
+ return base::UTF8ToUTF16(origin.host());
}
void DesktopNotificationService::NotifySettingsChange() {
diff --git a/chrome/browser/notifications/desktop_notifications_unittest.cc b/chrome/browser/notifications/desktop_notifications_unittest.cc
index 6531c3f..2632a87 100644
--- a/chrome/browser/notifications/desktop_notifications_unittest.cc
+++ b/chrome/browser/notifications/desktop_notifications_unittest.cc
@@ -156,8 +156,8 @@ DesktopNotificationsTest::StandardTestNotification() {
params.notification_id = 0;
params.origin = GURL("http://www.google.com");
params.icon_url = GURL("/icon.png");
- params.title = ASCIIToUTF16("Title");
- params.body = ASCIIToUTF16("Text");
+ params.title = base::ASCIIToUTF16("Title");
+ params.body = base::ASCIIToUTF16("Text");
params.direction = blink::WebTextDirectionDefault;
return params;
}
@@ -176,7 +176,7 @@ TEST_F(DesktopNotificationsTest, TestShow) {
StandardTestNotification();
params2.notification_id = 2;
params2.origin = GURL("http://www.google.com");
- params2.body = ASCIIToUTF16("Text");
+ params2.body = base::ASCIIToUTF16("Text");
EXPECT_TRUE(service_->ShowDesktopNotification(
params2, 0, 0, DesktopNotificationService::PageNotification));
@@ -264,11 +264,11 @@ TEST_F(DesktopNotificationsTest, TestVariableSize) {
content::ShowDesktopNotificationHostMsgParams params;
params.origin = GURL("http://long.google.com");
params.icon_url = GURL("/icon.png");
- params.title = ASCIIToUTF16("Really Really Really Really Really Really "
- "Really Really Really Really Really Really "
- "Really Really Really Really Really Really "
- "Really Long Title"),
- params.body = ASCIIToUTF16("Text");
+ params.title = base::ASCIIToUTF16("Really Really Really Really Really Really "
+ "Really Really Really Really Really Really "
+ "Really Really Really Really Really Really "
+ "Really Long Title"),
+ params.body = base::ASCIIToUTF16("Text");
params.notification_id = 0;
std::string expected_log;
@@ -279,7 +279,7 @@ TEST_F(DesktopNotificationsTest, TestVariableSize) {
expected_log.append("notification displayed\n");
params.origin = GURL("http://short.google.com");
- params.title = ASCIIToUTF16("Short title");
+ params.title = base::ASCIIToUTF16("Short title");
params.notification_id = 1;
EXPECT_TRUE(service_->ShowDesktopNotification(
params, 0, 0, DesktopNotificationService::PageNotification));
@@ -457,8 +457,8 @@ TEST_F(DesktopNotificationsTest, TestUserInputEscaping) {
// data:// URL that's produced for the balloon.
content::ShowDesktopNotificationHostMsgParams params =
StandardTestNotification();
- params.title = ASCIIToUTF16("<script>window.alert('uh oh');</script>");
- params.body = ASCIIToUTF16("<i>this text is in italics</i>");
+ params.title = base::ASCIIToUTF16("<script>window.alert('uh oh');</script>");
+ params.body = base::ASCIIToUTF16("<i>this text is in italics</i>");
params.notification_id = 1;
EXPECT_TRUE(service_->ShowDesktopNotification(
params, 0, 0, DesktopNotificationService::PageNotification));
diff --git a/chrome/browser/notifications/message_center_notifications_browsertest.cc b/chrome/browser/notifications/message_center_notifications_browsertest.cc
index d9344cb..9c37fe3 100644
--- a/chrome/browser/notifications/message_center_notifications_browsertest.cc
+++ b/chrome/browser/notifications/message_center_notifications_browsertest.cc
@@ -117,11 +117,11 @@ class MessageCenterNotificationsTest : public InProcessBrowserTest {
return Notification(GURL("chrome-test://testing/"),
GURL(),
- ASCIIToUTF16("title"),
- ASCIIToUTF16("message"),
+ base::ASCIIToUTF16("title"),
+ base::ASCIIToUTF16("message"),
blink::WebTextDirectionDefault,
- UTF8ToUTF16("chrome-test://testing/"),
- UTF8ToUTF16("REPLACE-ME"),
+ base::UTF8ToUTF16("chrome-test://testing/"),
+ base::UTF8ToUTF16("REPLACE-ME"),
new_delegate);
}
@@ -137,15 +137,15 @@ class MessageCenterNotificationsTest : public InProcessBrowserTest {
return Notification(message_center::NOTIFICATION_TYPE_BASE_FORMAT,
GURL("chrome-test://testing/"),
- ASCIIToUTF16("title"),
- ASCIIToUTF16("message"),
+ base::ASCIIToUTF16("title"),
+ base::ASCIIToUTF16("message"),
gfx::Image(),
blink::WebTextDirectionDefault,
message_center::NotifierId(
message_center::NotifierId::APPLICATION,
"extension_id"),
- UTF8ToUTF16("chrome-test://testing/"),
- UTF8ToUTF16("REPLACE-ME"),
+ base::UTF8ToUTF16("chrome-test://testing/"),
+ base::UTF8ToUTF16("REPLACE-ME"),
data,
new_delegate);
}
@@ -328,7 +328,7 @@ IN_PROC_BROWSER_TEST_F(MessageCenterNotificationsTest,
message_center()->ClickOnNotification("n");
message_center()->SetVisibility(message_center::VISIBILITY_MESSAGE_CENTER);
observer.reset_log();
- notification.set_title(ASCIIToUTF16("title2"));
+ notification.set_title(base::ASCIIToUTF16("title2"));
manager()->Update(notification, profile());
// Expect that the notification update is not done.
diff --git a/chrome/browser/notifications/message_center_settings_controller.cc b/chrome/browser/notifications/message_center_settings_controller.cc
index 501c7ec..995b387 100644
--- a/chrome/browser/notifications/message_center_settings_controller.cc
+++ b/chrome/browser/notifications/message_center_settings_controller.cc
@@ -232,7 +232,7 @@ void MessageCenterSettingsController::GetNotifierList(
NotifierId notifier_id(NotifierId::APPLICATION, extension->id());
notifiers->push_back(new Notifier(
notifier_id,
- UTF8ToUTF16(extension->name()),
+ base::UTF8ToUTF16(extension->name()),
notification_service->IsNotifierEnabled(notifier_id)));
app_icon_loader_->FetchImage(extension->id());
}
@@ -269,7 +269,7 @@ void MessageCenterSettingsController::GetNotifierList(
}
std::string url_pattern = iter->primary_pattern.ToString();
- base::string16 name = UTF8ToUTF16(url_pattern);
+ base::string16 name = base::UTF8ToUTF16(url_pattern);
GURL url(url_pattern);
NotifierId notifier_id(url);
notifiers->push_back(new Notifier(
diff --git a/chrome/browser/notifications/message_center_settings_controller_unittest.cc b/chrome/browser/notifications/message_center_settings_controller_unittest.cc
index 8ffc3ab..284a68e11 100644
--- a/chrome/browser/notifications/message_center_settings_controller_unittest.cc
+++ b/chrome/browser/notifications/message_center_settings_controller_unittest.cc
@@ -124,24 +124,26 @@ TEST_F(MessageCenterSettingsControllerTest, NotifierGroups) {
EXPECT_EQ(controller()->GetNotifierGroupCount(), 2u);
- EXPECT_EQ(controller()->GetNotifierGroupAt(0).name, UTF8ToUTF16("Profile-1"));
+ EXPECT_EQ(controller()->GetNotifierGroupAt(0).name,
+ base::UTF8ToUTF16("Profile-1"));
EXPECT_EQ(controller()->GetNotifierGroupAt(0).index, 0u);
- EXPECT_EQ(controller()->GetNotifierGroupAt(1).name, UTF8ToUTF16("Profile-2"));
+ EXPECT_EQ(controller()->GetNotifierGroupAt(1).name,
+ base::UTF8ToUTF16("Profile-2"));
EXPECT_EQ(controller()->GetNotifierGroupAt(1).index, 1u);
EXPECT_EQ(controller()->GetActiveNotifierGroup().name,
- UTF8ToUTF16("Profile-1"));
+ base::UTF8ToUTF16("Profile-1"));
EXPECT_EQ(controller()->GetActiveNotifierGroup().index, 0u);
controller()->SwitchToNotifierGroup(1);
EXPECT_EQ(controller()->GetActiveNotifierGroup().name,
- UTF8ToUTF16("Profile-2"));
+ base::UTF8ToUTF16("Profile-2"));
EXPECT_EQ(controller()->GetActiveNotifierGroup().index, 1u);
controller()->SwitchToNotifierGroup(0);
EXPECT_EQ(controller()->GetActiveNotifierGroup().name,
- UTF8ToUTF16("Profile-1"));
+ base::UTF8ToUTF16("Profile-1"));
}
#else
TEST_F(MessageCenterSettingsControllerChromeOSTest, NotifierGroups) {
@@ -151,17 +153,20 @@ TEST_F(MessageCenterSettingsControllerChromeOSTest, NotifierGroups) {
EXPECT_EQ(controller()->GetNotifierGroupCount(), 1u);
- EXPECT_EQ(controller()->GetNotifierGroupAt(0).name, UTF8ToUTF16("Profile-1"));
+ EXPECT_EQ(controller()->GetNotifierGroupAt(0).name,
+ base::UTF8ToUTF16("Profile-1"));
EXPECT_EQ(controller()->GetNotifierGroupAt(0).index, 0u);
SwitchActiveUser("Profile-2");
EXPECT_EQ(controller()->GetNotifierGroupCount(), 1u);
- EXPECT_EQ(controller()->GetNotifierGroupAt(0).name, UTF8ToUTF16("Profile-2"));
+ EXPECT_EQ(controller()->GetNotifierGroupAt(0).name,
+ base::UTF8ToUTF16("Profile-2"));
EXPECT_EQ(controller()->GetNotifierGroupAt(0).index, 1u);
SwitchActiveUser("Profile-1");
EXPECT_EQ(controller()->GetNotifierGroupCount(), 1u);
- EXPECT_EQ(controller()->GetNotifierGroupAt(0).name, UTF8ToUTF16("Profile-1"));
+ EXPECT_EQ(controller()->GetNotifierGroupAt(0).name,
+ base::UTF8ToUTF16("Profile-1"));
EXPECT_EQ(controller()->GetNotifierGroupAt(0).index, 0u);
}
#endif
diff --git a/chrome/browser/notifications/notification_browsertest.cc b/chrome/browser/notifications/notification_browsertest.cc
index f475b4e..4f29443 100644
--- a/chrome/browser/notifications/notification_browsertest.cc
+++ b/chrome/browser/notifications/notification_browsertest.cc
@@ -530,16 +530,18 @@ IN_PROC_BROWSER_TEST_F(NotificationsTest, TestCreateSimpleNotification) {
if (message_center::IsRichNotificationEnabled()) {
message_center::NotificationList::Notifications notifications =
message_center::MessageCenter::Get()->GetVisibleNotifications();
- EXPECT_EQ(ASCIIToUTF16("My Title"), (*notifications.rbegin())->title());
- EXPECT_EQ(ASCIIToUTF16("My Body"), (*notifications.rbegin())->message());
+ EXPECT_EQ(base::ASCIIToUTF16("My Title"),
+ (*notifications.rbegin())->title());
+ EXPECT_EQ(base::ASCIIToUTF16("My Body"),
+ (*notifications.rbegin())->message());
} else {
const std::deque<Balloon*>& balloons = GetActiveBalloons();
ASSERT_EQ(1U, balloons.size());
Balloon* balloon = balloons[0];
const Notification& notification = balloon->notification();
EXPECT_EQ(EXPECTED_ICON_URL, notification.icon_url());
- EXPECT_EQ(ASCIIToUTF16("My Title"), notification.title());
- EXPECT_EQ(ASCIIToUTF16("My Body"), notification.message());
+ EXPECT_EQ(base::ASCIIToUTF16("My Title"), notification.title());
+ EXPECT_EQ(base::ASCIIToUTF16("My Body"), notification.message());
}
}
@@ -936,8 +938,9 @@ IN_PROC_BROWSER_TEST_F(NotificationsTest, TestNotificationReplacement) {
ASSERT_EQ(1, GetNotificationCount());
message_center::NotificationList::Notifications notifications =
message_center::MessageCenter::Get()->GetVisibleNotifications();
- EXPECT_EQ(ASCIIToUTF16("Title2"), (*notifications.rbegin())->title());
- EXPECT_EQ(ASCIIToUTF16("Body2"), (*notifications.rbegin())->message());
+ EXPECT_EQ(base::ASCIIToUTF16("Title2"), (*notifications.rbegin())->title());
+ EXPECT_EQ(base::ASCIIToUTF16("Body2"),
+ (*notifications.rbegin())->message());
} else {
const std::deque<Balloon*>& balloons = GetActiveBalloons();
ASSERT_EQ(1U, balloons.size());
@@ -945,7 +948,7 @@ IN_PROC_BROWSER_TEST_F(NotificationsTest, TestNotificationReplacement) {
const Notification& notification = balloon->notification();
GURL EXPECTED_ICON_URL = embedded_test_server()->GetURL(kExpectedIconUrl);
EXPECT_EQ(EXPECTED_ICON_URL, notification.icon_url());
- EXPECT_EQ(ASCIIToUTF16("Title2"), notification.title());
- EXPECT_EQ(ASCIIToUTF16("Body2"), notification.message());
+ EXPECT_EQ(base::ASCIIToUTF16("Title2"), notification.title());
+ EXPECT_EQ(base::ASCIIToUTF16("Body2"), notification.message());
}
}
diff --git a/chrome/browser/notifications/sync_notifier/synced_notification.cc b/chrome/browser/notifications/sync_notifier/synced_notification.cc
index 5774891d..92df70c 100644
--- a/chrome/browser/notifications/sync_notifier/synced_notification.cc
+++ b/chrome/browser/notifications/sync_notifier/synced_notification.cc
@@ -220,16 +220,16 @@ void SyncedNotification::Show(NotificationUIManager* notification_manager,
// Set up the fields we need to send and create a Notification object.
GURL image_url = GetImageUrl();
- base::string16 text = UTF8ToUTF16(GetText());
- base::string16 heading = UTF8ToUTF16(GetHeading());
- base::string16 description = UTF8ToUTF16(GetDescription());
- base::string16 annotation = UTF8ToUTF16(GetAnnotation());
+ base::string16 text = base::UTF8ToUTF16(GetText());
+ base::string16 heading = base::UTF8ToUTF16(GetHeading());
+ base::string16 description = base::UTF8ToUTF16(GetDescription());
+ base::string16 annotation = base::UTF8ToUTF16(GetAnnotation());
// TODO(petewil): Eventually put the display name of the sending service here.
- base::string16 display_source = UTF8ToUTF16(GetAppId());
- base::string16 replace_key = UTF8ToUTF16(GetKey());
+ base::string16 display_source = base::UTF8ToUTF16(GetAppId());
+ base::string16 replace_key = base::UTF8ToUTF16(GetKey());
base::string16 notification_heading = heading;
base::string16 notification_text = description;
- base::string16 newline = UTF8ToUTF16("\n");
+ base::string16 newline = base::UTF8ToUTF16("\n");
// The delegate will eventually catch calls that the notification
// was read or deleted, and send the changes back to the server.
@@ -272,7 +272,7 @@ void SyncedNotification::Show(NotificationUIManager* notification_manager,
std::string title = GetButtonTitle(i);
if (title.empty())
break;
- message_center::ButtonInfo button_info(UTF8ToUTF16(title));
+ message_center::ButtonInfo button_info(base::UTF8ToUTF16(title));
if (!button_bitmaps_[i].IsEmpty())
button_info.icon = button_bitmaps_[i];
rich_notification_data.buttons.push_back(button_info);
diff --git a/chrome/browser/notifications/sync_notifier/synced_notification_unittest.cc b/chrome/browser/notifications/sync_notifier/synced_notification_unittest.cc
index b125a74..5d4fb04 100644
--- a/chrome/browser/notifications/sync_notifier/synced_notification_unittest.cc
+++ b/chrome/browser/notifications/sync_notifier/synced_notification_unittest.cc
@@ -333,10 +333,10 @@ TEST_F(SyncedNotificationTest, ShowTest) {
// Check the base fields of the notification.
EXPECT_EQ(message_center::NOTIFICATION_TYPE_IMAGE, notification.type());
- EXPECT_EQ(std::string(kTitle1), UTF16ToUTF8(notification.title()));
- EXPECT_EQ(std::string(kText1), UTF16ToUTF8(notification.message()));
+ EXPECT_EQ(std::string(kTitle1), base::UTF16ToUTF8(notification.title()));
+ EXPECT_EQ(std::string(kText1), base::UTF16ToUTF8(notification.message()));
EXPECT_EQ(std::string(kExpectedOriginUrl), notification.origin_url().spec());
- EXPECT_EQ(std::string(kKey1), UTF16ToUTF8(notification.replace_id()));
+ EXPECT_EQ(std::string(kKey1), base::UTF16ToUTF8(notification.replace_id()));
EXPECT_EQ(kFakeCreationTime, notification.timestamp().ToDoubleT());
EXPECT_EQ(kNotificationPriority, notification.priority());
@@ -416,9 +416,9 @@ TEST_F(SyncedNotificationTest, OnFetchCompleteTest) {
EXPECT_EQ(message_center::NOTIFICATION_TYPE_IMAGE,
notification_manager.notification().type());
EXPECT_EQ(std::string(kTitle1),
- UTF16ToUTF8(notification_manager.notification().title()));
+ base::UTF16ToUTF8(notification_manager.notification().title()));
EXPECT_EQ(std::string(kText1),
- UTF16ToUTF8(notification_manager.notification().message()));
+ base::UTF16ToUTF8(notification_manager.notification().message()));
// TODO(petewil): Check that the bitmap in the notification is what we expect.
// This fails today, the type info is different.
diff --git a/chrome/browser/parsers/metadata_parser_filebase.cc b/chrome/browser/parsers/metadata_parser_filebase.cc
index bf78fcf..38a0b36 100644
--- a/chrome/browser/parsers/metadata_parser_filebase.cc
+++ b/chrome/browser/parsers/metadata_parser_filebase.cc
@@ -22,7 +22,7 @@ bool FileMetadataParser::Parse() {
properties_[MetadataParser::kPropertyFilesize] = base::Int64ToString(size);
}
#if defined(OS_WIN)
- value = WideToUTF8(path_.BaseName().value());
+ value = base::WideToUTF8(path_.BaseName().value());
properties_[MetadataParser::kPropertyTitle] = value;
#elif defined(OS_POSIX)
properties_[MetadataParser::kPropertyTitle] = path_.BaseName().value();
diff --git a/chrome/browser/parsers/metadata_parser_jpeg_factory.cc b/chrome/browser/parsers/metadata_parser_jpeg_factory.cc
index 8a2b51e..3297e79 100644
--- a/chrome/browser/parsers/metadata_parser_jpeg_factory.cc
+++ b/chrome/browser/parsers/metadata_parser_jpeg_factory.cc
@@ -16,7 +16,7 @@ bool MetadataParserJpegFactory::CanParse(const base::FilePath& path,
char* bytes,
int bytes_size) {
#if defined(OS_WIN)
- base::FilePath::StringType ext = UTF8ToWide(std::string(".jpg"));
+ base::FilePath::StringType ext = base::UTF8ToWide(std::string(".jpg"));
#elif defined(OS_POSIX)
base::FilePath::StringType ext = ".jpg";
#endif
diff --git a/chrome/browser/password_manager/login_database_posix.cc b/chrome/browser/password_manager/login_database_posix.cc
index a58f5cd..3b53234 100644
--- a/chrome/browser/password_manager/login_database_posix.cc
+++ b/chrome/browser/password_manager/login_database_posix.cc
@@ -11,13 +11,13 @@
LoginDatabase::EncryptionResult LoginDatabase::EncryptedString(
const base::string16& plain_text,
std::string* cipher_text) const {
- *cipher_text = UTF16ToUTF8(plain_text);
+ *cipher_text = base::UTF16ToUTF8(plain_text);
return ENCRYPTION_RESULT_SUCCESS;
}
LoginDatabase::EncryptionResult LoginDatabase::DecryptedString(
const std::string& cipher_text,
base::string16* plain_text) const {
- *plain_text = UTF8ToUTF16(cipher_text);
+ *plain_text = base::UTF8ToUTF16(cipher_text);
return ENCRYPTION_RESULT_SUCCESS;
}
diff --git a/chrome/browser/password_manager/login_database_unittest.cc b/chrome/browser/password_manager/login_database_unittest.cc
index 99855f4..f6146e4 100644
--- a/chrome/browser/password_manager/login_database_unittest.cc
+++ b/chrome/browser/password_manager/login_database_unittest.cc
@@ -18,7 +18,7 @@
#include "testing/gmock/include/gmock/gmock.h"
using autofill::PasswordForm;
-
+using base::ASCIIToUTF16;
using ::testing::Eq;
class LoginDatabaseTest : public testing::Test {
diff --git a/chrome/browser/password_manager/native_backend_gnome_x.cc b/chrome/browser/password_manager/native_backend_gnome_x.cc
index a3e0cf9..788858d 100644
--- a/chrome/browser/password_manager/native_backend_gnome_x.cc
+++ b/chrome/browser/password_manager/native_backend_gnome_x.cc
@@ -24,6 +24,8 @@
#include "content/public/browser/browser_thread.h"
using autofill::PasswordForm;
+using base::UTF8ToUTF16;
+using base::UTF16ToUTF8;
using content::BrowserThread;
#define GNOME_KEYRING_DEFINE_POINTER(name) \
diff --git a/chrome/browser/password_manager/native_backend_gnome_x_unittest.cc b/chrome/browser/password_manager/native_backend_gnome_x_unittest.cc
index 2be7719..2ce8c1a 100644
--- a/chrome/browser/password_manager/native_backend_gnome_x_unittest.cc
+++ b/chrome/browser/password_manager/native_backend_gnome_x_unittest.cc
@@ -19,6 +19,8 @@
#include "testing/gtest/include/gtest/gtest.h"
using autofill::PasswordForm;
+using base::UTF8ToUTF16;
+using base::UTF16ToUTF8;
using content::BrowserThread;
namespace {
diff --git a/chrome/browser/password_manager/native_backend_kwallet_x_unittest.cc b/chrome/browser/password_manager/native_backend_kwallet_x_unittest.cc
index 81a6e7d..f425e33 100644
--- a/chrome/browser/password_manager/native_backend_kwallet_x_unittest.cc
+++ b/chrome/browser/password_manager/native_backend_kwallet_x_unittest.cc
@@ -27,6 +27,7 @@
#include "testing/gtest/include/gtest/gtest.h"
using autofill::PasswordForm;
+using base::UTF8ToUTF16;
using content::BrowserThread;
using testing::_;
using testing::Invoke;
diff --git a/chrome/browser/password_manager/password_form_data.cc b/chrome/browser/password_manager/password_form_data.cc
index 14beef6..3bd729c 100644
--- a/chrome/browser/password_manager/password_form_data.cc
+++ b/chrome/browser/password_manager/password_form_data.cc
@@ -22,15 +22,15 @@ PasswordForm* CreatePasswordFormFromData(
if (form_data.action)
form->action = GURL(form_data.action);
if (form_data.submit_element)
- form->submit_element = WideToUTF16(form_data.submit_element);
+ form->submit_element = base::WideToUTF16(form_data.submit_element);
if (form_data.username_element)
- form->username_element = WideToUTF16(form_data.username_element);
+ form->username_element = base::WideToUTF16(form_data.username_element);
if (form_data.password_element)
- form->password_element = WideToUTF16(form_data.password_element);
+ form->password_element = base::WideToUTF16(form_data.password_element);
if (form_data.username_value) {
- form->username_value = WideToUTF16(form_data.username_value);
+ form->username_value = base::WideToUTF16(form_data.username_value);
if (form_data.password_value)
- form->password_value = WideToUTF16(form_data.password_value);
+ form->password_value = base::WideToUTF16(form_data.password_value);
} else {
form->blacklisted_by_user = true;
}
diff --git a/chrome/browser/password_manager/password_form_manager_unittest.cc b/chrome/browser/password_manager/password_form_manager_unittest.cc
index c80fa8d8..998e84a 100644
--- a/chrome/browser/password_manager/password_form_manager_unittest.cc
+++ b/chrome/browser/password_manager/password_form_manager_unittest.cc
@@ -21,7 +21,7 @@
#include "testing/gmock/include/gmock/gmock.h"
using autofill::PasswordForm;
-
+using base::ASCIIToUTF16;
using ::testing::Eq;
namespace {
diff --git a/chrome/browser/password_manager/password_generation_manager_unittest.cc b/chrome/browser/password_manager/password_generation_manager_unittest.cc
index 4dd5934..dd2e8b1 100644
--- a/chrome/browser/password_manager/password_generation_manager_unittest.cc
+++ b/chrome/browser/password_manager/password_generation_manager_unittest.cc
@@ -23,6 +23,8 @@
#include "testing/gtest/include/gtest/gtest.h"
#include "url/gurl.h"
+using base::ASCIIToUTF16;
+
namespace {
// Unlike the base AutofillMetrics, exposes copy and assignment constructors,
diff --git a/chrome/browser/password_manager/password_manager_delegate_impl.cc b/chrome/browser/password_manager/password_manager_delegate_impl.cc
index 5976c4d..9d63a90 100644
--- a/chrome/browser/password_manager/password_manager_delegate_impl.cc
+++ b/chrome/browser/password_manager/password_manager_delegate_impl.cc
@@ -109,7 +109,7 @@ void SavePasswordInfoBarDelegate::Create(
(realm == GURL("https://www.google.com/"))) &&
OneClickSigninHelper::CanOffer(
web_contents, OneClickSigninHelper::CAN_OFFER_FOR_INTERSTITAL_ONLY,
- UTF16ToUTF8(form_to_save->associated_username()), NULL))
+ base::UTF16ToUTF8(form_to_save->associated_username()), NULL))
return;
#endif
diff --git a/chrome/browser/password_manager/password_manager_unittest.cc b/chrome/browser/password_manager/password_manager_unittest.cc
index 926d7cb..1c47b1f 100644
--- a/chrome/browser/password_manager/password_manager_unittest.cc
+++ b/chrome/browser/password_manager/password_manager_unittest.cc
@@ -24,6 +24,7 @@
#include "testing/gtest/include/gtest/gtest.h"
using autofill::PasswordForm;
+using base::ASCIIToUTF16;
using testing::_;
using testing::DoAll;
using testing::Exactly;
diff --git a/chrome/browser/password_manager/password_manager_util_win.cc b/chrome/browser/password_manager/password_manager_util_win.cc
index e021276..fb3d085 100644
--- a/chrome/browser/password_manager/password_manager_util_win.cc
+++ b/chrome/browser/password_manager/password_manager_util_win.cc
@@ -151,10 +151,10 @@ bool AuthenticateUser(gfx::NativeWindow window) {
WCHAR password[CREDUI_MAX_PASSWORD_LENGTH+1] = {};
DWORD username_length = CREDUI_MAX_USERNAME_LENGTH;
std::wstring product_name =
- UTF16ToWide(l10n_util::GetStringUTF16(IDS_PRODUCT_NAME));
+ base::UTF16ToWide(l10n_util::GetStringUTF16(IDS_PRODUCT_NAME));
std::wstring password_prompt =
- UTF16ToWide(l10n_util::GetStringUTF16(
- IDS_PASSWORDS_PAGE_AUTHENTICATION_PROMPT));
+ base::UTF16ToWide(l10n_util::GetStringUTF16(
+ IDS_PASSWORDS_PAGE_AUTHENTICATION_PROMPT));
HANDLE handle = INVALID_HANDLE_VALUE;
int tries = 0;
bool use_displayname = false;
diff --git a/chrome/browser/password_manager/password_store_default_unittest.cc b/chrome/browser/password_manager/password_store_default_unittest.cc
index ee07548..f44f656 100644
--- a/chrome/browser/password_manager/password_store_default_unittest.cc
+++ b/chrome/browser/password_manager/password_store_default_unittest.cc
@@ -233,7 +233,7 @@ TEST_F(PasswordStoreDefaultTest, Notifications) {
done.Wait();
// Change the password.
- form->password_value = WideToUTF16(L"a different password");
+ form->password_value = base::ASCIIToUTF16("a different password");
const PasswordStoreChange expected_update_changes[] = {
PasswordStoreChange(PasswordStoreChange::UPDATE, *form),
diff --git a/chrome/browser/password_manager/password_store_mac.cc b/chrome/browser/password_manager/password_store_mac.cc
index ccb9de3..318d1ab 100644
--- a/chrome/browser/password_manager/password_store_mac.cc
+++ b/chrome/browser/password_manager/password_store_mac.cc
@@ -278,8 +278,8 @@ bool FillPasswordFormFromKeychainItem(const AppleKeychain& keychain,
}
if (extract_password_data) {
- UTF8ToUTF16(static_cast<const char *>(password_data), password_length,
- &(form->password_value));
+ base::UTF8ToUTF16(static_cast<const char *>(password_data), password_length,
+ &(form->password_value));
}
int port = kAnyPort;
@@ -293,8 +293,8 @@ bool FillPasswordFormFromKeychainItem(const AppleKeychain& keychain,
}
switch (attr.tag) {
case kSecAccountItemAttr:
- UTF8ToUTF16(static_cast<const char *>(attr.data), attr.length,
- &(form->username_value));
+ base::UTF8ToUTF16(static_cast<const char *>(attr.data), attr.length,
+ &(form->username_value));
break;
case kSecServerItemAttr:
server.assign(static_cast<const char *>(attr.data), attr.length);
@@ -619,7 +619,7 @@ PasswordForm* MacKeychainPasswordFormAdapter::PasswordExactlyMatchingForm(
bool MacKeychainPasswordFormAdapter::HasPasswordsMergeableWithForm(
const PasswordForm& query_form) {
- std::string username = UTF16ToUTF8(query_form.username_value);
+ std::string username = base::UTF16ToUTF8(query_form.username_value);
std::vector<SecKeychainItemRef> matches =
MatchingKeychainItems(query_form.signon_realm, query_form.scheme,
NULL, username.c_str());
@@ -667,8 +667,8 @@ bool MacKeychainPasswordFormAdapter::AddPassword(const PasswordForm& form) {
form.signon_realm, &server, &port, &is_secure, &security_domain)) {
return false;
}
- std::string username = UTF16ToUTF8(form.username_value);
- std::string password = UTF16ToUTF8(form.password_value);
+ std::string username = base::UTF16ToUTF8(form.username_value);
+ std::string password = base::UTF16ToUTF8(form.password_value);
std::string path = form.origin.path();
SecProtocolType protocol = is_secure ? kSecProtocolTypeHTTPS
: kSecProtocolTypeHTTP;
@@ -739,7 +739,7 @@ SecKeychainItemRef MacKeychainPasswordFormAdapter::KeychainItemForForm(
}
std::string path = form.origin.path();
- std::string username = UTF16ToUTF8(form.username_value);
+ std::string username = base::UTF16ToUTF8(form.username_value);
std::vector<SecKeychainItemRef> matches = MatchingKeychainItems(
form.signon_realm, form.scheme, path.c_str(), username.c_str());
diff --git a/chrome/browser/password_manager/password_store_mac_unittest.cc b/chrome/browser/password_manager/password_store_mac_unittest.cc
index 458c66e..4c285c5 100644
--- a/chrome/browser/password_manager/password_store_mac_unittest.cc
+++ b/chrome/browser/password_manager/password_store_mac_unittest.cc
@@ -19,6 +19,8 @@
#include "crypto/mock_apple_keychain.h"
using autofill::PasswordForm;
+using base::ASCIIToUTF16;
+using base::WideToUTF16;
using content::BrowserThread;
using crypto::MockAppleKeychain;
using testing::_;
diff --git a/chrome/browser/password_manager/password_store_win.cc b/chrome/browser/password_manager/password_store_win.cc
index 0b34e62..1db07ea 100644
--- a/chrome/browser/password_manager/password_store_win.cc
+++ b/chrome/browser/password_manager/password_store_win.cc
@@ -89,7 +89,8 @@ void PasswordStoreWin::DBHandler::GetIE7Login(
const PasswordStoreWin::ConsumerCallbackRunner& callback_runner) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::DB));
IE7PasswordInfo info;
- info.url_hash = ie7_password::GetUrlHash(UTF8ToWide(form.origin.spec()));
+ info.url_hash =
+ ie7_password::GetUrlHash(base::UTF8ToWide(form.origin.spec()));
WebDataService::Handle handle = web_data_service_->GetIE7Login(info, this);
pending_requests_[handle] =
RequestInfo(new PasswordForm(form), callback_runner);
@@ -111,7 +112,7 @@ std::vector<PasswordForm*> PasswordStoreWin::DBHandler::GetIE7Results(
// table.
web_data_service_->RemoveIE7Login(info);
std::vector<ie7_password::DecryptedCredentials> credentials;
- std::wstring url = ASCIIToWide(form.origin.spec());
+ std::wstring url = base::ASCIIToWide(form.origin.spec());
if (ie7_password::DecryptPasswords(url,
info.encrypted_data,
&credentials)) {
diff --git a/chrome/browser/password_manager/password_store_x_unittest.cc b/chrome/browser/password_manager/password_store_x_unittest.cc
index 253a23a..5a79385 100644
--- a/chrome/browser/password_manager/password_store_x_unittest.cc
+++ b/chrome/browser/password_manager/password_store_x_unittest.cc
@@ -327,7 +327,7 @@ TEST_P(PasswordStoreXTest, Notifications) {
base::RunLoop().RunUntilIdle();
// Change the password.
- form->password_value = WideToUTF16(L"a different password");
+ form->password_value = base::ASCIIToUTF16("a different password");
const PasswordStoreChange expected_update_changes[] = {
PasswordStoreChange(PasswordStoreChange::UPDATE, *form),
diff --git a/chrome/browser/password_manager/password_syncable_service.cc b/chrome/browser/password_manager/password_syncable_service.cc
index 97e8341..226a82e 100644
--- a/chrome/browser/password_manager/password_syncable_service.cc
+++ b/chrome/browser/password_manager/password_syncable_service.cc
@@ -87,13 +87,13 @@ syncer::SyncData PasswordSyncableService::CreateSyncData(
password_specifics->set_origin(password_form.origin.spec());
password_specifics->set_action(password_form.action.spec());
password_specifics->set_username_element(
- UTF16ToUTF8(password_form.username_element));
+ base::UTF16ToUTF8(password_form.username_element));
password_specifics->set_password_element(
- UTF16ToUTF8(password_form.password_element));
+ base::UTF16ToUTF8(password_form.password_element));
password_specifics->set_username_value(
- UTF16ToUTF8(password_form.username_value));
+ base::UTF16ToUTF8(password_form.username_value));
password_specifics->set_password_value(
- UTF16ToUTF8(password_form.password_value));
+ base::UTF16ToUTF8(password_form.password_value));
password_specifics->set_ssl_valid(password_form.ssl_valid);
password_specifics->set_preferred(password_form.preferred);
password_specifics->set_date_created(
@@ -122,9 +122,9 @@ std::string PasswordSyncableService::MakeTag(
std::string PasswordSyncableService::MakeTag(
const autofill::PasswordForm& password) {
return MakeTag(password.origin.spec(),
- UTF16ToUTF8(password.username_element),
- UTF16ToUTF8(password.username_value),
- UTF16ToUTF8(password.password_element),
+ base::UTF16ToUTF8(password.username_element),
+ base::UTF16ToUTF8(password.username_value),
+ base::UTF16ToUTF8(password.password_element),
password.signon_realm);
}
diff --git a/chrome/browser/pepper_flash_settings_manager.cc b/chrome/browser/pepper_flash_settings_manager.cc
index 6fb3d83..f4b3208 100644
--- a/chrome/browser/pepper_flash_settings_manager.cc
+++ b/chrome/browser/pepper_flash_settings_manager.cc
@@ -412,7 +412,7 @@ void PepperFlashSettingsManager::Core::InitializeOnIOThread() {
#if defined(OS_WIN)
plugin_data_path_ = profile_path.Append(plugin_info.name);
#else
- plugin_data_path_ = profile_path.Append(UTF16ToUTF8(plugin_info.name));
+ plugin_data_path_ = profile_path.Append(base::UTF16ToUTF8(plugin_info.name));
#endif
helper_ = content::PepperFlashSettingsHelper::Create();
diff --git a/chrome/browser/performance_monitor/database.cc b/chrome/browser/performance_monitor/database.cc
index bd2f432c..a258e14 100644
--- a/chrome/browser/performance_monitor/database.cc
+++ b/chrome/browser/performance_monitor/database.cc
@@ -477,7 +477,7 @@ scoped_ptr<leveldb::DB> Database::SafelyOpenDatabase(
#if defined(OS_POSIX)
std::string name = path_.AppendASCII(path).value();
#elif defined(OS_WIN)
- std::string name = WideToUTF8(path_.AppendASCII(path).value());
+ std::string name = base::WideToUTF8(path_.AppendASCII(path).value());
#endif
leveldb::DB* database;
diff --git a/chrome/browser/platform_util_win.cc b/chrome/browser/platform_util_win.cc
index 976e267..77dcf40 100644
--- a/chrome/browser/platform_util_win.cc
+++ b/chrome/browser/platform_util_win.cc
@@ -117,7 +117,7 @@ void ShowItemInFolderOnFileThread(const base::FilePath& full_path) {
// is empty. This function tells if it is.
bool ValidateShellCommandForScheme(const std::string& scheme) {
base::win::RegKey key;
- std::wstring registry_path = ASCIIToWide(scheme) +
+ std::wstring registry_path = base::ASCIIToWide(scheme) +
L"\\shell\\open\\command";
key.Open(HKEY_CLASSES_ROOT, registry_path.c_str(), KEY_READ);
if (!key.Valid())
diff --git a/chrome/browser/plugins/plugin_finder.cc b/chrome/browser/plugins/plugin_finder.cc
index d9e2389..23ece21 100644
--- a/chrome/browser/plugins/plugin_finder.cc
+++ b/chrome/browser/plugins/plugin_finder.cc
@@ -267,7 +267,7 @@ base::string16 PluginFinder::FindPluginNameWithIdentifier(
if (it != identifier_plugin_.end())
name = it->second->name();
- return name.empty() ? UTF8ToUTF16(identifier) : name;
+ return name.empty() ? base::UTF8ToUTF16(identifier) : name;
}
scoped_ptr<PluginMetadata> PluginFinder::GetPluginMetadata(
diff --git a/chrome/browser/plugins/plugin_info_message_filter.cc b/chrome/browser/plugins/plugin_info_message_filter.cc
index 9ac52cb..71870a4 100644
--- a/chrome/browser/plugins/plugin_info_message_filter.cc
+++ b/chrome/browser/plugins/plugin_info_message_filter.cc
@@ -45,12 +45,12 @@ bool ShouldUseJavaScriptSettingForPlugin(const WebPluginInfo& plugin) {
}
// Treat Native Client invocations like JavaScript.
- if (plugin.name == ASCIIToUTF16(ChromeContentClient::kNaClPluginName))
+ if (plugin.name == base::ASCIIToUTF16(ChromeContentClient::kNaClPluginName))
return true;
#if defined(WIDEVINE_CDM_AVAILABLE) && defined(ENABLE_PEPPER_CDMS)
// Treat CDM invocations like JavaScript.
- if (plugin.name == ASCIIToUTF16(kWidevineCdmDisplayName)) {
+ if (plugin.name == base::ASCIIToUTF16(kWidevineCdmDisplayName)) {
DCHECK(plugin.type == WebPluginInfo::PLUGIN_TYPE_PEPPER_OUT_OF_PROCESS);
return true;
}
diff --git a/chrome/browser/plugins/plugin_infobar_delegates.cc b/chrome/browser/plugins/plugin_infobar_delegates.cc
index abc4d98..88bcd6d 100644
--- a/chrome/browser/plugins/plugin_infobar_delegates.cc
+++ b/chrome/browser/plugins/plugin_infobar_delegates.cc
@@ -92,7 +92,7 @@ void UnauthorizedPluginInfoBarDelegate::Create(
content_settings, name, identifier))));
content::RecordAction(UserMetricsAction("BlockedPluginInfobar.Shown"));
- std::string utf8_name(UTF16ToUTF8(name));
+ std::string utf8_name(base::UTF16ToUTF8(name));
if (utf8_name == PluginMetadata::kJavaGroupName) {
content::RecordAction(UserMetricsAction("BlockedPluginInfobar.Shown.Java"));
} else if (utf8_name == PluginMetadata::kQuickTimeGroupName) {
@@ -192,7 +192,7 @@ OutdatedPluginInfoBarDelegate::OutdatedPluginInfoBarDelegate(
plugin_metadata_(plugin_metadata.Pass()),
message_(message) {
content::RecordAction(UserMetricsAction("OutdatedPluginInfobar.Shown"));
- std::string name = UTF16ToUTF8(plugin_metadata_->name());
+ std::string name = base::UTF16ToUTF8(plugin_metadata_->name());
if (name == PluginMetadata::kJavaGroupName) {
content::RecordAction(
UserMetricsAction("OutdatedPluginInfobar.Shown.Java"));
diff --git a/chrome/browser/plugins/plugin_installer_unittest.cc b/chrome/browser/plugins/plugin_installer_unittest.cc
index bceecc4..ea450d8 100644
--- a/chrome/browser/plugins/plugin_installer_unittest.cc
+++ b/chrome/browser/plugins/plugin_installer_unittest.cc
@@ -13,10 +13,10 @@ namespace {
PluginInstaller::SecurityStatus GetSecurityStatus(PluginInstaller* installer,
const char* version) {
content:: WebPluginInfo plugin(
- ASCIIToUTF16("Foo plug-in"),
+ base::ASCIIToUTF16("Foo plug-in"),
base::FilePath(FILE_PATH_LITERAL("/tmp/plugin.so")),
- ASCIIToUTF16(version),
- ASCIIToUTF16("Foo plug-in."));
+ base::ASCIIToUTF16(version),
+ base::ASCIIToUTF16("Foo plug-in."));
return installer->GetSecurityStatus(plugin);
}
@@ -31,8 +31,9 @@ TEST(PluginInstallerTest, SecurityStatus) {
PluginInstaller::SECURITY_STATUS_REQUIRES_AUTHORIZATION;
PluginInstaller installer("claybrick-writer",
- ASCIIToUTF16("ClayBrick Writer"),
- true, GURL(), GURL(), ASCIIToUTF16("ClayBrick"));
+ base::ASCIIToUTF16("ClayBrick Writer"),
+ true, GURL(), GURL(),
+ base::ASCIIToUTF16("ClayBrick"));
#if defined(OS_LINUX)
EXPECT_EQ(kRequiresAuthorization, GetSecurityStatus(&installer, "1.2.3"));
diff --git a/chrome/browser/plugins/plugin_metadata_unittest.cc b/chrome/browser/plugins/plugin_metadata_unittest.cc
index 0281f88..dd5ac8a 100644
--- a/chrome/browser/plugins/plugin_metadata_unittest.cc
+++ b/chrome/browser/plugins/plugin_metadata_unittest.cc
@@ -14,10 +14,10 @@ PluginMetadata::SecurityStatus GetSecurityStatus(
PluginMetadata* plugin_metadata,
const char* version) {
content::WebPluginInfo plugin(
- ASCIIToUTF16("Foo plug-in"),
+ base::ASCIIToUTF16("Foo plug-in"),
base::FilePath(FILE_PATH_LITERAL("/tmp/plugin.so")),
- ASCIIToUTF16(version),
- ASCIIToUTF16("Foo plug-in."));
+ base::ASCIIToUTF16(version),
+ base::ASCIIToUTF16("Foo plug-in."));
return plugin_metadata->GetSecurityStatus(plugin);
}
@@ -32,11 +32,11 @@ TEST(PluginMetadataTest, SecurityStatus) {
PluginMetadata::SECURITY_STATUS_REQUIRES_AUTHORIZATION;
PluginMetadata plugin_metadata("claybrick-writer",
- ASCIIToUTF16("ClayBrick Writer"),
+ base::ASCIIToUTF16("ClayBrick Writer"),
true,
GURL(),
GURL(),
- ASCIIToUTF16("ClayBrick"),
+ base::ASCIIToUTF16("ClayBrick"),
std::string());
EXPECT_EQ(kRequiresAuthorization,
GetSecurityStatus(&plugin_metadata, "1.2.3"));
diff --git a/chrome/browser/plugins/plugin_prefs.cc b/chrome/browser/plugins/plugin_prefs.cc
index 9449316..b93aca5 100644
--- a/chrome/browser/plugins/plugin_prefs.cc
+++ b/chrome/browser/plugins/plugin_prefs.cc
@@ -246,7 +246,7 @@ bool PluginPrefs::IsPluginEnabled(const content::WebPluginInfo& plugin) const {
// information.
// TODO(dspringer): When NaCl is on by default, remove this code.
if ((plugin.name ==
- ASCIIToUTF16(ChromeContentClient::kNaClPluginName)) &&
+ base::ASCIIToUTF16(ChromeContentClient::kNaClPluginName)) &&
CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableNaCl)) {
return true;
}
@@ -466,7 +466,7 @@ void PluginPrefs::SetPrefs(PrefService* prefs) {
// Only want one PDF plugin enabled at a time. See http://crbug.com/50105
// for background.
- plugin_group_state_[ASCIIToUTF16(
+ plugin_group_state_[base::ASCIIToUTF16(
PluginMetadata::kAdobeReaderGroupName)] = false;
}
} // Scoped update of prefs::kPluginsPluginsList.
diff --git a/chrome/browser/plugins/plugin_prefs_unittest.cc b/chrome/browser/plugins/plugin_prefs_unittest.cc
index 546c08f2..3ea617a 100644
--- a/chrome/browser/plugins/plugin_prefs_unittest.cc
+++ b/chrome/browser/plugins/plugin_prefs_unittest.cc
@@ -19,6 +19,7 @@
#include "content/public/test/test_utils.h"
#include "testing/gtest/include/gtest/gtest.h"
+using base::ASCIIToUTF16;
using content::BrowserThread;
using content::PluginService;
diff --git a/chrome/browser/policy/browser_policy_connector.cc b/chrome/browser/policy/browser_policy_connector.cc
index 0a8cdcd..d7b996e 100644
--- a/chrome/browser/policy/browser_policy_connector.cc
+++ b/chrome/browser/policy/browser_policy_connector.cc
@@ -536,10 +536,10 @@ bool BrowserPolicyConnector::IsNonEnterpriseUser(const std::string& username) {
L"yahoo(\\.co|\\.com|)\\.[^.]+", // yahoo.com, yahoo.co.uk, yahoo.com.tw
L"yandex\\.ru",
};
- const base::string16 domain =
- UTF8ToUTF16(gaia::ExtractDomainName(gaia::CanonicalizeEmail(username)));
+ const base::string16 domain = base::UTF8ToUTF16(
+ gaia::ExtractDomainName(gaia::CanonicalizeEmail(username)));
for (size_t i = 0; i < arraysize(kNonManagedDomainPatterns); i++) {
- base::string16 pattern = WideToUTF16(kNonManagedDomainPatterns[i]);
+ base::string16 pattern = base::WideToUTF16(kNonManagedDomainPatterns[i]);
if (MatchDomain(domain, pattern))
return true;
}
@@ -574,7 +574,7 @@ void BrowserPolicyConnector::SetTimezoneIfPolicyAvailable() {
&timezone) &&
!timezone.empty()) {
chromeos::system::TimezoneSettings::GetInstance()->SetTimezoneFromID(
- UTF8ToUTF16(timezone));
+ base::UTF8ToUTF16(timezone));
}
#endif
}
diff --git a/chrome/browser/policy/policy_browsertest.cc b/chrome/browser/policy/policy_browsertest.cc
index a75bc84..ac2c45c 100644
--- a/chrome/browser/policy/policy_browsertest.cc
+++ b/chrome/browser/policy/policy_browsertest.cc
@@ -284,7 +284,7 @@ void CheckCanOpenURL(Browser* browser, const char* spec) {
content::WebContents* contents =
browser->tab_strip_model()->GetActiveWebContents();
EXPECT_EQ(url, contents->GetURL());
- base::string16 title = UTF8ToUTF16(url.spec() + " was blocked");
+ base::string16 title = base::UTF8ToUTF16(url.spec() + " was blocked");
EXPECT_NE(title, contents->GetTitle());
}
@@ -295,7 +295,7 @@ void CheckURLIsBlocked(Browser* browser, const char* spec) {
content::WebContents* contents =
browser->tab_strip_model()->GetActiveWebContents();
EXPECT_EQ(url, contents->GetURL());
- base::string16 title = UTF8ToUTF16(url.spec() + " was blocked");
+ base::string16 title = base::UTF8ToUTF16(url.spec() + " was blocked");
EXPECT_EQ(title, contents->GetTitle());
// Verify that the expected error page is being displayed.
@@ -392,7 +392,7 @@ const content::WebPluginInfo* GetFlashPlugin(
const std::vector<content::WebPluginInfo>& plugins) {
const content::WebPluginInfo* flash = NULL;
for (size_t i = 0; i < plugins.size(); ++i) {
- if (plugins[i].name == ASCIIToUTF16(content::kFlashPluginName)) {
+ if (plugins[i].name == base::ASCIIToUTF16(content::kFlashPluginName)) {
flash = &plugins[i];
break;
}
@@ -841,7 +841,7 @@ IN_PROC_BROWSER_TEST_F(PolicyTest, DefaultSearchProvider) {
// Verifies that a default search is made using the provider configured via
// policy. Also checks that default search can be completely disabled.
- const base::string16 kKeyword(ASCIIToUTF16("testsearch"));
+ const base::string16 kKeyword(base::ASCIIToUTF16("testsearch"));
const std::string kSearchURL("http://search.example/search?q={searchTerms}");
const std::string kAlternateURL0(
"http://search.example/search#q={searchTerms}");
@@ -1032,7 +1032,7 @@ IN_PROC_BROWSER_TEST_F(PolicyTest, ReplaceSearchTerms) {
// Verifies that a default search is made using the provider configured via
// policy. Also checks that default search can be completely disabled.
- const base::string16 kKeyword(ASCIIToUTF16("testsearch"));
+ const base::string16 kKeyword(base::ASCIIToUTF16("testsearch"));
const std::string kSearchURL("https://www.google.com/search?q={searchTerms}");
const std::string kInstantURL("http://does/not/exist");
const std::string kAlternateURL0(
@@ -1102,7 +1102,7 @@ IN_PROC_BROWSER_TEST_F(PolicyTest, ReplaceSearchTerms) {
"https://www.google.com/?espv=1#q=foobar");
EXPECT_TRUE(
browser()->toolbar_model()->WouldPerformSearchTermReplacement(false));
- EXPECT_EQ(ASCIIToUTF16("foobar"), omnibox_view->GetText());
+ EXPECT_EQ(base::ASCIIToUTF16("foobar"), omnibox_view->GetText());
// Verify that not using espv=1 does not do search term replacement.
chrome::FocusLocationBar(browser());
@@ -1110,7 +1110,7 @@ IN_PROC_BROWSER_TEST_F(PolicyTest, ReplaceSearchTerms) {
"https://www.google.com/?q=foobar");
EXPECT_FALSE(
browser()->toolbar_model()->WouldPerformSearchTermReplacement(false));
- EXPECT_EQ(ASCIIToUTF16("https://www.google.com/?q=foobar"),
+ EXPECT_EQ(base::ASCIIToUTF16("https://www.google.com/?q=foobar"),
omnibox_view->GetText());
// Verify that searching from the omnibox does search term replacement with
@@ -1120,7 +1120,7 @@ IN_PROC_BROWSER_TEST_F(PolicyTest, ReplaceSearchTerms) {
"https://www.google.com/search?espv=1#q=banana");
EXPECT_TRUE(
browser()->toolbar_model()->WouldPerformSearchTermReplacement(false));
- EXPECT_EQ(ASCIIToUTF16("banana"), omnibox_view->GetText());
+ EXPECT_EQ(base::ASCIIToUTF16("banana"), omnibox_view->GetText());
// Verify that searching from the omnibox does search term replacement with
// standard search URL pattern.
@@ -1129,7 +1129,7 @@ IN_PROC_BROWSER_TEST_F(PolicyTest, ReplaceSearchTerms) {
"https://www.google.com/search?q=tractor+parts&espv=1");
EXPECT_TRUE(
browser()->toolbar_model()->WouldPerformSearchTermReplacement(false));
- EXPECT_EQ(ASCIIToUTF16("tractor parts"), omnibox_view->GetText());
+ EXPECT_EQ(base::ASCIIToUTF16("tractor parts"), omnibox_view->GetText());
// Verify that searching from the omnibox prioritizes hash over query.
chrome::FocusLocationBar(browser());
@@ -1137,7 +1137,7 @@ IN_PROC_BROWSER_TEST_F(PolicyTest, ReplaceSearchTerms) {
"https://www.google.com/search?q=tractor+parts&espv=1#q=foobar");
EXPECT_TRUE(
browser()->toolbar_model()->WouldPerformSearchTermReplacement(false));
- EXPECT_EQ(ASCIIToUTF16("foobar"), omnibox_view->GetText());
+ EXPECT_EQ(base::ASCIIToUTF16("foobar"), omnibox_view->GetText());
}
IN_PROC_BROWSER_TEST_F(PolicyTest, Disable3DAPIs) {
diff --git a/chrome/browser/policy/policy_path_parser_win.cc b/chrome/browser/policy/policy_path_parser_win.cc
index 652de16..593e901 100644
--- a/chrome/browser/policy/policy_path_parser_win.cc
+++ b/chrome/browser/policy/policy_path_parser_win.cc
@@ -154,7 +154,7 @@ void CheckUserDataDirPolicy(base::FilePath* user_data_dir) {
// we don't have to try to load HKCU.
const char* key_name_ascii = (is_chrome_frame ? policy::key::kGCFUserDataDir :
policy::key::kUserDataDir);
- std::wstring key_name(ASCIIToWide(key_name_ascii));
+ std::wstring key_name(base::ASCIIToWide(key_name_ascii));
if (LoadUserDataDirPolicyFromRegistry(HKEY_LOCAL_MACHINE, key_name,
user_data_dir) ||
LoadUserDataDirPolicyFromRegistry(HKEY_CURRENT_USER, key_name,
diff --git a/chrome/browser/predictors/autocomplete_action_predictor_table_unittest.cc b/chrome/browser/predictors/autocomplete_action_predictor_table_unittest.cc
index 9dd1b01..fe75dd1 100644
--- a/chrome/browser/predictors/autocomplete_action_predictor_table_unittest.cc
+++ b/chrome/browser/predictors/autocomplete_action_predictor_table_unittest.cc
@@ -84,15 +84,15 @@ void AutocompleteActionPredictorTableTest::SetUp() {
test_db_.push_back(AutocompleteActionPredictorTable::Row(
"BD85DBA2-8C29-49F9-84AE-48E1E90880DF",
- ASCIIToUTF16("goog"), GURL("http://www.google.com/"),
+ base::ASCIIToUTF16("goog"), GURL("http://www.google.com/"),
1, 0));
test_db_.push_back(AutocompleteActionPredictorTable::Row(
"BD85DBA2-8C29-49F9-84AE-48E1E90880E0",
- ASCIIToUTF16("slash"), GURL("http://slashdot.org/"),
+ base::ASCIIToUTF16("slash"), GURL("http://slashdot.org/"),
3, 2));
test_db_.push_back(AutocompleteActionPredictorTable::Row(
"BD85DBA2-8C29-49F9-84AE-48E1E90880E1",
- ASCIIToUTF16("news"), GURL("http://slashdot.org/"),
+ base::ASCIIToUTF16("news"), GURL("http://slashdot.org/"),
0, 1));
}
diff --git a/chrome/browser/predictors/autocomplete_action_predictor_unittest.cc b/chrome/browser/predictors/autocomplete_action_predictor_unittest.cc
index 4cab0a93..13d681c 100644
--- a/chrome/browser/predictors/autocomplete_action_predictor_unittest.cc
+++ b/chrome/browser/predictors/autocomplete_action_predictor_unittest.cc
@@ -23,6 +23,7 @@
#include "content/public/test/test_browser_thread.h"
#include "testing/gtest/include/gtest/gtest.h"
+using base::ASCIIToUTF16;
using content::BrowserThread;
using predictors::AutocompleteActionPredictor;
diff --git a/chrome/browser/prefetch/prefetch_browsertest.cc b/chrome/browser/prefetch/prefetch_browsertest.cc
index 2c413de..658ffba 100644
--- a/chrome/browser/prefetch/prefetch_browsertest.cc
+++ b/chrome/browser/prefetch/prefetch_browsertest.cc
@@ -52,7 +52,7 @@ IN_PROC_BROWSER_TEST_F(PrefetchBrowserTest, PrefetchOn) {
ASSERT_TRUE(test_server()->Start());
GURL url = test_server()->GetURL(kPrefetchPage);
- const base::string16 expected_title = ASCIIToUTF16("link onload");
+ const base::string16 expected_title = base::ASCIIToUTF16("link onload");
content::TitleWatcher title_watcher(
browser()->tab_strip_model()->GetActiveWebContents(),
expected_title);
@@ -65,7 +65,7 @@ IN_PROC_BROWSER_TEST_F(PrefetchBrowserTestNoPrefetching, PrefetchOff) {
ASSERT_TRUE(test_server()->Start());
GURL url = test_server()->GetURL(kPrefetchPage);
- const base::string16 expected_title = ASCIIToUTF16("link onerror");
+ const base::string16 expected_title = base::ASCIIToUTF16("link onerror");
content::TitleWatcher title_watcher(
browser()->tab_strip_model()->GetActiveWebContents(),
expected_title);
diff --git a/chrome/browser/prefs/chrome_pref_service_unittest.cc b/chrome/browser/prefs/chrome_pref_service_unittest.cc
index 0513ca0..6b24f69 100644
--- a/chrome/browser/prefs/chrome_pref_service_unittest.cc
+++ b/chrome/browser/prefs/chrome_pref_service_unittest.cc
@@ -136,7 +136,7 @@ TEST_F(ChromePrefServiceWebKitPrefs, PrefsCopied) {
#else
const char kDefaultFont[] = "Times New Roman";
#endif
- EXPECT_EQ(ASCIIToUTF16(kDefaultFont),
+ EXPECT_EQ(base::ASCIIToUTF16(kDefaultFont),
webkit_prefs.standard_font_family_map[prefs::kWebKitCommonScript]);
EXPECT_TRUE(webkit_prefs.javascript_enabled);
}
diff --git a/chrome/browser/prefs/pref_functional_browsertest.cc b/chrome/browser/prefs/pref_functional_browsertest.cc
index 3f41608..6e3d659 100644
--- a/chrome/browser/prefs/pref_functional_browsertest.cc
+++ b/chrome/browser/prefs/pref_functional_browsertest.cc
@@ -125,14 +125,14 @@ IN_PROC_BROWSER_TEST_F(PrefsFunctionalTest, TestJavascriptEnableDisable) {
ui_test_utils::NavigateToURL(
browser(),
test_server()->GetURL("files/javaScriptTitle.html"));
- EXPECT_EQ(ASCIIToUTF16("Title from script javascript enabled"),
+ EXPECT_EQ(base::ASCIIToUTF16("Title from script javascript enabled"),
browser()->tab_strip_model()->GetActiveWebContents()->GetTitle());
browser()->profile()->GetPrefs()->SetBoolean(prefs::kWebKitJavascriptEnabled,
false);
ui_test_utils::NavigateToURL(
browser(),
test_server()->GetURL("files/javaScriptTitle.html"));
- EXPECT_EQ(ASCIIToUTF16("This is html title"),
+ EXPECT_EQ(base::ASCIIToUTF16("This is html title"),
browser()->tab_strip_model()->GetActiveWebContents()->GetTitle());
}
diff --git a/chrome/browser/prerender/prerender_browsertest.cc b/chrome/browser/prerender/prerender_browsertest.cc
index 43ec5fa..6e4c235 100644
--- a/chrome/browser/prerender/prerender_browsertest.cc
+++ b/chrome/browser/prerender/prerender_browsertest.cc
@@ -333,7 +333,7 @@ class TestPrerenderContents : public PrerenderContents {
content::SessionStorageNamespace* session_storage_namespace) OVERRIDE {
WebContents* web_contents = PrerenderContents::CreateWebContents(
session_storage_namespace);
- base::string16 ready_title = ASCIIToUTF16(kReadyTitle);
+ base::string16 ready_title = base::ASCIIToUTF16(kReadyTitle);
if (prerender_should_wait_for_ready_title_)
ready_title_watcher_.reset(new content::TitleWatcher(
web_contents, ready_title));
@@ -342,7 +342,7 @@ class TestPrerenderContents : public PrerenderContents {
void WaitForPrerenderToHaveReadyTitleIfRequired() {
if (ready_title_watcher_.get()) {
- base::string16 ready_title = ASCIIToUTF16(kReadyTitle);
+ base::string16 ready_title = base::ASCIIToUTF16(kReadyTitle);
ASSERT_EQ(ready_title, ready_title_watcher_->WaitAndGetTitle());
}
}
@@ -854,7 +854,7 @@ class PrerenderBrowserTest : virtual public InProcessBrowserTest {
}
void NavigateToDestUrlAndWaitForPassTitle() {
- base::string16 expected_title = ASCIIToUTF16(kPassTitle);
+ base::string16 expected_title = base::ASCIIToUTF16(kPassTitle);
content::TitleWatcher title_watcher(
GetPrerenderContents()->prerender_contents(),
expected_title);
@@ -926,7 +926,7 @@ class PrerenderBrowserTest : virtual public InProcessBrowserTest {
current_browser()->tab_strip_model()->GetActiveWebContents()->
GetRenderViewHost()->ExecuteJavascriptInWebFrame(
base::string16(),
- ASCIIToUTF16(base::StringPrintf("RemoveLinkElement(%d)", i)));
+ base::ASCIIToUTF16(base::StringPrintf("RemoveLinkElement(%d)", i)));
}
void ClickToNextPageAfterPrerender() {
@@ -937,7 +937,7 @@ class PrerenderBrowserTest : virtual public InProcessBrowserTest {
GetActiveWebContents()->GetRenderViewHost();
render_view_host->ExecuteJavascriptInWebFrame(
base::string16(),
- ASCIIToUTF16("ClickOpenLink()"));
+ base::ASCIIToUTF16("ClickOpenLink()"));
new_page_observer.Wait();
}
@@ -1335,7 +1335,7 @@ class PrerenderBrowserTest : virtual public InProcessBrowserTest {
GetActiveWebContents()->GetRenderViewHost();
render_view_host->ExecuteJavascriptInWebFrame(
- base::string16(), ASCIIToUTF16(javascript_function_name));
+ base::string16(), base::ASCIIToUTF16(javascript_function_name));
if (prerender_contents->quit_message_loop_on_destruction()) {
// Run message loop until the prerender contents is destroyed.
@@ -2686,7 +2686,7 @@ IN_PROC_BROWSER_TEST_F(PrerenderBrowserTest,
IN_PROC_BROWSER_TEST_F(PrerenderBrowserTest, DISABLED_PrerenderUnload) {
set_loader_path("files/prerender/prerender_loader_with_unload.html");
PrerenderTestURL("files/prerender/prerender_page.html", FINAL_STATUS_USED, 1);
- base::string16 expected_title = ASCIIToUTF16("Unloaded");
+ base::string16 expected_title = base::ASCIIToUTF16("Unloaded");
content::TitleWatcher title_watcher(
current_browser()->tab_strip_model()->GetActiveWebContents(),
expected_title);
diff --git a/chrome/browser/printing/print_dialog_gtk.cc b/chrome/browser/printing/print_dialog_gtk.cc
index 439ed32..1f2e271 100644
--- a/chrome/browser/printing/print_dialog_gtk.cc
+++ b/chrome/browser/printing/print_dialog_gtk.cc
@@ -174,7 +174,7 @@ bool PrintDialogGtk::UpdateSettings(printing::PrintSettings* settings) {
scoped_ptr<GtkPrinterList> printer_list(new GtkPrinterList);
printer_ = printer_list->GetPrinterWithName(
- UTF16ToUTF8(settings->device_name()));
+ base::UTF16ToUTF8(settings->device_name()));
if (printer_) {
g_object_ref(printer_);
gtk_print_settings_set_printer(gtk_settings_,
@@ -401,7 +401,7 @@ void PrintDialogGtk::SendDocumentToPrinter(
g_last_used_settings.Get().SetLastUsedSettings(gtk_settings_);
GtkPrintJob* print_job = gtk_print_job_new(
- UTF16ToUTF8(document_name).c_str(),
+ base::UTF16ToUTF8(document_name).c_str(),
printer_,
gtk_settings_,
page_setup_);
diff --git a/chrome/browser/printing/printing_layout_browsertest.cc b/chrome/browser/printing/printing_layout_browsertest.cc
index 71e5364a..64d2ed6 100644
--- a/chrome/browser/printing/printing_layout_browsertest.cc
+++ b/chrome/browser/printing/printing_layout_browsertest.cc
@@ -144,7 +144,7 @@ class PrintingLayoutTest : public PrintingTest<InProcessBrowserTest>,
Image png_content(png);
double diff_emf = emf_content.PercentageDifferent(test_content);
- EXPECT_EQ(0., diff_emf) << WideToUTF8(verification_name) <<
+ EXPECT_EQ(0., diff_emf) << base::WideToUTF8(verification_name) <<
" original size:" << emf_content.size().ToString() <<
" result size:" << test_content.size().ToString();
if (diff_emf) {
@@ -157,7 +157,7 @@ class PrintingLayoutTest : public PrintingTest<InProcessBrowserTest>,
// This verification is only to know that the EMF rendering stays
// immutable.
double diff_png = emf_content.PercentageDifferent(png_content);
- EXPECT_EQ(0., diff_png) << WideToUTF8(verification_name) <<
+ EXPECT_EQ(0., diff_png) << base::WideToUTF8(verification_name) <<
" original size:" << emf_content.size().ToString() <<
" result size:" << test_content.size().ToString();
if (diff_png) {
@@ -207,7 +207,7 @@ class PrintingLayoutTest : public PrintingTest<InProcessBrowserTest>,
base::FilePath file;
while (!(file = enumerator.Next()).empty()) {
std::wstring ext = file.Extension();
- if (base::strcasecmp(WideToUTF8(ext).c_str(), ".emf") == 0) {
+ if (base::strcasecmp(base::WideToUTF8(ext).c_str(), ".emf") == 0) {
EXPECT_FALSE(found_emf) << "Found a leftover .EMF file: \"" <<
emf_file << "\" and \"" << file.value() <<
"\" when looking for \"" << verification_name << "\"";
@@ -215,7 +215,7 @@ class PrintingLayoutTest : public PrintingTest<InProcessBrowserTest>,
emf_file = file.value();
continue;
}
- if (base::strcasecmp(WideToUTF8(ext).c_str(), ".prn") == 0) {
+ if (base::strcasecmp(base::WideToUTF8(ext).c_str(), ".prn") == 0) {
EXPECT_FALSE(found_prn) << "Found a leftover .PRN file: \"" <<
prn_file << "\" and \"" << file.value() <<
"\" when looking for \"" << verification_name << "\"";
diff --git a/chrome/browser/process_singleton_linux.cc b/chrome/browser/process_singleton_linux.cc
index 69e6ec6..8e12d98 100644
--- a/chrome/browser/process_singleton_linux.cc
+++ b/chrome/browser/process_singleton_linux.cc
@@ -299,10 +299,10 @@ bool DisplayProfileInUseError(const base::FilePath& lock_path,
base::string16 error = l10n_util::GetStringFUTF16(
IDS_PROFILE_IN_USE_LINUX,
base::IntToString16(pid),
- ASCIIToUTF16(hostname));
+ base::ASCIIToUTF16(hostname));
base::string16 relaunch_button_text = l10n_util::GetStringUTF16(
IDS_PROFILE_IN_USE_LINUX_RELAUNCH);
- LOG(ERROR) << base::SysWideToNativeMB(UTF16ToWide(error)).c_str();
+ LOG(ERROR) << base::SysWideToNativeMB(base::UTF16ToWide(error)).c_str();
if (!g_disable_prompt)
return ShowProcessSingletonDialog(error, relaunch_button_text);
return false;
diff --git a/chrome/browser/profile_resetter/automatic_profile_resetter_delegate_unittest.cc b/chrome/browser/profile_resetter/automatic_profile_resetter_delegate_unittest.cc
index be2ace8..ae203dc 100644
--- a/chrome/browser/profile_resetter/automatic_profile_resetter_delegate_unittest.cc
+++ b/chrome/browser/profile_resetter/automatic_profile_resetter_delegate_unittest.cc
@@ -443,7 +443,8 @@ TEST_F(AutomaticProfileResetterDelegateTest,
std::string keyword;
ASSERT_TRUE(details->GetString("keyword", &keyword));
TemplateURL* search_engine =
- template_url_service->GetTemplateURLForKeyword(ASCIIToUTF16(keyword));
+ template_url_service->GetTemplateURLForKeyword(
+ base::ASCIIToUTF16(keyword));
ASSERT_TRUE(search_engine);
template_url_service->SetDefaultSearchProvider(prepopulated_engines[i]);
diff --git a/chrome/browser/profile_resetter/profile_resetter_unittest.cc b/chrome/browser/profile_resetter/profile_resetter_unittest.cc
index 3039039..2f85a08 100644
--- a/chrome/browser/profile_resetter/profile_resetter_unittest.cc
+++ b/chrome/browser/profile_resetter/profile_resetter_unittest.cc
@@ -33,6 +33,7 @@
#include "net/url_request/url_request_status.h"
#include "url/gurl.h"
+using base::ASCIIToUTF16;
namespace {
@@ -816,7 +817,7 @@ TEST_F(ProfileResetterTest, FeedbackSerializtionTest) {
// Make sure GetReadableFeedback handles non-ascii letters.
TEST_F(ProfileResetterTest, GetReadableFeedback) {
scoped_refptr<Extension> ext = CreateExtension(
- WideToUTF16(L"Tiësto"),
+ base::WideToUTF16(L"Tiësto"),
base::FilePath(FILE_PATH_LITERAL("//nonexistent")),
Manifest::INVALID_LOCATION,
extensions::Manifest::TYPE_EXTENSION,
@@ -830,10 +831,10 @@ TEST_F(ProfileResetterTest, GetReadableFeedback) {
std::wstring url(L"http://"
L"\u0440\u043e\u0441\u0441\u0438\u044f.\u0440\u0444");
prefs->SetBoolean(prefs::kHomePageIsNewTabPage, false);
- prefs->SetString(prefs::kHomePage, WideToUTF8(url));
+ prefs->SetString(prefs::kHomePage, base::WideToUTF8(url));
SessionStartupPref startup_pref(SessionStartupPref::URLS);
- startup_pref.urls.push_back(GURL(WideToUTF8(url)));
+ startup_pref.urls.push_back(GURL(base::WideToUTF8(url)));
SessionStartupPref::SetStartupPref(prefs, startup_pref);
// The homepage and the startup page are in punycode. They are unreadable.
@@ -848,7 +849,7 @@ TEST_F(ProfileResetterTest, GetReadableFeedback) {
if (value == "Extensions") {
base::string16 extensions;
EXPECT_TRUE(dict->GetString("value", &extensions));
- EXPECT_EQ(WideToUTF16(L"Tiësto"), extensions);
+ EXPECT_EQ(base::WideToUTF16(L"Tiësto"), extensions);
}
}
}
diff --git a/chrome/browser/profiles/avatar_menu.cc b/chrome/browser/profiles/avatar_menu.cc
index 0608641..f3db24a 100644
--- a/chrome/browser/profiles/avatar_menu.cc
+++ b/chrome/browser/profiles/avatar_menu.cc
@@ -192,7 +192,8 @@ base::string16 AvatarMenu::GetManagedUserInformation() const {
#if defined(ENABLE_MANAGED_USERS)
ManagedUserService* service = ManagedUserServiceFactory::GetForProfile(
browser_->profile());
- base::string16 custodian = UTF8ToUTF16(service->GetCustodianEmailAddress());
+ base::string16 custodian =
+ base::UTF8ToUTF16(service->GetCustodianEmailAddress());
return l10n_util::GetStringFUTF16(IDS_MANAGED_USER_INFO, custodian);
#endif
}
diff --git a/chrome/browser/profiles/gaia_info_update_service_unittest.cc b/chrome/browser/profiles/gaia_info_update_service_unittest.cc
index 7b625be..e4c04d7 100644
--- a/chrome/browser/profiles/gaia_info_update_service_unittest.cc
+++ b/chrome/browser/profiles/gaia_info_update_service_unittest.cc
@@ -72,7 +72,7 @@ TEST_F(GAIAInfoUpdateServiceTest, DownloadSuccess) {
GAIAInfoUpdateService service(profile());
NiceMock<ProfileDownloaderMock> downloader(&service);
- base::string16 name = ASCIIToUTF16("Pat Smith");
+ base::string16 name = base::ASCIIToUTF16("Pat Smith");
EXPECT_CALL(downloader, GetProfileFullName()).WillOnce(Return(name));
gfx::Image image = gfx::test::CreateImage();
const SkBitmap* bmp = image.ToSkBitmap();
@@ -131,7 +131,7 @@ TEST_F(GAIAInfoUpdateServiceTest, NoMigration) {
GAIAInfoUpdateService service(profile());
NiceMock<ProfileDownloaderMock> downloader(&service);
- base::string16 new_name = ASCIIToUTF16("Pat Smith");
+ base::string16 new_name = base::ASCIIToUTF16("Pat Smith");
EXPECT_CALL(downloader, GetProfileFullName()).WillOnce(Return(new_name));
gfx::Image new_image = gfx::test::CreateImage();
const SkBitmap* new_bmp = new_image.ToSkBitmap();
@@ -172,7 +172,7 @@ TEST_F(GAIAInfoUpdateServiceTest, ScheduleUpdate) {
TEST_F(GAIAInfoUpdateServiceTest, LogOut) {
profile()->GetPrefs()->SetString(prefs::kGoogleServicesUsername,
"pat@example.com");
- base::string16 gaia_name = UTF8ToUTF16("Pat Foo");
+ base::string16 gaia_name = base::UTF8ToUTF16("Pat Foo");
GetCache()->SetGAIANameOfProfileAtIndex(0, gaia_name);
gfx::Image gaia_picture = gfx::test::CreateImage();
GetCache()->SetGAIAPictureOfProfileAtIndex(0, &gaia_picture);
diff --git a/chrome/browser/profiles/profile_downloader_unittest.cc b/chrome/browser/profiles/profile_downloader_unittest.cc
index eaf131a..3761c77 100644
--- a/chrome/browser/profiles/profile_downloader_unittest.cc
+++ b/chrome/browser/profiles/profile_downloader_unittest.cc
@@ -66,8 +66,8 @@ class ProfileDownloaderTest : public testing::Test {
32,
&parsed_locale);
EXPECT_EQ(is_valid, result);
- std::string parsed_full_name_utf8 = UTF16ToUTF8(parsed_full_name);
- std::string parsed_given_name_utf8 = UTF16ToUTF8(parsed_given_name);
+ std::string parsed_full_name_utf8 = base::UTF16ToUTF8(parsed_full_name);
+ std::string parsed_given_name_utf8 = base::UTF16ToUTF8(parsed_given_name);
EXPECT_EQ(full_name, parsed_full_name_utf8);
EXPECT_EQ(given_name, parsed_given_name_utf8);
diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/profile_impl.cc
index 052bb17..df8a22a 100644
--- a/chrome/browser/profiles/profile_impl.cc
+++ b/chrome/browser/profiles/profile_impl.cc
@@ -1226,7 +1226,7 @@ void ProfileImpl::UpdateProfileUserNameCache() {
if (index != std::string::npos) {
std::string user_name =
GetPrefs()->GetString(prefs::kGoogleServicesUsername);
- cache.SetUserNameOfProfileAtIndex(index, UTF8ToUTF16(user_name));
+ cache.SetUserNameOfProfileAtIndex(index, base::UTF8ToUTF16(user_name));
ProfileMetrics::UpdateReportedProfilesStatistics(profile_manager);
}
}
@@ -1238,7 +1238,7 @@ void ProfileImpl::UpdateProfileNameCache() {
if (index != std::string::npos) {
std::string profile_name =
GetPrefs()->GetString(prefs::kProfileName);
- cache.SetNameOfProfileAtIndex(index, UTF8ToUTF16(profile_name));
+ cache.SetNameOfProfileAtIndex(index, base::UTF8ToUTF16(profile_name));
}
}
diff --git a/chrome/browser/profiles/profile_info_cache.cc b/chrome/browser/profiles/profile_info_cache.cc
index a71db61..952a1f2 100644
--- a/chrome/browser/profiles/profile_info_cache.cc
+++ b/chrome/browser/profiles/profile_info_cache.cc
@@ -731,7 +731,7 @@ base::string16 ProfileInfoCache::ChooseNameForNewProfile(
name = l10n_util::GetStringUTF16(
kDefaultNames[icon_index - kGenericIconCount]);
if (name_index > 1)
- name.append(UTF8ToUTF16(base::IntToString(name_index)));
+ name.append(base::UTF8ToUTF16(base::IntToString(name_index)));
}
// Loop through previously named profiles to ensure we're not duplicating.
diff --git a/chrome/browser/profiles/profile_info_cache_unittest.cc b/chrome/browser/profiles/profile_info_cache_unittest.cc
index 61f218d..0908071 100644
--- a/chrome/browser/profiles/profile_info_cache_unittest.cc
+++ b/chrome/browser/profiles/profile_info_cache_unittest.cc
@@ -25,6 +25,7 @@
#include "ui/gfx/image/image.h"
#include "ui/gfx/image/image_unittest_util.h"
+using base::ASCIIToUTF16;
using content::BrowserThread;
ProfileNameVerifierObserver::ProfileNameVerifierObserver(
diff --git a/chrome/browser/profiles/profile_list_desktop_unittest.cc b/chrome/browser/profiles/profile_list_desktop_unittest.cc
index 5927dd5..bc4ed6f9 100644
--- a/chrome/browser/profiles/profile_list_desktop_unittest.cc
+++ b/chrome/browser/profiles/profile_list_desktop_unittest.cc
@@ -20,6 +20,8 @@
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/base/l10n/l10n_util.h"
+using base::ASCIIToUTF16;
+
namespace {
class MockObserver : public AvatarMenuObserver {
diff --git a/chrome/browser/profiles/profile_manager.cc b/chrome/browser/profiles/profile_manager.cc
index df89d22..882ff3f 100644
--- a/chrome/browser/profiles/profile_manager.cc
+++ b/chrome/browser/profiles/profile_manager.cc
@@ -911,7 +911,7 @@ base::FilePath ProfileManager::GenerateNextProfileDirectoryPath() {
profile_name.append(base::IntToString(next_directory));
base::FilePath new_path = user_data_dir_;
#if defined(OS_WIN)
- new_path = new_path.Append(ASCIIToUTF16(profile_name));
+ new_path = new_path.Append(base::ASCIIToUTF16(profile_name));
#else
new_path = new_path.Append(profile_name);
#endif
@@ -988,13 +988,13 @@ void ProfileManager::AddProfileToCache(Profile* profile) {
if (cache.GetIndexOfProfileWithPath(profile->GetPath()) != std::string::npos)
return;
- base::string16 username = UTF8ToUTF16(profile->GetPrefs()->GetString(
+ base::string16 username = base::UTF8ToUTF16(profile->GetPrefs()->GetString(
prefs::kGoogleServicesUsername));
// Profile name and avatar are set by InitProfileUserPrefs and stored in the
// profile. Use those values to setup the cache entry.
- base::string16 profile_name = UTF8ToUTF16(profile->GetPrefs()->GetString(
- prefs::kProfileName));
+ base::string16 profile_name =
+ base::UTF8ToUTF16(profile->GetPrefs()->GetString(prefs::kProfileName));
size_t icon_index = profile->GetPrefs()->GetInteger(
prefs::kProfileAvatarIndex);
@@ -1034,7 +1034,7 @@ void ProfileManager::InitProfileUserPrefs(Profile* profile) {
avatar_index =
cache.GetAvatarIconIndexOfProfileAtIndex(profile_cache_index);
profile_name =
- UTF16ToUTF8(cache.GetNameOfProfileAtIndex(profile_cache_index));
+ base::UTF16ToUTF8(cache.GetNameOfProfileAtIndex(profile_cache_index));
managed_user_id =
cache.GetManagedUserIdOfProfileAtIndex(profile_cache_index);
} else if (profile->GetPath() ==
@@ -1043,7 +1043,8 @@ void ProfileManager::InitProfileUserPrefs(Profile* profile) {
profile_name = l10n_util::GetStringUTF8(IDS_DEFAULT_PROFILE_NAME);
} else {
avatar_index = cache.ChooseAvatarIconIndexForNewProfile();
- profile_name = UTF16ToUTF8(cache.ChooseNameForNewProfile(avatar_index));
+ profile_name =
+ base::UTF16ToUTF8(cache.ChooseNameForNewProfile(avatar_index));
}
}
diff --git a/chrome/browser/profiles/profile_manager_unittest.cc b/chrome/browser/profiles/profile_manager_unittest.cc
index 44b4d1b..0ae5714 100644
--- a/chrome/browser/profiles/profile_manager_unittest.cc
+++ b/chrome/browser/profiles/profile_manager_unittest.cc
@@ -46,6 +46,7 @@
#include "chromeos/chromeos_switches.h"
#endif
+using base::ASCIIToUTF16;
using content::BrowserThread;
namespace {
@@ -119,7 +120,7 @@ class ProfileManagerTest : public testing::Test {
temp_dir_.path().AppendASCII(name),
base::Bind(&MockObserver::OnProfileCreated,
base::Unretained(mock_observer)),
- UTF8ToUTF16(name),
+ base::UTF8ToUTF16(name),
base::string16(),
std::string());
}
@@ -400,7 +401,7 @@ TEST_F(ProfileManagerTest, InitProfileInfoCacheForAProfile) {
// Check if the profile prefs are the same as the cache prefs
EXPECT_EQ(profile_name,
- UTF16ToUTF8(cache.GetNameOfProfileAtIndex(profile_index)));
+ base::UTF16ToUTF8(cache.GetNameOfProfileAtIndex(profile_index)));
EXPECT_EQ(avatar_index,
cache.GetAvatarIconIndexOfProfileAtIndex(profile_index));
}
diff --git a/chrome/browser/profiles/profile_shortcut_manager_win.cc b/chrome/browser/profiles/profile_shortcut_manager_win.cc
index c3be744..0dfc554 100644
--- a/chrome/browser/profiles/profile_shortcut_manager_win.cc
+++ b/chrome/browser/profiles/profile_shortcut_manager_win.cc
@@ -643,7 +643,8 @@ base::string16 GetShortcutFilenameForProfile(
base::string16 CreateProfileShortcutFlags(const base::FilePath& profile_path) {
return base::StringPrintf(L"--%ls=\"%ls\"",
- ASCIIToUTF16(switches::kProfileDirectory).c_str(),
+ base::ASCIIToUTF16(
+ switches::kProfileDirectory).c_str(),
profile_path.BaseName().value().c_str());
}
diff --git a/chrome/browser/profiles/profiles_state.cc b/chrome/browser/profiles/profiles_state.cc
index 07f7d1b..62be3ad 100644
--- a/chrome/browser/profiles/profiles_state.cc
+++ b/chrome/browser/profiles/profiles_state.cc
@@ -89,7 +89,8 @@ void UpdateProfileName(Profile* profile,
PrefService* pref_service = profile->GetPrefs();
// Updating the profile preference will cause the cache to be updated for
// this preference.
- pref_service->SetString(prefs::kProfileName, UTF16ToUTF8(new_profile_name));
+ pref_service->SetString(prefs::kProfileName,
+ base::UTF16ToUTF8(new_profile_name));
// Changing the profile name can invalidate the profile index.
profile_index = cache.GetIndexOfProfileWithPath(profile_file_path);
diff --git a/chrome/browser/referrer_policy_browsertest.cc b/chrome/browser/referrer_policy_browsertest.cc
index e7fb9a5..df05db5 100644
--- a/chrome/browser/referrer_policy_browsertest.cc
+++ b/chrome/browser/referrer_policy_browsertest.cc
@@ -84,7 +84,7 @@ class ReferrerPolicyTest : public InProcessBrowserTest {
referrer = "Referrer is " + url.GetWithEmptyPath().spec();
break;
}
- return ASCIIToUTF16(referrer);
+ return base::ASCIIToUTF16(referrer);
}
// Adds all possible titles to the TitleWatcher, so we don't time out