diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-12-11 17:51:49 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-12-11 17:51:49 +0000 |
commit | e9273e19ac50bb20ea9bdcb0a65935bbf5cdd545 (patch) | |
tree | b7596ac00576f552970d869e48f0517448fa70e4 /chrome/browser/ui/webui | |
parent | 6463f823d8a7e915d2ae0f473aabe599c73fdc30 (diff) | |
download | chromium_src-e9273e19ac50bb20ea9bdcb0a65935bbf5cdd545.zip chromium_src-e9273e19ac50bb20ea9bdcb0a65935bbf5cdd545.tar.gz chromium_src-e9273e19ac50bb20ea9bdcb0a65935bbf5cdd545.tar.bz2 |
Replace some string16's with base namespace in chrome/browser
TBR=sky
Review URL: https://codereview.chromium.org/101953005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@240126 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ui/webui')
102 files changed, 333 insertions, 312 deletions
diff --git a/chrome/browser/ui/webui/about_ui.cc b/chrome/browser/ui/webui/about_ui.cc index 1733570..29c2f12 100644 --- a/chrome/browser/ui/webui/about_ui.cc +++ b/chrome/browser/ui/webui/about_ui.cc @@ -904,7 +904,7 @@ void AboutMemoryHandler::OnDetailsAvailable() { const std::vector<ProcessData>& browser_processes = processes(); // Aggregate per-process data into browser summary data. - string16 log_string; + base::string16 log_string; for (size_t index = 0; index < browser_processes.size(); index++) { if (browser_processes[index].processes.empty()) continue; diff --git a/chrome/browser/ui/webui/certificate_viewer_webui.h b/chrome/browser/ui/webui/certificate_viewer_webui.h index 410300d..f546b10 100644 --- a/chrome/browser/ui/webui/certificate_viewer_webui.h +++ b/chrome/browser/ui/webui/certificate_viewer_webui.h @@ -41,7 +41,7 @@ class CertificateViewerDialog : private ui::WebDialogDelegate { private: // Overridden from ui::WebDialogDelegate: virtual ui::ModalType GetDialogModalType() const OVERRIDE; - virtual string16 GetDialogTitle() const OVERRIDE; + virtual base::string16 GetDialogTitle() const OVERRIDE; virtual GURL GetDialogContentURL() const OVERRIDE; virtual void GetWebUIMessageHandlers( std::vector<content::WebUIMessageHandler*>* handlers) const OVERRIDE; @@ -61,7 +61,7 @@ class CertificateViewerDialog : private ui::WebDialogDelegate { ConstrainedWebDialogDelegate* dialog_; // The title of the certificate viewer dialog, Certificate Viewer: CN. - string16 title_; + base::string16 title_; DISALLOW_COPY_AND_ASSIGN(CertificateViewerDialog); }; diff --git a/chrome/browser/ui/webui/chromeos/imageburner/imageburner_ui.cc b/chrome/browser/ui/webui/chromeos/imageburner/imageburner_ui.cc index 08b3146..0a1c11f 100644 --- a/chrome/browser/ui/webui/chromeos/imageburner/imageburner_ui.cc +++ b/chrome/browser/ui/webui/chromeos/imageburner/imageburner_ui.cc @@ -142,7 +142,7 @@ class WebUIHandler // BurnController::Delegate override. virtual void OnDeviceTooSmall(int64 device_size) OVERRIDE { - string16 size; + base::string16 size; GetDataSizeText(device_size, &size); StringValue device_size_text(size); web_ui()->CallJavascriptFunction("browserBridge.reportDeviceTooSmall", @@ -153,7 +153,7 @@ class WebUIHandler virtual void OnProgress(ProgressType progress_type, int64 amount_finished, int64 amount_total) OVERRIDE { - const string16 time_remaining_text = + const base::string16 time_remaining_text = l10n_util::GetStringUTF16(IDS_IMAGEBURN_PROGRESS_TIME_UNKNOWN); SendProgressSignal(progress_type, amount_finished, amount_total, time_remaining_text); @@ -165,7 +165,7 @@ class WebUIHandler int64 amount_finished, int64 amount_total, const base::TimeDelta& time_remaining) OVERRIDE { - const string16 time_remaining_text = l10n_util::GetStringFUTF16( + const base::string16 time_remaining_text = l10n_util::GetStringFUTF16( IDS_IMAGEBURN_DOWNLOAD_TIME_REMAINING, ui::TimeFormat::TimeRemaining(time_remaining)); SendProgressSignal(progress_type, amount_finished, amount_total, @@ -185,7 +185,7 @@ class WebUIHandler private: void CreateDiskValue(const disks::DiskMountManager::Disk& disk, DictionaryValue* disk_value) { - string16 label = ASCIIToUTF16(disk.drive_label()); + base::string16 label = ASCIIToUTF16(disk.drive_label()); base::i18n::AdjustStringForLocaleDirection(&label); disk_value->SetString(std::string(kPropertyLabel), label); disk_value->SetString(std::string(kPropertyFilePath), disk.file_path()); @@ -235,7 +235,7 @@ class WebUIHandler void SendProgressSignal(ProgressType progress_type, int64 amount_finished, int64 amount_total, - const string16& time_remaining_text) { + const base::string16& time_remaining_text) { DictionaryValue progress; int progress_message_id = 0; switch (progress_type) { @@ -257,7 +257,7 @@ class WebUIHandler progress.SetInteger("amountFinished", amount_finished); progress.SetInteger("amountTotal", amount_total); if (amount_total != 0) { - string16 progress_text; + base::string16 progress_text; GetProgressText(progress_message_id, amount_finished, amount_total, &progress_text); progress.SetString("progressText", progress_text); @@ -270,7 +270,7 @@ class WebUIHandler } // size_text should be previously created. - void GetDataSizeText(int64 size, string16* size_text) { + void GetDataSizeText(int64 size, base::string16* size_text) { *size_text = ui::FormatBytes(size); base::i18n::AdjustStringForLocaleDirection(size_text); } @@ -279,10 +279,10 @@ class WebUIHandler void GetProgressText(int message_id, int64 amount_finished, int64 amount_total, - string16* progress_text) { - string16 finished; + base::string16* progress_text) { + base::string16 finished; GetDataSizeText(amount_finished, &finished); - string16 total; + base::string16 total; GetDataSizeText(amount_total, &total); *progress_text = l10n_util::GetStringFUTF16(message_id, finished, total); } diff --git a/chrome/browser/ui/webui/chromeos/login/app_launch_splash_screen_handler.cc b/chrome/browser/ui/webui/chromeos/login/app_launch_splash_screen_handler.cc index e95fa2e..aaf1913 100644 --- a/chrome/browser/ui/webui/chromeos/login/app_launch_splash_screen_handler.cc +++ b/chrome/browser/ui/webui/chromeos/login/app_launch_splash_screen_handler.cc @@ -57,7 +57,7 @@ void AppLaunchSplashScreenHandler::DeclareLocalizedValues( builder->Add("appStartMessage", IDS_APP_START_NETWORK_WAIT_MESSAGE); builder->Add("configureNetwork", IDS_APP_START_CONFIGURE_NETWORK); - const string16 product_os_name = + const base::string16 product_os_name = l10n_util::GetStringUTF16(IDS_SHORT_PRODUCT_OS_NAME); builder->Add( "shortcutInfo", diff --git a/chrome/browser/ui/webui/chromeos/login/base_screen_handler.cc b/chrome/browser/ui/webui/chromeos/login/base_screen_handler.cc index 2fd1450..d530039 100644 --- a/chrome/browser/ui/webui/chromeos/login/base_screen_handler.cc +++ b/chrome/browser/ui/webui/chromeos/login/base_screen_handler.cc @@ -22,7 +22,7 @@ void LocalizedValuesBuilder::Add(const std::string& key, } void LocalizedValuesBuilder::Add(const std::string& key, - const string16& message) { + const base::string16& message) { dict_->SetString(key, message); } @@ -33,15 +33,15 @@ void LocalizedValuesBuilder::Add(const std::string& key, int message_id) { void LocalizedValuesBuilder::AddF(const std::string& key, int message_id, - const string16& a) { + const base::string16& a) { dict_->SetString(key, l10n_util::GetStringFUTF16(message_id, a)); } void LocalizedValuesBuilder::AddF(const std::string& key, int message_id, - const string16& a, - const string16& b) { + const base::string16& a, + const base::string16& b) { dict_->SetString(key, l10n_util::GetStringFUTF16(message_id, a, b)); } diff --git a/chrome/browser/ui/webui/chromeos/login/base_screen_handler.h b/chrome/browser/ui/webui/chromeos/login/base_screen_handler.h index 4baf62c..9efddca 100644 --- a/chrome/browser/ui/webui/chromeos/login/base_screen_handler.h +++ b/chrome/browser/ui/webui/chromeos/login/base_screen_handler.h @@ -34,7 +34,7 @@ class LocalizedValuesBuilder { // Method to declare localized value. |key| is the i18n key used in html. // |message| is text of the message. - void Add(const std::string& key, const string16& message); + void Add(const std::string& key, const base::string16& message); // Method to declare localized value. |key| is the i18n key used in html. // |message_id| is a resource id of message. @@ -45,15 +45,15 @@ class LocalizedValuesBuilder { // one format parameter subsituted by |a|. void AddF(const std::string& key, int message_id, - const string16& a); + const base::string16& a); // Method to declare localized value. |key| is the i18n key used in html. // |message_id| is a resource id of message. Message is expected to have // two format parameters subsituted by |a| and |b| respectively. void AddF(const std::string& key, int message_id, - const string16& a, - const string16& b); + const base::string16& a, + const base::string16& b); // Method to declare localized value. |key| is the i18n key used in html. // |message_id| is a resource id of message. Message is expected to have diff --git a/chrome/browser/ui/webui/chromeos/login/base_screen_handler_utils.h b/chrome/browser/ui/webui/chromeos/login/base_screen_handler_utils.h index f39c82a..05bfaec 100644 --- a/chrome/browser/ui/webui/chromeos/login/base_screen_handler_utils.h +++ b/chrome/browser/ui/webui/chromeos/login/base_screen_handler_utils.h @@ -86,7 +86,7 @@ inline base::StringValue MakeValue(const std::string& v) { return base::StringValue(v); } -inline base::StringValue MakeValue(const string16& v) { +inline base::StringValue MakeValue(const base::string16& v) { return base::StringValue(v); } diff --git a/chrome/browser/ui/webui/chromeos/login/locally_managed_user_creation_screen_handler.cc b/chrome/browser/ui/webui/chromeos/login/locally_managed_user_creation_screen_handler.cc index 3952383..8d5f98a 100644 --- a/chrome/browser/ui/webui/chromeos/login/locally_managed_user_creation_screen_handler.cc +++ b/chrome/browser/ui/webui/chromeos/login/locally_managed_user_creation_screen_handler.cc @@ -219,7 +219,7 @@ void LocallyManagedUserCreationScreenHandler::ShowManagerPasswordError() { void LocallyManagedUserCreationScreenHandler::ShowStatusMessage( bool is_progress, - const string16& message) { + const base::string16& message) { if (is_progress) CallJS("showProgress", message); else @@ -235,9 +235,9 @@ void LocallyManagedUserCreationScreenHandler::ShowTutorialPage() { } void LocallyManagedUserCreationScreenHandler::ShowErrorPage( - const string16& title, - const string16& message, - const string16& button_text) { + const base::string16& title, + const base::string16& message, + const base::string16& button_text) { CallJS("showErrorPage", title, message, button_text); } @@ -269,7 +269,7 @@ void LocallyManagedUserCreationScreenHandler::HandleImportUserSelected( } void LocallyManagedUserCreationScreenHandler::HandleCheckLocallyManagedUserName( - const string16& name) { + const base::string16& name) { std::string user_id; if (NULL != UserManager::Get()->GetSupervisedUserManager()-> FindByDisplayName(CollapseWhitespace(name, true))) { @@ -289,11 +289,12 @@ void LocallyManagedUserCreationScreenHandler::HandleCheckLocallyManagedUserName( } void LocallyManagedUserCreationScreenHandler::HandleCreateManagedUser( - const string16& new_raw_user_name, + const base::string16& new_raw_user_name, const std::string& new_user_password) { if (!delegate_) return; - const string16 new_user_name = CollapseWhitespace(new_raw_user_name, true); + const base::string16 new_user_name = + CollapseWhitespace(new_raw_user_name, true); if (NULL != UserManager::Get()->GetSupervisedUserManager()-> FindByDisplayName(new_user_name)) { CallJS("managedUserNameError", new_user_name, diff --git a/chrome/browser/ui/webui/chromeos/login/locally_managed_user_creation_screen_handler.h b/chrome/browser/ui/webui/chromeos/login/locally_managed_user_creation_screen_handler.h index 55673b2..8fcf3fb 100644 --- a/chrome/browser/ui/webui/chromeos/login/locally_managed_user_creation_screen_handler.h +++ b/chrome/browser/ui/webui/chromeos/login/locally_managed_user_creation_screen_handler.h @@ -38,13 +38,13 @@ class LocallyManagedUserCreationScreenHandler : public BaseScreenHandler { // Starts managed user creation flow, with supervised user that would have // |display_name| and authenticated by the |managed_user_password|. virtual void CreateManagedUser( - const string16& display_name, + const base::string16& display_name, const std::string& managed_user_password) = 0; // Look up if user with name |display_name| already exist and can be // imported. Returns user ID in |out_id|. Returns true if user was found, // false otherwise. - virtual bool FindUserByDisplayName(const string16& display_name, + virtual bool FindUserByDisplayName(const base::string16& display_name, std::string *out_id) const = 0; // Starts managed user import flow for user identified with |user_id|. @@ -81,12 +81,12 @@ class LocallyManagedUserCreationScreenHandler : public BaseScreenHandler { // Shows progress or error message close in the button area. |is_progress| is // true for progress messages and false for error messages. - void ShowStatusMessage(bool is_progress, const string16& message); + void ShowStatusMessage(bool is_progress, const base::string16& message); void ShowTutorialPage(); - void ShowErrorPage(const string16& title, - const string16& message, - const string16& button_text); + void ShowErrorPage(const base::string16& title, + const base::string16& message, + const base::string16& button_text); // Navigates to specified page. void ShowPage(const std::string& page); @@ -104,7 +104,7 @@ class LocallyManagedUserCreationScreenHandler : public BaseScreenHandler { private: // WebUI message handlers. - void HandleCheckLocallyManagedUserName(const string16& name); + void HandleCheckLocallyManagedUserName(const base::string16& name); void HandleManagerSelected(const std::string& manager_id); void HandleImportUserSelected(const std::string& user_id); @@ -116,7 +116,7 @@ class LocallyManagedUserCreationScreenHandler : public BaseScreenHandler { void HandleAuthenticateManager(const std::string& raw_manager_username, const std::string& manager_password); - void HandleCreateManagedUser(const string16& new_raw_user_name, + void HandleCreateManagedUser(const base::string16& new_raw_user_name, const std::string& new_user_password); void HandleImportSupervisedUser(const std::string& user_id); void HandleImportSupervisedUserWithPassword(const std::string& user_id, @@ -128,7 +128,7 @@ class LocallyManagedUserCreationScreenHandler : public BaseScreenHandler { void HandleSelectImage(const std::string& image_url, const std::string& image_type); - void UpdateText(const std::string& element_id, const string16& text); + void UpdateText(const std::string& element_id, const base::string16& text); Delegate* delegate_; diff --git a/chrome/browser/ui/webui/chromeos/login/network_dropdown.cc b/chrome/browser/ui/webui/chromeos/login/network_dropdown.cc index e3d6728..5076cc4 100644 --- a/chrome/browser/ui/webui/chromeos/login/network_dropdown.cc +++ b/chrome/browser/ui/webui/chromeos/login/network_dropdown.cc @@ -181,7 +181,7 @@ void NetworkDropdown::Refresh() { } void NetworkDropdown::SetNetworkIconAndText() { - string16 text; + base::string16 text; gfx::ImageSkia icon_image; bool animating = false; ash::network_icon::GetDefaultNetworkImageAndLabel( diff --git a/chrome/browser/ui/webui/chromeos/login/network_screen_handler.cc b/chrome/browser/ui/webui/chromeos/login/network_screen_handler.cc index 93531f3..603c5c2b 100644 --- a/chrome/browser/ui/webui/chromeos/login/network_screen_handler.cc +++ b/chrome/browser/ui/webui/chromeos/login/network_screen_handler.cc @@ -78,7 +78,7 @@ void NetworkScreenHandler::Show() { void NetworkScreenHandler::Hide() { } -void NetworkScreenHandler::ShowError(const string16& message) { +void NetworkScreenHandler::ShowError(const base::string16& message) { CallJS("showError", message); } @@ -89,8 +89,8 @@ void NetworkScreenHandler::ClearErrors() { void NetworkScreenHandler::ShowConnectingStatus( bool connecting, - const string16& network_id) { - // string16 connecting_label = + const base::string16& network_id) { + // base::string16 connecting_label = // l10n_util::GetStringFUTF16(IDS_NETWORK_SELECTION_CONNECTING, // network_id); // CallJS("cr.ui.Oobe.showConnectingStatus", diff --git a/chrome/browser/ui/webui/chromeos/login/network_screen_handler.h b/chrome/browser/ui/webui/chromeos/login/network_screen_handler.h index a19486b..56cb8a2 100644 --- a/chrome/browser/ui/webui/chromeos/login/network_screen_handler.h +++ b/chrome/browser/ui/webui/chromeos/login/network_screen_handler.h @@ -32,10 +32,10 @@ class NetworkScreenHandler : public NetworkScreenActor, virtual void PrepareToShow() OVERRIDE; virtual void Show() OVERRIDE; virtual void Hide() OVERRIDE; - virtual void ShowError(const string16& message) OVERRIDE; + virtual void ShowError(const base::string16& message) OVERRIDE; virtual void ClearErrors() OVERRIDE; virtual void ShowConnectingStatus(bool connecting, - const string16& network_id) OVERRIDE; + const base::string16& network_id) OVERRIDE; virtual void EnableContinue(bool enabled) OVERRIDE; // BaseScreenHandler implementation: diff --git a/chrome/browser/ui/webui/chromeos/mobile_setup_dialog.cc b/chrome/browser/ui/webui/chromeos/mobile_setup_dialog.cc index 1ad3328..81b1851 100644 --- a/chrome/browser/ui/webui/chromeos/mobile_setup_dialog.cc +++ b/chrome/browser/ui/webui/chromeos/mobile_setup_dialog.cc @@ -44,7 +44,7 @@ class MobileSetupDialogDelegate : public WebDialogDelegate { // WebDialogDelegate overrides. virtual ui::ModalType GetDialogModalType() const OVERRIDE; - virtual string16 GetDialogTitle() const OVERRIDE; + virtual base::string16 GetDialogTitle() const OVERRIDE; virtual GURL GetDialogContentURL() const OVERRIDE; virtual void GetWebUIMessageHandlers( std::vector<WebUIMessageHandler*>* handlers) const OVERRIDE; diff --git a/chrome/browser/ui/webui/chromeos/mobile_setup_ui.cc b/chrome/browser/ui/webui/chromeos/mobile_setup_ui.cc index df644ab3..486ce96 100644 --- a/chrome/browser/ui/webui/chromeos/mobile_setup_ui.cc +++ b/chrome/browser/ui/webui/chromeos/mobile_setup_ui.cc @@ -635,7 +635,7 @@ MobileSetupUI::MobileSetupUI(content::WebUI* web_ui) void MobileSetupUI::DidCommitProvisionalLoadForFrame( int64 frame_id, - const string16& frame_unique_name, + const base::string16& frame_unique_name, bool is_main_frame, const GURL& url, content::PageTransition transition_type, @@ -649,11 +649,11 @@ void MobileSetupUI::DidCommitProvisionalLoadForFrame( void MobileSetupUI::DidFailProvisionalLoad( int64 frame_id, - const string16& frame_unique_name, + const base::string16& frame_unique_name, bool is_main_frame, const GURL& validated_url, int error_code, - const string16& error_description, + const base::string16& error_description, content::RenderViewHost* render_view_host) { if (frame_unique_name != UTF8ToUTF16("paymentForm")) return; diff --git a/chrome/browser/ui/webui/chromeos/mobile_setup_ui.h b/chrome/browser/ui/webui/chromeos/mobile_setup_ui.h index 336d2fd..cbd5541 100644 --- a/chrome/browser/ui/webui/chromeos/mobile_setup_ui.h +++ b/chrome/browser/ui/webui/chromeos/mobile_setup_ui.h @@ -21,18 +21,18 @@ class MobileSetupUI : public content::WebUIController, // content::WebContentsObserver overrides. virtual void DidCommitProvisionalLoadForFrame( int64 frame_id, - const string16& frame_unique_name, + const base::string16& frame_unique_name, bool is_main_frame, const GURL& url, content::PageTransition transition_type, content::RenderViewHost* render_view_host) OVERRIDE; virtual void DidFailProvisionalLoad( int64 frame_id, - const string16& frame_unique_name, + const base::string16& frame_unique_name, bool is_main_frame, const GURL& validated_url, int error_code, - const string16& error_description, + const base::string16& error_description, content::RenderViewHost* render_view_host) OVERRIDE; DISALLOW_COPY_AND_ASSIGN(MobileSetupUI); diff --git a/chrome/browser/ui/webui/conflicts_ui.cc b/chrome/browser/ui/webui/conflicts_ui.cc index c5f0a19..cc937aa 100644 --- a/chrome/browser/ui/webui/conflicts_ui.cc +++ b/chrome/browser/ui/webui/conflicts_ui.cc @@ -121,7 +121,7 @@ void ConflictsDOMHandler::SendModuleList() { // Add the section title and the total count for bad modules found. int confirmed_bad = loaded_modules->confirmed_bad_modules_detected(); int suspected_bad = loaded_modules->suspected_bad_modules_detected(); - string16 table_title; + base::string16 table_title; if (!confirmed_bad && !suspected_bad) { table_title += l10n_util::GetStringFUTF16( IDS_CONFLICTS_CHECK_PAGE_TABLE_TITLE_SUFFIX_ONE, diff --git a/chrome/browser/ui/webui/downloads_dom_handler.cc b/chrome/browser/ui/webui/downloads_dom_handler.cc index f964d84..77f3c31 100644 --- a/chrome/browser/ui/webui/downloads_dom_handler.cc +++ b/chrome/browser/ui/webui/downloads_dom_handler.cc @@ -151,7 +151,7 @@ DictionaryValue* CreateDownloadItemValue( } // Keep file names as LTR. - string16 file_name = + base::string16 file_name = download_item->GetFileNameToReportUser().LossyDisplayName(); file_name = base::i18n::GetDisplayStringInLTRDirectionality(file_name); file_value->SetString("file_name", file_name); diff --git a/chrome/browser/ui/webui/extensions/chromeos/kiosk_apps_handler.cc b/chrome/browser/ui/webui/extensions/chromeos/kiosk_apps_handler.cc index 39ae6a2..3fdaecf 100644 --- a/chrome/browser/ui/webui/extensions/chromeos/kiosk_apps_handler.cc +++ b/chrome/browser/ui/webui/extensions/chromeos/kiosk_apps_handler.cc @@ -159,7 +159,7 @@ void KioskAppsHandler::GetLocalizedValues(content::WebUIDataSource* source) { "kioskDisableBailoutShortcutWarningBold", l10n_util::GetStringUTF16( IDS_OPTIONS_KIOSK_DISABLE_BAILOUT_SHORTCUT_WARNING_BOLD)); - const string16 product_os_name = + const base::string16 product_os_name = l10n_util::GetStringUTF16(IDS_SHORT_PRODUCT_OS_NAME); source->AddString( "kioskDisableBailoutShortcutWarning", diff --git a/chrome/browser/ui/webui/extensions/extension_settings_handler.cc b/chrome/browser/ui/webui/extensions/extension_settings_handler.cc index 7fbafa6..1a757c0 100644 --- a/chrome/browser/ui/webui/extensions/extension_settings_handler.cc +++ b/chrome/browser/ui/webui/extensions/extension_settings_handler.cc @@ -233,7 +233,7 @@ base::DictionaryValue* ExtensionSettingsHandler::CreateExtensionDetailValue( extension_data->SetBoolean("homepageProvided", ManifestURL::GetHomepageURL(extension).is_valid()); - string16 location_text; + base::string16 location_text; if (Manifest::IsPolicyLocation(extension->location())) { location_text = l10n_util::GetStringUTF16( IDS_OPTIONS_INSTALL_LOCATION_ENTERPRISE); @@ -997,7 +997,7 @@ void ExtensionSettingsHandler::HandleLoadUnpackedExtensionMessage( const base::ListValue* args) { DCHECK(args->empty()); - string16 select_title = + base::string16 select_title = l10n_util::GetStringUTF16(IDS_EXTENSION_LOAD_FROM_DIRECTORY); const int kFileTypeIndex = 0; // No file type information to index. diff --git a/chrome/browser/ui/webui/extensions/pack_extension_handler.cc b/chrome/browser/ui/webui/extensions/pack_extension_handler.cc index 4bb3e4e..49f47c4 100644 --- a/chrome/browser/ui/webui/extensions/pack_extension_handler.cc +++ b/chrome/browser/ui/webui/extensions/pack_extension_handler.cc @@ -169,7 +169,7 @@ void PackExtensionHandler::HandleSelectFilePathMessage( path_to_use = base::FilePath(); } - string16 select_title; + base::string16 select_title; if (operation == "load") { select_title = l10n_util::GetStringUTF16(IDS_EXTENSION_LOAD_FROM_DIRECTORY); } else if (operation == "pem") { diff --git a/chrome/browser/ui/webui/flags_ui.cc b/chrome/browser/ui/webui/flags_ui.cc index 405c7fd..c21350f 100644 --- a/chrome/browser/ui/webui/flags_ui.cc +++ b/chrome/browser/ui/webui/flags_ui.cc @@ -84,7 +84,7 @@ content::WebUIDataSource* CreateFlagsUIHTMLSource() { } else { // The warning will be only shown on ChromeOS, when the current user is not // the owner. - source->AddString("ownerWarning", string16()); + source->AddString("ownerWarning", base::string16()); } #endif diff --git a/chrome/browser/ui/webui/flash_ui.cc b/chrome/browser/ui/webui/flash_ui.cc index cf4aefb..4d6333c 100644 --- a/chrome/browser/ui/webui/flash_ui.cc +++ b/chrome/browser/ui/webui/flash_ui.cc @@ -180,14 +180,18 @@ void FlashDOMHandler::OnUploadListAvailable() { MaybeRespondToPage(); } -void AddPair(ListValue* list, const string16& key, const string16& value) { +void AddPair(ListValue* list, + const base::string16& key, + const base::string16& value) { DictionaryValue* results = new DictionaryValue(); results->SetString("key", key); results->SetString("value", value); list->Append(results); } -void AddPair(ListValue* list, const string16& key, const std::string& value) { +void AddPair(ListValue* list, + const base::string16& key, + const std::string& value) { AddPair(list, key, ASCIIToUTF16(value)); } @@ -275,7 +279,7 @@ void FlashDOMHandler::MaybeRespondToPage() { PluginPrefs::GetForProfile(Profile::FromWebUI(web_ui())).get(); bool found_enabled = false; for (size_t i = 0; i < info_array.size(); ++i) { - string16 flash_version = info_array[i].version + ASCIIToUTF16(" ") + + base::string16 flash_version = info_array[i].version + ASCIIToUTF16(" ") + info_array[i].path.LossyDisplayName(); if (plugin_prefs->IsPluginEnabled(info_array[i])) { // If we have already found an enabled Flash version, this one @@ -292,7 +296,7 @@ void FlashDOMHandler::MaybeRespondToPage() { } // Crash information. - AddPair(list, string16(), "--- Crash data ---"); + AddPair(list, base::string16(), "--- Crash data ---"); bool crash_reporting_enabled = CrashesUI::CrashReportingUIEnabled(); if (crash_reporting_enabled) { std::vector<CrashUploadList::UploadInfo> crashes; @@ -300,7 +304,7 @@ void FlashDOMHandler::MaybeRespondToPage() { for (std::vector<CrashUploadList::UploadInfo>::iterator i = crashes.begin(); i != crashes.end(); ++i) { - string16 crash_string(ASCIIToUTF16(i->id)); + base::string16 crash_string(ASCIIToUTF16(i->id)); crash_string += ASCIIToUTF16(" "); crash_string += base::TimeFormatFriendlyDateAndTime(i->time); AddPair(list, ASCIIToUTF16("crash id"), crash_string); @@ -313,7 +317,7 @@ void FlashDOMHandler::MaybeRespondToPage() { } // GPU information. - AddPair(list, string16(), "--- GPU information ---"); + AddPair(list, base::string16(), "--- GPU information ---"); gpu::GPUInfo gpu_info = GpuDataManager::GetInstance()->GetGPUInfo(); std::string reason; @@ -344,7 +348,7 @@ void FlashDOMHandler::MaybeRespondToPage() { } #endif - AddPair(list, string16(), "--- GPU driver, more information ---"); + AddPair(list, base::string16(), "--- GPU driver, more information ---"); AddPair(list, ASCIIToUTF16("Vendor Id"), base::StringPrintf("0x%04x", gpu_info.gpu.vendor_id)); diff --git a/chrome/browser/ui/webui/help/help_handler.cc b/chrome/browser/ui/webui/help/help_handler.cc index a42f63f..98c5202 100644 --- a/chrome/browser/ui/webui/help/help_handler.cc +++ b/chrome/browser/ui/webui/help/help_handler.cc @@ -227,19 +227,19 @@ void HelpHandler::GetLocalizedValues(content::WebUIDataSource* source) { l10n_util::GetStringFUTF16(IDS_ABOUT_VERSION_COPYRIGHT, base::IntToString16(exploded_time.year))); - string16 license = l10n_util::GetStringFUTF16( + base::string16 license = l10n_util::GetStringFUTF16( IDS_ABOUT_VERSION_LICENSE, ASCIIToUTF16(chrome::kChromiumProjectURL), ASCIIToUTF16(chrome::kChromeUICreditsURL)); source->AddString("productLicense", license); #if defined(OS_CHROMEOS) - string16 os_license = l10n_util::GetStringFUTF16( + base::string16 os_license = l10n_util::GetStringFUTF16( IDS_ABOUT_CROS_VERSION_LICENSE, ASCIIToUTF16(chrome::kChromeUIOSCreditsURL)); source->AddString("productOsLicense", os_license); - string16 product_name = l10n_util::GetStringUTF16(IDS_PRODUCT_OS_NAME); + base::string16 product_name = l10n_util::GetStringUTF16(IDS_PRODUCT_OS_NAME); source->AddString( "channelChangePageDelayedChangeMessage", l10n_util::GetStringFUTF16( @@ -257,7 +257,7 @@ void HelpHandler::GetLocalizedValues(content::WebUIDataSource* source) { } #endif - string16 tos = l10n_util::GetStringFUTF16( + base::string16 tos = l10n_util::GetStringFUTF16( IDS_ABOUT_TERMS_OF_SERVICE, UTF8ToUTF16(chrome::kChromeUITermsURL)); source->AddString("productTOS", tos); @@ -332,7 +332,7 @@ void HelpHandler::OnPageLoaded(const ListValue* args) { base::FundamentalValue(CanChangeChannel())); base::Time build_time = base::SysInfo::GetLsbReleaseTime(); - string16 build_date = base::TimeFormatFriendlyDate(build_time); + base::string16 build_date = base::TimeFormatFriendlyDate(build_time); web_ui()->CallJavascriptFunction("help.HelpPage.setBuildDate", base::StringValue(build_date)); #endif // defined(OS_CHROMEOS) @@ -427,7 +427,7 @@ void HelpHandler::RelaunchAndPowerwash(const ListValue* args) { #endif // defined(OS_CHROMEOS) void HelpHandler::SetUpdateStatus(VersionUpdater::Status status, - int progress, const string16& message) { + int progress, const base::string16& message) { // Only UPDATING state should have progress set. DCHECK(status == VersionUpdater::UPDATING || progress == 0); @@ -467,7 +467,7 @@ void HelpHandler::SetUpdateStatus(VersionUpdater::Status status, #if defined(OS_CHROMEOS) if (status == VersionUpdater::FAILED_OFFLINE || status == VersionUpdater::FAILED_CONNECTION_TYPE_DISALLOWED) { - string16 types_msg = GetAllowedConnectionTypesMessage(); + base::string16 types_msg = GetAllowedConnectionTypesMessage(); if (!types_msg.empty()) { web_ui()->CallJavascriptFunction( "help.HelpPage.setAndShowAllowedConnectionTypesMsg", diff --git a/chrome/browser/ui/webui/help/help_handler.h b/chrome/browser/ui/webui/help/help_handler.h index 4131eb0..206f535 100644 --- a/chrome/browser/ui/webui/help/help_handler.h +++ b/chrome/browser/ui/webui/help/help_handler.h @@ -68,7 +68,7 @@ class HelpHandler : public content::WebUIMessageHandler, // Callback method which forwards status updates to the page. void SetUpdateStatus(VersionUpdater::Status status, int progress, - const string16& fail_message); + const base::string16& fail_message); #if defined(OS_MACOSX) // Callback method which forwards promotion state to the page. diff --git a/chrome/browser/ui/webui/help/help_utils_chromeos.cc b/chrome/browser/ui/webui/help/help_utils_chromeos.cc index 3cd29f1..8b30a39 100644 --- a/chrome/browser/ui/webui/help/help_utils_chromeos.cc +++ b/chrome/browser/ui/webui/help/help_utils_chromeos.cc @@ -61,7 +61,7 @@ string16 GetConnectionTypeAsUTF16(const std::string& type) { if (type == shill::kTypeVPN) return l10n_util::GetStringUTF16(IDS_NETWORK_TYPE_VPN); NOTREACHED(); - return string16(); + return base::string16(); } } // namespace help_utils_chromeos diff --git a/chrome/browser/ui/webui/help/version_updater.h b/chrome/browser/ui/webui/help/version_updater.h index a78444d..190ada7 100644 --- a/chrome/browser/ui/webui/help/version_updater.h +++ b/chrome/browser/ui/webui/help/version_updater.h @@ -41,9 +41,9 @@ class VersionUpdater { #endif // Used to update the client of status changes. int parameter is the progress - // and should only be non-zero for the UPDATING state. string16 parameter is - // a message explaining a failure. - typedef base::Callback<void(Status, int, const string16&)> + // and should only be non-zero for the UPDATING state. + // base::string16 parameter is a message explaining a failure. + typedef base::Callback<void(Status, int, const base::string16&)> StatusCallback; #if defined(OS_MACOSX) diff --git a/chrome/browser/ui/webui/help/version_updater_basic.cc b/chrome/browser/ui/webui/help/version_updater_basic.cc index cb702aa..c0d0ee9 100644 --- a/chrome/browser/ui/webui/help/version_updater_basic.cc +++ b/chrome/browser/ui/webui/help/version_updater_basic.cc @@ -11,9 +11,9 @@ void VersionUpdaterBasic::CheckForUpdate( const StatusCallback& status_callback) { if (UpgradeDetector::GetInstance()->notify_upgrade()) - status_callback.Run(NEARLY_UPDATED, 0, string16()); + status_callback.Run(NEARLY_UPDATED, 0, base::string16()); else - status_callback.Run(DISABLED, 0, string16()); + status_callback.Run(DISABLED, 0, base::string16()); } void VersionUpdaterBasic::RelaunchBrowser() const { diff --git a/chrome/browser/ui/webui/help/version_updater_chromeos.cc b/chrome/browser/ui/webui/help/version_updater_chromeos.cc index b1362dd..74a475e 100644 --- a/chrome/browser/ui/webui/help/version_updater_chromeos.cc +++ b/chrome/browser/ui/webui/help/version_updater_chromeos.cc @@ -102,7 +102,7 @@ void VersionUpdaterCros::CheckForUpdate(const StatusCallback& callback) { l10n_util::GetStringUTF16(IDS_UPGRADE_OFFLINE)); return; } else if (status == NETWORK_STATUS_DISALLOWED) { - string16 message = + base::string16 message = l10n_util::GetStringFUTF16( IDS_UPGRADE_DISALLOWED, help_utils_chromeos::GetConnectionTypeAsUTF16(network->type())); @@ -161,7 +161,7 @@ void VersionUpdaterCros::UpdateStatusChanged( const UpdateEngineClient::Status& status) { Status my_status = UPDATED; int progress = 0; - string16 message; + base::string16 message; // If the updater is currently idle, just show the last operation (unless it // was previously checking for an update -- in that case, the system is @@ -213,5 +213,5 @@ void VersionUpdaterCros::OnUpdateCheck( // If version updating is not implemented, this binary is the most up-to-date // possible with respect to automatic updating. if (result == UpdateEngineClient::UPDATE_RESULT_NOTIMPLEMENTED) - callback_.Run(UPDATED, 0, string16()); + callback_.Run(UPDATED, 0, base::string16()); } diff --git a/chrome/browser/ui/webui/help/version_updater_mac.mm b/chrome/browser/ui/webui/help/version_updater_mac.mm index 331fe57..6b25716 100644 --- a/chrome/browser/ui/webui/help/version_updater_mac.mm +++ b/chrome/browser/ui/webui/help/version_updater_mac.mm @@ -102,7 +102,7 @@ void VersionUpdaterMac::CheckForUpdate( } else { // There is no glue, or the application is on a read-only filesystem. // Updates and promotions are impossible. - status_callback_.Run(DISABLED, 0, string16()); + status_callback_.Run(DISABLED, 0, base::string16()); } } @@ -132,7 +132,7 @@ void VersionUpdaterMac::UpdateStatus(NSDictionary* dictionary) { [[dictionary objectForKey:kAutoupdateStatusStatus] intValue]); bool enable_promote_button = true; - string16 message; + base::string16 message; Status status; switch (keystone_status) { @@ -198,9 +198,10 @@ void VersionUpdaterMac::UpdateStatus(NSDictionary* dictionary) { case kAutoupdateNeedsPromotion: { status = FAILED; - string16 product_name = l10n_util::GetStringUTF16(IDS_PRODUCT_NAME); - message = l10n_util:: GetStringFUTF16(IDS_PROMOTE_INFOBAR_TEXT, - product_name); + base::string16 product_name = + l10n_util::GetStringUTF16(IDS_PRODUCT_NAME); + message = l10n_util::GetStringFUTF16(IDS_PROMOTE_INFOBAR_TEXT, + product_name); } break; diff --git a/chrome/browser/ui/webui/help/version_updater_win.cc b/chrome/browser/ui/webui/help/version_updater_win.cc index 3d1a7ad..9491e10 100644 --- a/chrome/browser/ui/webui/help/version_updater_win.cc +++ b/chrome/browser/ui/webui/help/version_updater_win.cc @@ -47,13 +47,13 @@ class VersionUpdaterWin : public VersionUpdater, // GoogleUpdateStatusListener implementation. virtual void OnReportResults(GoogleUpdateUpgradeResult result, GoogleUpdateErrorCode error_code, - const string16& error_message, - const string16& version) OVERRIDE; + const base::string16& error_message, + const base::string16& version) OVERRIDE; // Update the UI to show the status of the upgrade. void UpdateStatus(GoogleUpdateUpgradeResult result, GoogleUpdateErrorCode error_code, - const string16& error_message); + const base::string16& error_message); // Got the intalled version so the handling of the UPGRADE_ALREADY_UP_TO_DATE // result case can now be completeb on the UI thread. @@ -147,7 +147,8 @@ void VersionUpdaterWin::CheckForUpdate(const StatusCallback& callback) { // This could happen if the page got refreshed after results were returned. if (!google_updater_) CreateGoogleUpdater(); - UpdateStatus(UPGRADE_CHECK_STARTED, GOOGLE_UPDATE_NO_ERROR, string16()); + UpdateStatus(UPGRADE_CHECK_STARTED, GOOGLE_UPDATE_NO_ERROR, + base::string16()); // Specify false to not upgrade yet. google_updater_->CheckForUpdate(false, GetElevationParent()); } @@ -159,7 +160,7 @@ void VersionUpdaterWin::RelaunchBrowser() const { void VersionUpdaterWin::OnReportResults( GoogleUpdateUpgradeResult result, GoogleUpdateErrorCode error_code, - const string16& error_message, const string16& version) { + const base::string16& error_message, const base::string16& version) { // Drop the last reference to the object so that it gets cleaned up here. ClearGoogleUpdater(); UpdateStatus(result, error_code, error_message); @@ -167,13 +168,13 @@ void VersionUpdaterWin::OnReportResults( void VersionUpdaterWin::UpdateStatus(GoogleUpdateUpgradeResult result, GoogleUpdateErrorCode error_code, - const string16& error_message) { + const base::string16& error_message) { // For Chromium builds it would show an error message. // But it looks weird because in fact there is no error, // just the update server is not available for non-official builds. #if defined(GOOGLE_CHROME_BUILD) Status status = UPDATED; - string16 message; + base::string16 message; switch (result) { case UPGRADE_CHECK_STARTED: { @@ -191,7 +192,7 @@ void VersionUpdaterWin::UpdateStatus(GoogleUpdateUpgradeResult result, UserMetricsAction("UpgradeCheck_UpgradeIsAvailable")); DCHECK(!google_updater_); // Should have been nulled out already. CreateGoogleUpdater(); - UpdateStatus(UPGRADE_STARTED, GOOGLE_UPDATE_NO_ERROR, string16()); + UpdateStatus(UPGRADE_STARTED, GOOGLE_UPDATE_NO_ERROR, base::string16()); // Specify true to upgrade now. google_updater_->CheckForUpdate(true, GetElevationParent()); return; @@ -255,10 +256,10 @@ void VersionUpdaterWin::GotInstalledVersion(const Version& version) { if (!version.IsValid() || version.CompareTo(running_version) <= 0) { content::RecordAction( UserMetricsAction("UpgradeCheck_AlreadyUpToDate")); - callback_.Run(UPDATED, 0, string16()); + callback_.Run(UPDATED, 0, base::string16()); } else { content::RecordAction(UserMetricsAction("UpgradeCheck_AlreadyUpgraded")); - callback_.Run(NEARLY_UPDATED, 0, string16()); + callback_.Run(NEARLY_UPDATED, 0, base::string16()); } } diff --git a/chrome/browser/ui/webui/history_ui.cc b/chrome/browser/ui/webui/history_ui.cc index 1d5c83c..50f80f8 100644 --- a/chrome/browser/ui/webui/history_ui.cc +++ b/chrome/browser/ui/webui/history_ui.cc @@ -195,7 +195,7 @@ content::WebUIDataSource* CreateHistoryUIHTMLSource(Profile* profile) { // indicator (e.g. today, yesterday). string16 getRelativeDateLocalized(const base::Time& visit_time) { base::Time midnight = base::Time::Now().LocalMidnight(); - string16 date_str = ui::TimeFormat::RelativeDate(visit_time, &midnight); + base::string16 date_str = ui::TimeFormat::RelativeDate(visit_time, &midnight); if (date_str.empty()) { date_str = base::TimeFormatFriendlyDate(visit_time); } else { @@ -263,9 +263,9 @@ void GetDeviceNameAndType(const ProfileSyncService* sync_service, BrowsingHistoryHandler::HistoryEntry::HistoryEntry( BrowsingHistoryHandler::HistoryEntry::EntryType entry_type, - const GURL& url, const string16& title, base::Time time, + const GURL& url, const base::string16& title, base::Time time, const std::string& client_id, bool is_search_result, - const string16& snippet, bool blocked_visit, + const base::string16& snippet, bool blocked_visit, const std::string& accept_languages) { this->entry_type = entry_type; this->url = url; @@ -291,7 +291,7 @@ void BrowsingHistoryHandler::HistoryEntry::SetUrlAndTitle( result->SetString("url", url.spec()); bool using_url_as_the_title = false; - string16 title_to_set(title); + base::string16 title_to_set(title); if (title.empty()) { using_url_as_the_title = true; title_to_set = UTF8ToUTF16(url.spec()); @@ -338,7 +338,7 @@ scoped_ptr<DictionaryValue> BrowsingHistoryHandler::HistoryEntry::ToValue( result->SetString("snippet", snippet); } else { base::Time midnight = base::Time::Now().LocalMidnight(); - string16 date_str = ui::TimeFormat::RelativeDate(time, &midnight); + base::string16 date_str = ui::TimeFormat::RelativeDate(time, &midnight); if (date_str.empty()) { date_str = base::TimeFormatFriendlyDate(time); } else { @@ -434,7 +434,7 @@ void BrowsingHistoryHandler::WebHistoryTimeout() { } void BrowsingHistoryHandler::QueryHistory( - string16 search_text, const history::QueryOptions& options) { + base::string16 search_text, const history::QueryOptions& options) { Profile* profile = Profile::FromWebUI(web_ui()); // Anything in-flight is invalid. @@ -486,7 +486,7 @@ void BrowsingHistoryHandler::HandleQueryHistory(const ListValue* args) { // returned. // - the maximum number of results to return (may be 0, meaning that there // is no maximum). - string16 search_text = ExtractStringValue(args); + base::string16 search_text = ExtractStringValue(args); int offset; if (!args->GetInteger(1, &offset)) { NOTREACHED() << "Failed to convert argument 1. "; @@ -540,7 +540,7 @@ void BrowsingHistoryHandler::HandleRemoveVisits(const ListValue* args) { DCHECK(urls_to_be_deleted_.empty()); for (ListValue::const_iterator it = args->begin(); it != args->end(); ++it) { DictionaryValue* deletion = NULL; - string16 url; + base::string16 url; ListValue* timestamps = NULL; // Each argument is a dictionary with properties "url" and "timestamps". @@ -641,7 +641,7 @@ void BrowsingHistoryHandler::HandleClearBrowsingData(const ListValue* args) { } void BrowsingHistoryHandler::HandleRemoveBookmark(const ListValue* args) { - string16 url = ExtractStringValue(args); + base::string16 url = ExtractStringValue(args); Profile* profile = Profile::FromWebUI(web_ui()); BookmarkModel* model = BookmarkModelFactory::GetForProfile(profile); bookmark_utils::RemoveAllBookmarks(model, GURL(url)); @@ -741,7 +741,7 @@ void BrowsingHistoryHandler::ReturnResultsToFrontEnd() { } void BrowsingHistoryHandler::QueryComplete( - const string16& search_text, + const base::string16& search_text, const history::QueryOptions& options, HistoryService::Handle request_handle, history::QueryResults* results) { @@ -785,7 +785,7 @@ void BrowsingHistoryHandler::QueryComplete( } void BrowsingHistoryHandler::WebHistoryQueryComplete( - const string16& search_text, + const base::string16& search_text, const history::QueryOptions& options, base::TimeTicks start_time, history::WebHistoryService::Request* request, @@ -814,8 +814,8 @@ void BrowsingHistoryHandler::WebHistoryQueryComplete( const DictionaryValue* result = NULL; const ListValue* results = NULL; const ListValue* ids = NULL; - string16 url; - string16 title; + base::string16 url; + base::string16 title; base::Time visit_time; if (!(events->GetDictionary(i, &event) && @@ -859,7 +859,7 @@ void BrowsingHistoryHandler::WebHistoryQueryComplete( time, client_id, !search_text.empty(), - string16(), + base::string16(), /* blocked_visit */ false, accept_languages)); } @@ -993,7 +993,7 @@ HistoryUI::HistoryUI(content::WebUI* web_ui) : WebUIController(web_ui) { } // static -const GURL HistoryUI::GetHistoryURLWithSearchText(const string16& text) { +const GURL HistoryUI::GetHistoryURLWithSearchText(const base::string16& text) { return GURL(std::string(chrome::kChromeUIHistoryURL) + "#q=" + net::EscapeQueryParamValue(UTF16ToUTF8(text), true)); } diff --git a/chrome/browser/ui/webui/history_ui.h b/chrome/browser/ui/webui/history_ui.h index 6c4177a..fc76fef 100644 --- a/chrome/browser/ui/webui/history_ui.h +++ b/chrome/browser/ui/webui/history_ui.h @@ -39,9 +39,9 @@ class BrowsingHistoryHandler : public content::WebUIMessageHandler, COMBINED_ENTRY }; - HistoryEntry(EntryType type, const GURL& url, const string16& title, + HistoryEntry(EntryType type, const GURL& url, const base::string16& title, base::Time time, const std::string& client_id, - bool is_search_result, const string16& snippet, + bool is_search_result, const base::string16& snippet, bool blocked_visit, const std::string& accept_languages); HistoryEntry(); virtual ~HistoryEntry(); @@ -63,7 +63,7 @@ class BrowsingHistoryHandler : public content::WebUIMessageHandler, EntryType entry_type; GURL url; - string16 title; // Title of the entry. May be empty. + base::string16 title; // Title of the entry. May be empty. // The time of the entry. Usually this will be the time of the most recent // visit to |url| on a particular day as defined in the local timezone. @@ -79,7 +79,7 @@ class BrowsingHistoryHandler : public content::WebUIMessageHandler, bool is_search_result; // The entry's search snippet, if this entry is a search result. - string16 snippet; + base::string16 snippet; // Whether this entry was blocked when it was attempted. bool blocked_visit; @@ -140,13 +140,13 @@ class BrowsingHistoryHandler : public content::WebUIMessageHandler, void WebHistoryTimeout(); // Callback from the history system when a history query has completed. - void QueryComplete(const string16& search_text, + void QueryComplete(const base::string16& search_text, const history::QueryOptions& options, HistoryService::Handle request_handle, history::QueryResults* results); // Callback from the WebHistoryService when a query has completed. - void WebHistoryQueryComplete(const string16& search_text, + void WebHistoryQueryComplete(const base::string16& search_text, const history::QueryOptions& options, base::TimeTicks start_time, history::WebHistoryService::Request* request, @@ -210,7 +210,7 @@ class HistoryUI : public content::WebUIController { explicit HistoryUI(content::WebUI* web_ui); // Return the URL for a given search term. - static const GURL GetHistoryURLWithSearchText(const string16& text); + static const GURL GetHistoryURLWithSearchText(const base::string16& text); static base::RefCountedMemory* GetFaviconResourceBytes( ui::ScaleFactor scale_factor); diff --git a/chrome/browser/ui/webui/inline_login_ui.cc b/chrome/browser/ui/webui/inline_login_ui.cc index 7652990..1b3822c 100644 --- a/chrome/browser/ui/webui/inline_login_ui.cc +++ b/chrome/browser/ui/webui/inline_login_ui.cc @@ -205,7 +205,7 @@ class InlineLoginUIHandler : public content::WebUIMessageHandler { // JS callback: void HandleSwitchToFullTab(const base::ListValue* args) { - string16 url_str; + base::string16 url_str; CHECK(args->GetString(0, &url_str)); content::WebContents* web_contents = web_ui()->GetWebContents(); @@ -233,8 +233,8 @@ class InlineLoginUIHandler : public content::WebUIMessageHandler { oauth2_token_fetcher_->StartExchangeFromCookies(); #else const base::DictionaryValue* dict = NULL; - string16 email; - string16 password; + base::string16 email; + base::string16 password; if (!args->GetDictionary(0, &dict) || !dict || !dict->GetString("email", &email)) { NOTREACHED(); @@ -281,8 +281,8 @@ class InlineLoginUIHandler : public content::WebUIMessageHandler { } void OnGaiaCookiesFetched( - const string16 email, - const string16 password, + const base::string16 email, + const base::string16 password, const net::CookieList& cookie_list) { net::CookieList::const_iterator it; std::string oauth_code; diff --git a/chrome/browser/ui/webui/local_discovery/local_discovery_ui_handler.cc b/chrome/browser/ui/webui/local_discovery/local_discovery_ui_handler.cc index 21421df..cddc71b 100644 --- a/chrome/browser/ui/webui/local_discovery/local_discovery_ui_handler.cc +++ b/chrome/browser/ui/webui/local_discovery/local_discovery_ui_handler.cc @@ -597,7 +597,7 @@ void LocalDiscoveryUIHandler::SetupCloudPrintConnectorSection() { } base::FundamentalValue disabled(email.empty()); - string16 label_str; + base::string16 label_str; if (email.empty()) { label_str = l10n_util::GetStringFUTF16( IDS_LOCAL_DISCOVERY_CLOUD_PRINT_CONNECTOR_DISABLED_LABEL, diff --git a/chrome/browser/ui/webui/memory_internals/memory_internals_handler.cc b/chrome/browser/ui/webui/memory_internals/memory_internals_handler.cc index 1cba471..00e0863 100644 --- a/chrome/browser/ui/webui/memory_internals/memory_internals_handler.cc +++ b/chrome/browser/ui/webui/memory_internals/memory_internals_handler.cc @@ -38,7 +38,7 @@ void MemoryInternalsHandler::OnJSUpdate(const base::ListValue* list) { proxy_->StartFetch(list); } -void MemoryInternalsHandler::OnUpdate(const string16& update) { +void MemoryInternalsHandler::OnUpdate(const base::string16& update) { // Don't try to execute JavaScript in a RenderView that no longer exists. content::RenderViewHost* host = web_ui()->GetWebContents()->GetRenderViewHost(); diff --git a/chrome/browser/ui/webui/memory_internals/memory_internals_handler.h b/chrome/browser/ui/webui/memory_internals/memory_internals_handler.h index 8cc9ce0..78ba377 100644 --- a/chrome/browser/ui/webui/memory_internals/memory_internals_handler.h +++ b/chrome/browser/ui/webui/memory_internals/memory_internals_handler.h @@ -30,7 +30,7 @@ class MemoryInternalsHandler : public content::WebUIMessageHandler { void OnJSUpdate(const base::ListValue* list); // MemoryInternals message handlers. - void OnUpdate(const string16& update); + void OnUpdate(const base::string16& update); private: scoped_refptr<MemoryInternalsProxy> proxy_; diff --git a/chrome/browser/ui/webui/memory_internals/memory_internals_proxy.cc b/chrome/browser/ui/webui/memory_internals/memory_internals_proxy.cc index 2e549f0..4c465ee 100644 --- a/chrome/browser/ui/webui/memory_internals/memory_internals_proxy.cc +++ b/chrome/browser/ui/webui/memory_internals/memory_internals_proxy.cc @@ -353,7 +353,8 @@ void MemoryInternalsProxy::CallJavaScriptFunctionOnUIThread( DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); std::vector<const base::Value*> args_vector(1, &args); - string16 update = content::WebUI::GetJavascriptCall(function, args_vector); + base::string16 update = + content::WebUI::GetJavascriptCall(function, args_vector); // Don't forward updates to a destructed UI. if (handler_) handler_->OnUpdate(update); diff --git a/chrome/browser/ui/webui/nacl_ui.cc b/chrome/browser/ui/webui/nacl_ui.cc index de7e26e..7408325 100644 --- a/chrome/browser/ui/webui/nacl_ui.cc +++ b/chrome/browser/ui/webui/nacl_ui.cc @@ -154,7 +154,9 @@ void NaClDomHandler::RegisterMessages() { // Helper functions for collecting a list of key-value pairs that will // be displayed. -void AddPair(ListValue* list, const string16& key, const string16& value) { +void AddPair(ListValue* list, + const base::string16& key, + const base::string16& value) { DictionaryValue* results = new DictionaryValue(); results->SetString("key", key); results->SetString("value", value); @@ -217,8 +219,8 @@ void NaClDomHandler::AddPluginList(ListValue* list) { std::vector<content::WebPluginInfo> info_array; PluginService::GetInstance()->GetPluginInfoArray( GURL(), "application/x-nacl", false, &info_array, NULL); - string16 nacl_version; - string16 nacl_key = ASCIIToUTF16("NaCl plugin"); + base::string16 nacl_version; + base::string16 nacl_key = ASCIIToUTF16("NaCl plugin"); if (info_array.empty()) { AddPair(list, nacl_key, ASCIIToUTF16("Disabled")); } else { @@ -247,7 +249,7 @@ void NaClDomHandler::AddPluginList(ListValue* list) { void NaClDomHandler::AddPnaclInfo(ListValue* list) { // Display whether PNaCl is enabled. - string16 pnacl_enabled_string = ASCIIToUTF16("Enabled"); + base::string16 pnacl_enabled_string = ASCIIToUTF16("Enabled"); if (!isPluginEnabled(0)) { pnacl_enabled_string = ASCIIToUTF16("Disabled in profile prefs"); } else if (CommandLine::ForCurrentProcess()->HasSwitch( @@ -277,7 +279,7 @@ void NaClDomHandler::AddPnaclInfo(ListValue* list) { } void NaClDomHandler::AddNaClInfo(ListValue* list) { - string16 nacl_enabled_string = ASCIIToUTF16("Disabled"); + base::string16 nacl_enabled_string = ASCIIToUTF16("Disabled"); if (isPluginEnabled(0) && CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableNaCl)) { nacl_enabled_string = ASCIIToUTF16("Enabled by flag '--enable-nacl'"); diff --git a/chrome/browser/ui/webui/net_internals/net_internals_ui.cc b/chrome/browser/ui/webui/net_internals/net_internals_ui.cc index 2f40b4d..fdceb4e 100644 --- a/chrome/browser/ui/webui/net_internals/net_internals_ui.cc +++ b/chrome/browser/ui/webui/net_internals/net_internals_ui.cc @@ -1187,7 +1187,7 @@ void NetInternalsMessageHandler::IOThreadImpl::OnEnableIPv6( void NetInternalsMessageHandler::IOThreadImpl::OnStartConnectionTests( const ListValue* list) { // |value| should be: [<URL to test>]. - string16 url_str; + base::string16 url_str; CHECK(list->GetString(0, &url_str)); // Try to fix-up the user provided URL into something valid. diff --git a/chrome/browser/ui/webui/ntp/android/context_menu_handler.cc b/chrome/browser/ui/webui/ntp/android/context_menu_handler.cc index 7c916f4..328be22 100644 --- a/chrome/browser/ui/webui/ntp/android/context_menu_handler.cc +++ b/chrome/browser/ui/webui/ntp/android/context_menu_handler.cc @@ -126,7 +126,7 @@ void ContextMenuHandler::HandleOpenInIncognitoTab(const ListValue* args) { void ContextMenuHandler::OpenUrl(const ListValue* args, WindowOpenDisposition disposition) { - string16 url = ExtractStringValue(args); + base::string16 url = ExtractStringValue(args); if (!url.empty()) { web_ui()->GetWebContents()->OpenURL(content::OpenURLParams( GURL(url), content::Referrer(), disposition, diff --git a/chrome/browser/ui/webui/ntp/android/ntp_resource_cache_android.cc b/chrome/browser/ui/webui/ntp/android/ntp_resource_cache_android.cc index 29b8cd8..0b09b2d 100644 --- a/chrome/browser/ui/webui/ntp/android/ntp_resource_cache_android.cc +++ b/chrome/browser/ui/webui/ntp/android/ntp_resource_cache_android.cc @@ -149,7 +149,7 @@ void NTPResourceCache::CreateNewTabHTML() { bookmark_shortcuts_allowed ? "true" : "false"); const char* new_tab_link = kLearnMoreIncognitoUrl; - string16 learnMoreLink = ASCIIToUTF16( + base::string16 learnMoreLink = ASCIIToUTF16( google_util::AppendGoogleLocaleParam(GURL(new_tab_link)).spec()); localized_strings.SetString("content", l10n_util::GetStringFUTF16( diff --git a/chrome/browser/ui/webui/ntp/android/promo_handler.cc b/chrome/browser/ui/webui/ntp/android/promo_handler.cc index b3a1663..fc43d70 100644 --- a/chrome/browser/ui/webui/ntp/android/promo_handler.cc +++ b/chrome/browser/ui/webui/ntp/android/promo_handler.cc @@ -152,7 +152,7 @@ void PromoHandler::HandlePromoSendEmail(const base::ListValue* args) { if (!profile) return; - string16 data_subject, data_body, data_inv; + base::string16 data_subject, data_body, data_inv; if (!args || args->GetSize() < 3) { DVLOG(1) << "promoSendEmail: expected three args, got " << (args ? args->GetSize() : 0); diff --git a/chrome/browser/ui/webui/ntp/app_launcher_handler.cc b/chrome/browser/ui/webui/ntp/app_launcher_handler.cc index 0d6383a..e35efca 100644 --- a/chrome/browser/ui/webui/ntp/app_launcher_handler.cc +++ b/chrome/browser/ui/webui/ntp/app_launcher_handler.cc @@ -114,14 +114,14 @@ void AppLauncherHandler::CreateAppInfo( // The Extension class 'helpfully' wraps bidi control characters that // impede our ability to determine directionality. - string16 short_name = UTF8ToUTF16(extension->short_name()); + base::string16 short_name = UTF8ToUTF16(extension->short_name()); base::i18n::UnadjustStringForLocaleDirection(&short_name); NewTabUI::SetUrlTitleAndDirection( value, short_name, extensions::AppLaunchInfo::GetFullLaunchURL(extension)); - string16 name = UTF8ToUTF16(extension->name()); + base::string16 name = UTF8ToUTF16(extension->name()); base::i18n::UnadjustStringForLocaleDirection(&name); NewTabUI::SetFullNameAndDirection(name, value); @@ -657,7 +657,7 @@ void AppLauncherHandler::HandleSetPageIndex(const ListValue* args) { } void AppLauncherHandler::HandleSaveAppPageName(const ListValue* args) { - string16 name; + base::string16 name; CHECK(args->GetString(0, &name)); double page_index; @@ -675,7 +675,7 @@ void AppLauncherHandler::HandleGenerateAppForLink(const ListValue* args) { CHECK(args->GetString(0, &url)); GURL launch_url(url); - string16 title; + base::string16 title; CHECK(args->GetString(1, &title)); double page_index; diff --git a/chrome/browser/ui/webui/ntp/app_launcher_handler.h b/chrome/browser/ui/webui/ntp/app_launcher_handler.h index 411779a..a3547bb 100644 --- a/chrome/browser/ui/webui/ntp/app_launcher_handler.h +++ b/chrome/browser/ui/webui/ntp/app_launcher_handler.h @@ -112,7 +112,7 @@ class AppLauncherHandler : public content::WebUIMessageHandler, ~AppInstallInfo(); bool is_bookmark_app; - string16 title; + base::string16 title; GURL app_url; syncer::StringOrdinal page_ordinal; }; diff --git a/chrome/browser/ui/webui/ntp/foreign_session_handler.h b/chrome/browser/ui/webui/ntp/foreign_session_handler.h index 443f124..477061a 100644 --- a/chrome/browser/ui/webui/ntp/foreign_session_handler.h +++ b/chrome/browser/ui/webui/ntp/foreign_session_handler.h @@ -65,7 +65,7 @@ class ForeignSessionHandler : public content::WebUIMessageHandler, bool IsTabSyncEnabled(); // Returns a string used to show the user when a session was last modified. - string16 FormatSessionTime(const base::Time& time); + base::string16 FormatSessionTime(const base::Time& time); // Determines which session is to be opened, and then calls // OpenForeignSession, to begin the process of opening a new browser window. diff --git a/chrome/browser/ui/webui/ntp/new_tab_page_sync_handler.cc b/chrome/browser/ui/webui/ntp/new_tab_page_sync_handler.cc index 74ab381..53dad5c 100644 --- a/chrome/browser/ui/webui/ntp/new_tab_page_sync_handler.cc +++ b/chrome/browser/ui/webui/ntp/new_tab_page_sync_handler.cc @@ -111,8 +111,8 @@ void NewTabPageSyncHandler::BuildAndSendSyncStatus() { // "Sync error", when we can't authenticate or establish a connection with // the sync server (appropriate information appended to // message). - string16 status_msg; - string16 link_text; + base::string16 status_msg; + base::string16 link_text; sync_ui_util::MessageType type = sync_ui_util::GetStatusLabelsForNewTabPage(sync_service_, @@ -134,7 +134,7 @@ void NewTabPageSyncHandler::HandleSyncLinkClicked(const ListValue* args) { chrome::ShowBrowserSignin(browser, signin::SOURCE_NTP_LINK); if (sync_service_->HasSyncSetupCompleted()) { - string16 user = UTF8ToUTF16(SigninManagerFactory::GetForProfile( + base::string16 user = UTF8ToUTF16(SigninManagerFactory::GetForProfile( Profile::FromWebUI(web_ui()))->GetAuthenticatedUsername()); DictionaryValue value; value.SetString("syncEnabledMessage", diff --git a/chrome/browser/ui/webui/ntp/new_tab_ui.cc b/chrome/browser/ui/webui/ntp/new_tab_ui.cc index 8d04ea5..36c9cd2 100644 --- a/chrome/browser/ui/webui/ntp/new_tab_ui.cc +++ b/chrome/browser/ui/webui/ntp/new_tab_ui.cc @@ -76,7 +76,7 @@ const char kLTRHtmlTextDirection[] = "ltr"; static base::LazyInstance<std::set<const WebUIController*> > g_live_new_tabs; -const char* GetHtmlTextDirection(const string16& text) { +const char* GetHtmlTextDirection(const base::string16& text) { if (base::i18n::IsRTL() && base::i18n::StringContainsStrongRTLChars(text)) return kRTLHtmlTextDirection; else @@ -294,12 +294,12 @@ bool NewTabUI::IsDiscoveryInNTPEnabled() { // static void NewTabUI::SetUrlTitleAndDirection(DictionaryValue* dictionary, - const string16& title, + const base::string16& title, const GURL& gurl) { dictionary->SetString("url", gurl.spec()); bool using_url_as_the_title = false; - string16 title_to_set(title); + base::string16 title_to_set(title); if (title_to_set.empty()) { using_url_as_the_title = true; title_to_set = UTF8ToUTF16(gurl.spec()); @@ -327,7 +327,7 @@ void NewTabUI::SetUrlTitleAndDirection(DictionaryValue* dictionary, } // static -void NewTabUI::SetFullNameAndDirection(const string16& full_name, +void NewTabUI::SetFullNameAndDirection(const base::string16& full_name, base::DictionaryValue* dictionary) { dictionary->SetString("full_name", full_name); dictionary->SetString("full_name_direction", GetHtmlTextDirection(full_name)); diff --git a/chrome/browser/ui/webui/ntp/new_tab_ui.h b/chrome/browser/ui/webui/ntp/new_tab_ui.h index 490085a2..b28775a 100644 --- a/chrome/browser/ui/webui/ntp/new_tab_ui.h +++ b/chrome/browser/ui/webui/ntp/new_tab_ui.h @@ -56,11 +56,11 @@ class NewTabUI : public content::WebUIController, // Adds "url", "title", and "direction" keys on incoming dictionary, setting // title as the url as a fallback on empty title. static void SetUrlTitleAndDirection(base::DictionaryValue* dictionary, - const string16& title, + const base::string16& title, const GURL& gurl); // Adds "full_name" and "full_name_direction" keys on incoming dictionary. - static void SetFullNameAndDirection(const string16& full_name, + static void SetFullNameAndDirection(const base::string16& full_name, base::DictionaryValue* dictionary); // Returns a pointer to a NewTabUI if the WebUIController object is a new tab diff --git a/chrome/browser/ui/webui/ntp/ntp_login_handler.cc b/chrome/browser/ui/webui/ntp/ntp_login_handler.cc index 35a31b0..0185258 100644 --- a/chrome/browser/ui/webui/ntp/ntp_login_handler.cc +++ b/chrome/browser/ui/webui/ntp/ntp_login_handler.cc @@ -69,7 +69,7 @@ SkBitmap GetGAIAPictureForNTP(const gfx::Image& image) { } // Puts the |content| into a span with the given CSS class. -string16 CreateSpanWithClass(const string16& content, +string16 CreateSpanWithClass(const base::string16& content, const std::string& css_class) { return ASCIIToUTF16("<span class='" + css_class + "'>") + net::EscapeForHTML(content) + ASCIIToUTF16("</span>"); @@ -201,7 +201,7 @@ void NTPLoginHandler::UpdateLogin() { std::string username = profile->GetPrefs()->GetString( prefs::kGoogleServicesUsername); - string16 header, sub_header; + base::string16 header, sub_header; std::string icon_url; if (!username.empty()) { ProfileInfoCache& cache = @@ -212,7 +212,7 @@ void NTPLoginHandler::UpdateLogin() { // case. In the multi-profile case the profile picture is visible in the // title bar and the full name can be ambiguous. if (cache.GetNumberOfProfiles() == 1) { - string16 name = cache.GetGAIANameOfProfileAtIndex(profile_index); + base::string16 name = cache.GetGAIANameOfProfileAtIndex(profile_index); if (!name.empty()) header = CreateSpanWithClass(name, "profile-name"); const gfx::Image* image = @@ -233,7 +233,7 @@ void NTPLoginHandler::UpdateLogin() { SigninManager* signin = SigninManagerFactory::GetForProfile( profile->GetOriginalProfile()); if (!profile->IsManaged() && signin->IsSigninAllowed()) { - string16 signed_in_link = l10n_util::GetStringUTF16( + base::string16 signed_in_link = l10n_util::GetStringUTF16( IDS_SYNC_PROMO_NOT_SIGNED_IN_STATUS_LINK); signed_in_link = CreateSpanWithClass(signed_in_link, "link-span"); header = l10n_util::GetStringFUTF16( @@ -273,7 +273,7 @@ void NTPLoginHandler::GetLocalizedValues(Profile* profile, PrefService* prefs = profile->GetPrefs(); bool hide_sync = !prefs->GetBoolean(prefs::kSignInPromoShowNTPBubble); - string16 message = hide_sync ? string16() : + base::string16 message = hide_sync ? base::string16() : l10n_util::GetStringFUTF16(IDS_SYNC_PROMO_NTP_BUBBLE_MESSAGE, l10n_util::GetStringUTF16(IDS_SHORT_PRODUCT_NAME)); @@ -281,9 +281,9 @@ void NTPLoginHandler::GetLocalizedValues(Profile* profile, values->SetString("login_status_url", hide_sync ? std::string() : chrome::kSyncLearnMoreURL); values->SetString("login_status_advanced", - hide_sync ? string16() : + hide_sync ? base::string16() : l10n_util::GetStringUTF16(IDS_SYNC_PROMO_NTP_BUBBLE_ADVANCED)); values->SetString("login_status_dismiss", - hide_sync ? string16() : + hide_sync ? base::string16() : l10n_util::GetStringUTF16(IDS_SYNC_PROMO_NTP_BUBBLE_OK)); } diff --git a/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc b/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc index a62fe18..73a05ed 100644 --- a/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc +++ b/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc @@ -309,7 +309,7 @@ void NTPResourceCache::CreateNewTabIncognitoHTML() { if (!enterprise_domain.empty()) { // Device is enterprise enrolled. localized_strings.SetString("enterpriseInfoVisible", "true"); - string16 enterprise_info = l10n_util::GetStringFUTF16( + base::string16 enterprise_info = l10n_util::GetStringFUTF16( IDS_DEVICE_OWNED_BY_NOTICE, UTF8ToUTF16(enterprise_domain)); localized_strings.SetString("enterpriseInfoMessage", enterprise_info); diff --git a/chrome/browser/ui/webui/ntp/ntp_resource_cache.h b/chrome/browser/ui/webui/ntp/ntp_resource_cache.h index a5203e1..cc76dd2 100644 --- a/chrome/browser/ui/webui/ntp/ntp_resource_cache.h +++ b/chrome/browser/ui/webui/ntp/ntp_resource_cache.h @@ -79,7 +79,7 @@ class NTPResourceCache : public content::NotificationObserver, #if !defined(OS_ANDROID) // Returns a message describing any newly-added sync types, or an empty // string if all types have already been acknowledged. - string16 GetSyncTypeMessage(); + base::string16 GetSyncTypeMessage(); void CreateNewTabIncognitoHTML(); void CreateNewTabIncognitoCSS(); diff --git a/chrome/browser/ui/webui/omnibox/omnibox_ui_handler.cc b/chrome/browser/ui/webui/omnibox/omnibox_ui_handler.cc index ac24b5b..6e35ec3 100644 --- a/chrome/browser/ui/webui/omnibox/omnibox_ui_handler.cc +++ b/chrome/browser/ui/webui/omnibox/omnibox_ui_handler.cc @@ -80,7 +80,7 @@ void OmniboxUIHandler::OnResultChanged(bool default_match_changed) { result_to_output.SetBoolean("done", controller_->done()); result_to_output.SetInteger("time_since_omnibox_started_ms", (base::Time::Now() - time_omnibox_started_).InMilliseconds()); - const string16& host = controller_->input().text().substr( + const base::string16& host = controller_->input().text().substr( controller_->input().parts().host.begin, controller_->input().parts().host.len); result_to_output.SetString("host", host); @@ -158,7 +158,7 @@ void OmniboxUIHandler::AddResultToDictionary(const std::string& prefix, output->SetInteger(prefix + ".num_items", i); } -bool OmniboxUIHandler::LookupIsTypedHost(const string16& host, +bool OmniboxUIHandler::LookupIsTypedHost(const base::string16& host, bool* is_typed_host) const { HistoryService* const history_service = HistoryServiceFactory::GetForProfile(profile_, @@ -174,7 +174,7 @@ bool OmniboxUIHandler::LookupIsTypedHost(const string16& host, void OmniboxUIHandler::StartOmniboxQuery(const base::ListValue* input) { DCHECK_EQ(4u, input->GetSize()); - string16 input_string; + base::string16 input_string; bool return_val = input->GetString(0, &input_string); DCHECK(return_val); int cursor_position; @@ -196,7 +196,7 @@ void OmniboxUIHandler::StartOmniboxQuery(const base::ListValue* input) { controller_->Start(AutocompleteInput( input_string, cursor_position, - string16(), // user's desired tld (top-level domain) + base::string16(), // user's desired tld (top-level domain) GURL(), AutocompleteInput::INVALID_SPEC, prevent_inline_autocomplete, diff --git a/chrome/browser/ui/webui/omnibox/omnibox_ui_handler.h b/chrome/browser/ui/webui/omnibox/omnibox_ui_handler.h index 8c18792..f19cbb4 100644 --- a/chrome/browser/ui/webui/omnibox/omnibox_ui_handler.h +++ b/chrome/browser/ui/webui/omnibox/omnibox_ui_handler.h @@ -68,7 +68,7 @@ class OmniboxUIHandler : public AutocompleteControllerDelegate, // Looks up whether the hostname is a typed host (i.e., has received // typed visits). Return true if the lookup succeeded; if so, the // value of |is_typed_host| is set appropriately. - bool LookupIsTypedHost(const string16& host, bool* is_typed_host) const; + bool LookupIsTypedHost(const base::string16& host, bool* is_typed_host) const; // Re-initializes the AutocompleteController in preparation for the // next query. diff --git a/chrome/browser/ui/webui/options/autofill_options_handler.cc b/chrome/browser/ui/webui/options/autofill_options_handler.cc index 3e52253..defae47 100644 --- a/chrome/browser/ui/webui/options/autofill_options_handler.cc +++ b/chrome/browser/ui/webui/options/autofill_options_handler.cc @@ -98,7 +98,7 @@ void SetValueList(const ListValue* list, AutofillProfile* profile) { std::vector<string16> values(list->GetSize()); for (size_t i = 0; i < list->GetSize(); ++i) { - string16 value; + base::string16 value; if (list->GetString(i, &value)) values[i] = value; } @@ -146,17 +146,17 @@ void SetNameList(const ListValue* names, AutofillProfile* profile) { bool success = names->GetList(i, &name); DCHECK(success); - string16 first_name; + base::string16 first_name; success = name->GetString(0, &first_name); DCHECK(success); first_names[i] = first_name; - string16 middle_name; + base::string16 middle_name; success = name->GetString(1, &middle_name); DCHECK(success); middle_names[i] = middle_name; - string16 last_name; + base::string16 last_name; success = name->GetString(2, &last_name); DCHECK(success); last_names[i] = last_name; @@ -200,7 +200,7 @@ void ExtractPhoneNumberInformation(const ListValue* args, void RemoveDuplicatePhoneNumberAtIndex(size_t index, const std::string& country_code, ListValue* list) { - string16 new_value; + base::string16 new_value; if (!list->GetString(index, &new_value)) { NOTREACHED() << "List should have a value at index " << index; return; @@ -212,7 +212,7 @@ void RemoveDuplicatePhoneNumberAtIndex(size_t index, if (i == index) continue; - string16 existing_value; + base::string16 existing_value; if (!list->GetString(i, &existing_value)) { NOTREACHED() << "List should have a value at index " << i; continue; @@ -520,7 +520,7 @@ void AutofillOptionsHandler::SetAddress(const ListValue* args) { AutofillProfile profile(guid, kSettingsOrigin); std::string country_code; - string16 value; + base::string16 value; const ListValue* list_value; if (args->GetList(1, &list_value)) SetNameList(list_value, &profile); @@ -573,7 +573,7 @@ void AutofillOptionsHandler::SetCreditCard(const ListValue* args) { CreditCard credit_card(guid, kSettingsOrigin); - string16 value; + base::string16 value; if (args->GetString(1, &value)) credit_card.SetRawInfo(autofill::CREDIT_CARD_NAME, value); diff --git a/chrome/browser/ui/webui/options/browser_options_handler.cc b/chrome/browser/ui/webui/options/browser_options_handler.cc index b21e156..81d2fb48 100644 --- a/chrome/browser/ui/webui/options/browser_options_handler.cc +++ b/chrome/browser/ui/webui/options/browser_options_handler.cc @@ -470,7 +470,7 @@ void BrowserOptionsHandler::GetLocalizedValues(DictionaryValue* values) { #endif values->SetString("syncLearnMoreURL", chrome::kSyncLearnMoreURL); - string16 omnibox_url = ASCIIToUTF16(chrome::kOmniboxLearnMoreURL); + base::string16 omnibox_url = ASCIIToUTF16(chrome::kOmniboxLearnMoreURL); values->SetString( "defaultSearchGroupLabel", l10n_util::GetStringFUTF16(IDS_SEARCH_PREF_EXPLANATION, omnibox_url)); @@ -1242,8 +1242,8 @@ scoped_ptr<DictionaryValue> BrowserOptionsHandler::GetSyncStateDictionary() { sync_status->SetBoolean("setupInProgress", service && !service->IsManaged() && service->FirstSetupInProgress()); - string16 status_label; - string16 link_label; + base::string16 status_label; + base::string16 link_label; bool status_has_error = sync_ui_util::GetStatusLabels( service, *signin, sync_ui_util::WITH_HTML, &status_label, &link_label) == sync_ui_util::SYNC_ERROR; @@ -1457,7 +1457,7 @@ void BrowserOptionsHandler::SetupCloudPrintConnectorSection() { } base::FundamentalValue disabled(email.empty()); - string16 label_str; + base::string16 label_str; if (email.empty()) { label_str = l10n_util::GetStringFUTF16( IDS_OPTIONS_CLOUD_PRINT_CONNECTOR_DISABLED_LABEL, diff --git a/chrome/browser/ui/webui/options/certificate_manager_handler.cc b/chrome/browser/ui/webui/options/certificate_manager_handler.cc index df9b3f4..ce94778 100644 --- a/chrome/browser/ui/webui/options/certificate_manager_handler.cc +++ b/chrome/browser/ui/webui/options/certificate_manager_handler.cc @@ -85,8 +85,8 @@ struct DictionaryIdComparator { DCHECK(b->GetType() == Value::TYPE_DICTIONARY); const DictionaryValue* a_dict = reinterpret_cast<const DictionaryValue*>(a); const DictionaryValue* b_dict = reinterpret_cast<const DictionaryValue*>(b); - string16 a_str; - string16 b_str; + base::string16 a_str; + base::string16 b_str; a_dict->GetString(kNameId, &a_str); b_dict->GetString(kNameId, &b_str); if (collator_ == NULL) @@ -608,7 +608,7 @@ void CertificateManagerHandler::ExportPersonal(const ListValue* args) { select_file_dialog_ = ui::SelectFileDialog::Create( this, new ChromeSelectFilePolicy(web_ui()->GetWebContents())); select_file_dialog_->SelectFile( - ui::SelectFileDialog::SELECT_SAVEAS_FILE, string16(), + ui::SelectFileDialog::SELECT_SAVEAS_FILE, base::string16(), base::FilePath(), &file_type_info, 1, FILE_PATH_LITERAL("p12"), GetParentWindow(), reinterpret_cast<void*>(EXPORT_PERSONAL_FILE_SELECTED)); @@ -699,7 +699,7 @@ void CertificateManagerHandler::StartImportPersonal(const ListValue* args) { select_file_dialog_ = ui::SelectFileDialog::Create( this, new ChromeSelectFilePolicy(web_ui()->GetWebContents())); select_file_dialog_->SelectFile( - ui::SelectFileDialog::SELECT_OPEN_FILE, string16(), + ui::SelectFileDialog::SELECT_OPEN_FILE, base::string16(), base::FilePath(), &file_type_info, 1, FILE_PATH_LITERAL("p12"), GetParentWindow(), reinterpret_cast<void*>(IMPORT_PERSONAL_FILE_SELECTED)); diff --git a/chrome/browser/ui/webui/options/certificate_manager_handler.h b/chrome/browser/ui/webui/options/certificate_manager_handler.h index 47e42011..0923309 100644 --- a/chrome/browser/ui/webui/options/certificate_manager_handler.h +++ b/chrome/browser/ui/webui/options/certificate_manager_handler.h @@ -173,7 +173,7 @@ class CertificateManagerHandler // password, etc the user chose while we wait for them to enter a password, // wait for file to be read, etc. base::FilePath file_path_; - string16 password_; + base::string16 password_; bool use_hardware_backed_; std::string file_data_; net::CertificateList selected_cert_list_; diff --git a/chrome/browser/ui/webui/options/chromeos/cros_language_options_handler.cc b/chrome/browser/ui/webui/options/chromeos/cros_language_options_handler.cc index 23a6a13..0f550a5 100644 --- a/chrome/browser/ui/webui/options/chromeos/cros_language_options_handler.cc +++ b/chrome/browser/ui/webui/options/chromeos/cros_language_options_handler.cc @@ -199,7 +199,7 @@ ListValue* CrosLanguageOptionsHandler::GetLanguageListInternal( // In theory, we should be able to create a map that is sorted by // display names using ICU comparator, but doing it is hard, thus we'll // use an auxiliary vector to achieve the same result. - typedef std::pair<std::string, string16> LanguagePair; + typedef std::pair<std::string, base::string16> LanguagePair; typedef std::map<string16, LanguagePair> LanguageMap; LanguageMap language_map; // The auxiliary vector mentioned above. @@ -216,9 +216,9 @@ ListValue* CrosLanguageOptionsHandler::GetLanguageListInternal( continue; } - const string16 display_name = + const base::string16 display_name = l10n_util::GetDisplayNameForLocale(*iter, app_locale, true); - const string16 native_display_name = + const base::string16 native_display_name = l10n_util::GetDisplayNameForLocale(*iter, *iter, true); display_names.push_back(display_name); @@ -238,10 +238,10 @@ ListValue* CrosLanguageOptionsHandler::GetLanguageListInternal( if (IsBlacklisted(base_language_codes[i])) continue; - string16 display_name = + base::string16 display_name = l10n_util::GetDisplayNameForLocale( base_language_codes[i], app_locale, false); - string16 native_display_name = + base::string16 native_display_name = l10n_util::GetDisplayNameForLocale( base_language_codes[i], base_language_codes[i], false); display_names.push_back(display_name); @@ -256,7 +256,7 @@ ListValue* CrosLanguageOptionsHandler::GetLanguageListInternal( ListValue* language_list = new ListValue(); for (size_t i = 0; i < display_names.size(); ++i) { // Sets the directionality of the display language name. - string16 display_name(display_names[i]); + base::string16 display_name(display_names[i]); bool markup_removal = base::i18n::UnadjustStringForLocaleDirection(&display_name); DCHECK(markup_removal); diff --git a/chrome/browser/ui/webui/options/chromeos/cros_language_options_handler.h b/chrome/browser/ui/webui/options/chromeos/cros_language_options_handler.h index e811f14..32bf026 100644 --- a/chrome/browser/ui/webui/options/chromeos/cros_language_options_handler.h +++ b/chrome/browser/ui/webui/options/chromeos/cros_language_options_handler.h @@ -65,7 +65,7 @@ class CrosLanguageOptionsHandler private: // LanguageOptionsHandlerCommon implementation. - virtual string16 GetProductName() OVERRIDE; + virtual base::string16 GetProductName() OVERRIDE; virtual void SetApplicationLocale(const std::string& language_code) OVERRIDE; // Called when the sign-out button is clicked. diff --git a/chrome/browser/ui/webui/options/clear_browser_data_handler.cc b/chrome/browser/ui/webui/options/clear_browser_data_handler.cc index 0b578e0..32ff67e 100644 --- a/chrome/browser/ui/webui/options/clear_browser_data_handler.cc +++ b/chrome/browser/ui/webui/options/clear_browser_data_handler.cc @@ -109,7 +109,7 @@ void ClearBrowserDataHandler::GetLocalizedValues( ListValue* time_list = new ListValue; for (int i = 0; i < 5; i++) { - string16 label_string; + base::string16 label_string; switch (i) { case 0: label_string = l10n_util::GetStringUTF16(IDS_CLEAR_DATA_HOUR); diff --git a/chrome/browser/ui/webui/options/cookies_view_handler.cc b/chrome/browser/ui/webui/options/cookies_view_handler.cc index 006a5a5..5faf7fe 100644 --- a/chrome/browser/ui/webui/options/cookies_view_handler.cc +++ b/chrome/browser/ui/webui/options/cookies_view_handler.cc @@ -208,7 +208,7 @@ void CookiesViewHandler::EnsureCookiesTreeModelCreated() { } void CookiesViewHandler::UpdateSearchResults(const ListValue* args) { - string16 query; + base::string16 query; if (!args->GetString(0, &query)) return; diff --git a/chrome/browser/ui/webui/options/core_options_handler.cc b/chrome/browser/ui/webui/options/core_options_handler.cc index ebc8bcd..cd98a73 100644 --- a/chrome/browser/ui/webui/options/core_options_handler.cc +++ b/chrome/browser/ui/webui/options/core_options_handler.cc @@ -415,7 +415,7 @@ void CoreOptionsHandler::HandleFetchPrefs(const ListValue* args) { if (!args->Get(0, &callback) || !callback->IsType(base::Value::TYPE_STRING)) return; - string16 callback_function; + base::string16 callback_function; if (!callback->GetAsString(&callback_function)) return; diff --git a/chrome/browser/ui/webui/options/create_profile_handler.cc b/chrome/browser/ui/webui/options/create_profile_handler.cc index f88bacc..c6b9c60 100644 --- a/chrome/browser/ui/webui/options/create_profile_handler.cc +++ b/chrome/browser/ui/webui/options/create_profile_handler.cc @@ -75,8 +75,8 @@ void CreateProfileHandler::CreateProfile(const ListValue* args) { DCHECK(profile_path_being_created_.empty()); profile_creation_start_time_ = base::TimeTicks::Now(); - string16 name; - string16 icon; + base::string16 name; + base::string16 icon; std::string managed_user_id; bool create_shortcut = false; bool managed_user = false; @@ -222,7 +222,7 @@ void CreateProfileHandler::OnManagedUserRegistered( return; } - string16 error_msg; + base::string16 error_msg; if (state == GoogleServiceAuthError::INVALID_GAIA_CREDENTIALS || state == GoogleServiceAuthError::USER_NOT_SIGNED_UP || state == GoogleServiceAuthError::ACCOUNT_DELETED || @@ -275,8 +275,9 @@ void CreateProfileHandler::CreateShortcutAndShowSuccess( profile_creation_type_ = NO_CREATION_IN_PROGRESS; } -void CreateProfileHandler::ShowProfileCreationError(Profile* profile, - const string16& error) { +void CreateProfileHandler::ShowProfileCreationError( + Profile* profile, + const base::string16& error) { DCHECK_NE(NO_CREATION_IN_PROGRESS, profile_creation_type_); profile_creation_type_ = NO_CREATION_IN_PROGRESS; profile_path_being_created_.clear(); @@ -287,7 +288,7 @@ void CreateProfileHandler::ShowProfileCreationError(Profile* profile, } void CreateProfileHandler::ShowProfileCreationWarning( - const string16& warning) { + const base::string16& warning) { DCHECK_EQ(SUPERVISED_PROFILE_CREATION, profile_creation_type_); web_ui()->CallJavascriptFunction("BrowserOptions.showCreateProfileWarning", base::StringValue(warning)); @@ -361,7 +362,7 @@ void CreateProfileHandler::RecordSupervisedProfileCreationMetrics( } } -string16 CreateProfileHandler::GetProfileCreationErrorMessage( +base::string16 CreateProfileHandler::GetProfileCreationErrorMessage( ProfileCreationErrorType error) const { int message_id = -1; switch (error) { diff --git a/chrome/browser/ui/webui/options/create_profile_handler.h b/chrome/browser/ui/webui/options/create_profile_handler.h index d443df9..2c25b71 100644 --- a/chrome/browser/ui/webui/options/create_profile_handler.h +++ b/chrome/browser/ui/webui/options/create_profile_handler.h @@ -109,10 +109,10 @@ class CreateProfileHandler: public OptionsPageUIHandler { Profile* profile); // Updates the UI to show an error when creating a profile. - void ShowProfileCreationError(Profile* profile, const string16& error); + void ShowProfileCreationError(Profile* profile, const base::string16& error); // Updates the UI to show a non-fatal warning when creating a profile. - void ShowProfileCreationWarning(const string16& warning); + void ShowProfileCreationWarning(const base::string16& warning); // Cancels creation of a managed-user profile currently in progress, as // indicated by profile_path_being_created_, removing the object and files @@ -134,7 +134,8 @@ class CreateProfileHandler: public OptionsPageUIHandler { void RecordSupervisedProfileCreationMetrics( GoogleServiceAuthError::State error_state); - string16 GetProfileCreationErrorMessage(ProfileCreationErrorType error) const; + base::string16 GetProfileCreationErrorMessage( + ProfileCreationErrorType error) const; std::string GetJavascriptMethodName(ProfileCreationStatus status) const; bool IsValidExistingManagedUserId( diff --git a/chrome/browser/ui/webui/options/font_settings_handler.cc b/chrome/browser/ui/webui/options/font_settings_handler.cc index c0de39a..4e87c11 100644 --- a/chrome/browser/ui/webui/options/font_settings_handler.cc +++ b/chrome/browser/ui/webui/options/font_settings_handler.cc @@ -196,7 +196,7 @@ void FontSettingsHandler::FontsListHasLoaded( ListValue* font; bool has_font = list->GetList(i, &font); DCHECK(has_font); - string16 value; + base::string16 value; bool has_value = font->GetString(1, &value); DCHECK(has_value); bool has_rtl_chars = base::i18n::StringContainsStrongRTLChars(value); @@ -220,7 +220,7 @@ void FontSettingsHandler::FontsListHasLoaded( int cmd_id = it->encoding_id; std::string encoding = CharacterEncoding::GetCanonicalEncodingNameByCommandId(cmd_id); - string16 name = it->encoding_display_name; + base::string16 name = it->encoding_display_name; bool has_rtl_chars = base::i18n::StringContainsStrongRTLChars(name); option->Append(new base::StringValue(encoding)); option->Append(new base::StringValue(name)); diff --git a/chrome/browser/ui/webui/options/handler_options_handler.cc b/chrome/browser/ui/webui/options/handler_options_handler.cc index b5a0398..c62edb0 100644 --- a/chrome/browser/ui/webui/options/handler_options_handler.cc +++ b/chrome/browser/ui/webui/options/handler_options_handler.cc @@ -185,9 +185,9 @@ void HandlerOptionsHandler::SetDefault(const ListValue* args) { ProtocolHandler HandlerOptionsHandler::ParseHandlerFromArgs( const ListValue* args) const { - string16 protocol; - string16 url; - string16 title; + base::string16 protocol; + base::string16 url; + base::string16 title; bool ok = args->GetString(0, &protocol) && args->GetString(1, &url) && args->GetString(2, &title); if (!ok) diff --git a/chrome/browser/ui/webui/options/home_page_overlay_handler.cc b/chrome/browser/ui/webui/options/home_page_overlay_handler.cc index 29125dc..4496648 100644 --- a/chrome/browser/ui/webui/options/home_page_overlay_handler.cc +++ b/chrome/browser/ui/webui/options/home_page_overlay_handler.cc @@ -45,12 +45,12 @@ void HomePageOverlayHandler::GetLocalizedValues( void HomePageOverlayHandler::RequestAutocompleteSuggestions( const base::ListValue* args) { - string16 input; + base::string16 input; CHECK_EQ(args->GetSize(), 1U); CHECK(args->GetString(0, &input)); autocomplete_controller_->Start(AutocompleteInput( - input, string16::npos, string16(), GURL(), + input, base::string16::npos, base::string16(), GURL(), AutocompleteInput::INVALID_SPEC, true, false, false, AutocompleteInput::ALL_MATCHES)); } diff --git a/chrome/browser/ui/webui/options/language_options_handler.cc b/chrome/browser/ui/webui/options/language_options_handler.cc index c34e614..9883683 100644 --- a/chrome/browser/ui/webui/options/language_options_handler.cc +++ b/chrome/browser/ui/webui/options/language_options_handler.cc @@ -66,7 +66,7 @@ ListValue* LanguageOptionsHandler::GetLanguageList() { // In theory, we should be able to create a map that is sorted by // display names using ICU comparator, but doing it is hard, thus we'll // use an auxiliary vector to achieve the same result. - typedef std::pair<std::string, string16> LanguagePair; + typedef std::pair<std::string, base::string16> LanguagePair; typedef std::map<string16, LanguagePair> LanguageMap; LanguageMap language_map; // The auxiliary vector mentioned above. @@ -74,10 +74,10 @@ ListValue* LanguageOptionsHandler::GetLanguageList() { // Build the list of display names, and build the language map. for (size_t i = 0; i < language_codes.size(); ++i) { - string16 display_name = + base::string16 display_name = l10n_util::GetDisplayNameForLocale(language_codes[i], app_locale, false); - string16 native_display_name = + base::string16 native_display_name = l10n_util::GetDisplayNameForLocale(language_codes[i], language_codes[i], false); display_names.push_back(display_name); @@ -92,12 +92,12 @@ ListValue* LanguageOptionsHandler::GetLanguageList() { // Build the language list from the language map. ListValue* language_list = new ListValue(); for (size_t i = 0; i < display_names.size(); ++i) { - string16& display_name = display_names[i]; - string16 adjusted_display_name(display_name); + base::string16& display_name = display_names[i]; + base::string16 adjusted_display_name(display_name); base::i18n::AdjustStringForLocaleDirection(&adjusted_display_name); const LanguagePair& pair = language_map[display_name]; - string16 adjusted_native_display_name(pair.second); + base::string16 adjusted_native_display_name(pair.second); base::i18n::AdjustStringForLocaleDirection(&adjusted_native_display_name); bool has_rtl_chars = base::i18n::StringContainsStrongRTLChars(display_name); diff --git a/chrome/browser/ui/webui/options/language_options_handler.h b/chrome/browser/ui/webui/options/language_options_handler.h index 4eafe0f..b75f94f 100644 --- a/chrome/browser/ui/webui/options/language_options_handler.h +++ b/chrome/browser/ui/webui/options/language_options_handler.h @@ -33,7 +33,7 @@ class LanguageOptionsHandler : public LanguageOptionsHandlerCommon { private: // LanguageOptionsHandlerCommon implementation. - virtual string16 GetProductName() OVERRIDE; + virtual base::string16 GetProductName() OVERRIDE; virtual void SetApplicationLocale(const std::string& language_code) OVERRIDE; // Called when the restart button is clicked. diff --git a/chrome/browser/ui/webui/options/language_options_handler_common.h b/chrome/browser/ui/webui/options/language_options_handler_common.h index 6cfda8f..65b45cf 100644 --- a/chrome/browser/ui/webui/options/language_options_handler_common.h +++ b/chrome/browser/ui/webui/options/language_options_handler_common.h @@ -59,7 +59,7 @@ class LanguageOptionsHandlerCommon private: // Returns the name of the product (ex. "Chrome" or "Chrome OS"). - virtual string16 GetProductName() = 0; + virtual base::string16 GetProductName() = 0; // Sets the application locale. virtual void SetApplicationLocale(const std::string& language_code) = 0; diff --git a/chrome/browser/ui/webui/options/manage_profile_handler.cc b/chrome/browser/ui/webui/options/manage_profile_handler.cc index bc1b7de..716cd08 100644 --- a/chrome/browser/ui/webui/options/manage_profile_handler.cc +++ b/chrome/browser/ui/webui/options/manage_profile_handler.cc @@ -313,7 +313,7 @@ void ManageProfileHandler::SetProfileIconAndName(const ListValue* args) { if (profile->IsManaged()) return; - string16 new_profile_name; + base::string16 new_profile_name; if (!args->GetString(2, &new_profile_name)) return; @@ -368,7 +368,7 @@ void ManageProfileHandler::ProfileIconSelectionChanged( size_t profile_index = cache.GetIndexOfProfileWithPath(profile_file_path); if (profile_index == std::string::npos) return; - string16 gaia_name = cache.GetNameOfProfileAtIndex(profile_index); + base::string16 gaia_name = cache.GetNameOfProfileAtIndex(profile_index); if (gaia_name.empty()) return; @@ -405,7 +405,7 @@ void ManageProfileHandler::RequestCreateProfileUpdate( Profile* profile = Profile::FromWebUI(web_ui()); SigninManagerBase* manager = SigninManagerFactory::GetForProfile(profile); - string16 username = UTF8ToUTF16(manager->GetAuthenticatedUsername()); + base::string16 username = UTF8ToUTF16(manager->GetAuthenticatedUsername()); ProfileSyncService* service = ProfileSyncServiceFactory::GetForProfile(profile); GoogleServiceAuthError::State state = service->GetAuthError().state(); diff --git a/chrome/browser/ui/webui/options/managed_user_import_handler.cc b/chrome/browser/ui/webui/options/managed_user_import_handler.cc index ae9ef7e..86f9e7f 100644 --- a/chrome/browser/ui/webui/options/managed_user_import_handler.cc +++ b/chrome/browser/ui/webui/options/managed_user_import_handler.cc @@ -174,7 +174,7 @@ void ManagedUserImportHandler::SendExistingManagedUsers( void ManagedUserImportHandler::ClearManagedUsersAndShowError() { web_ui()->CallJavascriptFunction( "ManagedUserImportOverlay.receiveExistingManagedUsers"); - string16 error_message = + base::string16 error_message = l10n_util::GetStringUTF16(IDS_MANAGED_USER_IMPORT_SIGN_IN_ERROR); web_ui()->CallJavascriptFunction("ManagedUserImportOverlay.onError", base::StringValue(error_message)); diff --git a/chrome/browser/ui/webui/options/media_galleries_handler.cc b/chrome/browser/ui/webui/options/media_galleries_handler.cc index cef51fe5..3cf35a9 100644 --- a/chrome/browser/ui/webui/options/media_galleries_handler.cc +++ b/chrome/browser/ui/webui/options/media_galleries_handler.cc @@ -109,7 +109,7 @@ void MediaGalleriesHandler::HandleAddNewGallery(const base::ListValue* args) { new ChromeSelectFilePolicy(web_ui()->GetWebContents())); select_file_dialog_->SelectFile( ui::SelectFileDialog::SELECT_FOLDER, - string16(), // TODO(estade): a name for the dialog? + base::string16(), // TODO(estade): a name for the dialog? base::FilePath(), NULL, 0, base::FilePath::StringType(), diff --git a/chrome/browser/ui/webui/options/options_ui.cc b/chrome/browser/ui/webui/options/options_ui.cc index 61bd0f6..e7c2449 100644 --- a/chrome/browser/ui/webui/options/options_ui.cc +++ b/chrome/browser/ui/webui/options/options_ui.cc @@ -206,7 +206,7 @@ void OptionsPageUIHandler::RegisterStrings( const OptionsStringResource* resources, size_t length) { for (size_t i = 0; i < length; ++i) { - string16 value; + base::string16 value; if (resources[i].substitution_id == 0) { value = l10n_util::GetStringUTF16(resources[i].id); } else { diff --git a/chrome/browser/ui/webui/options/options_ui_browsertest.cc b/chrome/browser/ui/webui/options/options_ui_browsertest.cc index f185076..084b248 100644 --- a/chrome/browser/ui/webui/options/options_ui_browsertest.cc +++ b/chrome/browser/ui/webui/options/options_ui_browsertest.cc @@ -66,10 +66,10 @@ void OptionsUIBrowserTest::VerifyNavbar() { } void OptionsUIBrowserTest::VerifyTitle() { - string16 title = + base::string16 title = browser()->tab_strip_model()->GetActiveWebContents()->GetTitle(); - string16 expected_title = l10n_util::GetStringUTF16(IDS_SETTINGS_TITLE); - EXPECT_NE(title.find(expected_title), string16::npos); + base::string16 expected_title = l10n_util::GetStringUTF16(IDS_SETTINGS_TITLE); + EXPECT_NE(title.find(expected_title), base::string16::npos); } // Flaky, see http://crbug.com/119671. @@ -117,8 +117,8 @@ IN_PROC_BROWSER_TEST_F(OptionsUIBrowserTest, NavigateBackFromOverlayDialog) { profile_manager->GenerateNextProfileDirectoryPath(), base::Bind(&RunClosureWhenProfileInitialized, run_loop.QuitClosure()), - string16(), - string16(), + base::string16(), + base::string16(), std::string()); run_loop.Run(); diff --git a/chrome/browser/ui/webui/options/password_manager_handler.cc b/chrome/browser/ui/webui/options/password_manager_handler.cc index 3805f1d..b605282 100644 --- a/chrome/browser/ui/webui/options/password_manager_handler.cc +++ b/chrome/browser/ui/webui/options/password_manager_handler.cc @@ -120,8 +120,9 @@ void PasswordManagerHandler::HandleRequestShowPassword(const ListValue* args) { password_manager_presenter_.RequestShowPassword(static_cast<size_t>(index)); } -void PasswordManagerHandler::ShowPassword(size_t index, - const string16& password_value) { +void PasswordManagerHandler::ShowPassword( + size_t index, + const base::string16& password_value) { // Call back the front end to reveal the password. web_ui()->CallJavascriptFunction( "PasswordManager.showPassword", @@ -138,7 +139,7 @@ void PasswordManagerHandler::SetPasswordList( bool show_passwords) { ListValue entries; languages_ = GetProfile()->GetPrefs()->GetString(prefs::kAcceptLanguages); - string16 placeholder(ASCIIToUTF16(" ")); + base::string16 placeholder(ASCIIToUTF16(" ")); for (size_t i = 0; i < password_list.size(); ++i) { ListValue* entry = new ListValue(); entry->Append(new StringValue(net::FormatUrl(password_list[i]->origin, @@ -149,7 +150,7 @@ void PasswordManagerHandler::SetPasswordList( } else { // Use a placeholder value with the same length as the password. entry->Append(new StringValue( - string16(password_list[i]->password_value.length(), ' '))); + base::string16(password_list[i]->password_value.length(), ' '))); } entries.Append(entry); } diff --git a/chrome/browser/ui/webui/options/password_manager_handler.h b/chrome/browser/ui/webui/options/password_manager_handler.h index c25b05c..11ec857 100644 --- a/chrome/browser/ui/webui/options/password_manager_handler.h +++ b/chrome/browser/ui/webui/options/password_manager_handler.h @@ -29,7 +29,7 @@ class PasswordManagerHandler : public OptionsPageUIHandler, // PasswordUIView implementation. virtual Profile* GetProfile() OVERRIDE; - virtual void ShowPassword(size_t index, const string16& password_value) + virtual void ShowPassword(size_t index, const base::string16& password_value) OVERRIDE; virtual void SetPasswordList( const ScopedVector<autofill::PasswordForm>& password_list, diff --git a/chrome/browser/ui/webui/options/search_engine_manager_handler.cc b/chrome/browser/ui/webui/options/search_engine_manager_handler.cc index e0d67c0..ed168b6 100644 --- a/chrome/browser/ui/webui/options/search_engine_manager_handler.cc +++ b/chrome/browser/ui/webui/options/search_engine_manager_handler.cc @@ -247,8 +247,8 @@ void SearchEngineManagerHandler::EditSearchEngine(const ListValue* args) { void SearchEngineManagerHandler::OnEditedKeyword( TemplateURL* template_url, - const string16& title, - const string16& keyword, + const base::string16& title, + const base::string16& keyword, const std::string& url) { DCHECK(!url.empty()); if (template_url) @@ -263,8 +263,8 @@ void SearchEngineManagerHandler::CheckSearchEngineInfoValidity( { if (!edit_controller_.get()) return; - string16 name; - string16 keyword; + base::string16 name; + base::string16 keyword; std::string url; std::string modelIndex; if (!args->GetString(ENGINE_NAME, &name) || @@ -294,8 +294,8 @@ void SearchEngineManagerHandler::EditCancelled(const ListValue* args) { void SearchEngineManagerHandler::EditCompleted(const ListValue* args) { if (!edit_controller_.get()) return; - string16 name; - string16 keyword; + base::string16 name; + base::string16 keyword; std::string url; if (!args->GetString(ENGINE_NAME, &name) || !args->GetString(ENGINE_KEYWORD, &keyword) || diff --git a/chrome/browser/ui/webui/options/search_engine_manager_handler.h b/chrome/browser/ui/webui/options/search_engine_manager_handler.h index 337a7da..2057d82 100644 --- a/chrome/browser/ui/webui/options/search_engine_manager_handler.h +++ b/chrome/browser/ui/webui/options/search_engine_manager_handler.h @@ -38,8 +38,8 @@ class SearchEngineManagerHandler : public OptionsPageUIHandler, // EditSearchEngineControllerDelegate implementation. virtual void OnEditedKeyword(TemplateURL* template_url, - const string16& title, - const string16& keyword, + const base::string16& title, + const base::string16& keyword, const std::string& url) OVERRIDE; virtual void RegisterMessages() OVERRIDE; diff --git a/chrome/browser/ui/webui/options/startup_pages_handler.cc b/chrome/browser/ui/webui/options/startup_pages_handler.cc index 343b2a6..e46e9ce 100644 --- a/chrome/browser/ui/webui/options/startup_pages_handler.cc +++ b/chrome/browser/ui/webui/options/startup_pages_handler.cc @@ -224,12 +224,12 @@ void StartupPagesHandler::CancelChanges(const ListValue* args) { void StartupPagesHandler::RequestAutocompleteSuggestions( const ListValue* args) { - string16 input; + base::string16 input; CHECK_EQ(args->GetSize(), 1U); CHECK(args->GetString(0, &input)); autocomplete_controller_->Start(AutocompleteInput( - input, string16::npos, string16(), GURL(), + input, base::string16::npos, base::string16(), GURL(), AutocompleteInput::INVALID_SPEC, true, false, false, AutocompleteInput::ALL_MATCHES)); } diff --git a/chrome/browser/ui/webui/plugins_ui.cc b/chrome/browser/ui/webui/plugins_ui.cc index dc42f0d..0564ecd 100644 --- a/chrome/browser/ui/webui/plugins_ui.cc +++ b/chrome/browser/ui/webui/plugins_ui.cc @@ -106,7 +106,7 @@ content::WebUIDataSource* CreatePluginsUIHTMLSource() { return source; } -string16 PluginTypeToString(int type) { +base::string16 PluginTypeToString(int type) { // The type is stored as an |int|, but doing the switch on the right // enumeration type gives us better build-time error checking (if someone adds // a new type). @@ -121,7 +121,7 @@ string16 PluginTypeToString(int type) { return l10n_util::GetStringUTF16(IDS_PLUGINS_PPAPI_UNSANDBOXED); } NOTREACHED(); - return string16(); + return base::string16(); } //////////////////////////////////////////////////////////////////////////////// @@ -240,7 +240,7 @@ void PluginsDOMHandler::HandleEnablePluginMessage(const ListValue* args) { PluginPrefs* plugin_prefs = PluginPrefs::GetForProfile(profile).get(); if (is_group_str == "true") { - string16 group_name; + base::string16 group_name; if (!args->GetString(0, &group_name)) { NOTREACHED(); return; @@ -249,9 +249,10 @@ void PluginsDOMHandler::HandleEnablePluginMessage(const ListValue* args) { plugin_prefs->EnablePluginGroup(enable, group_name); if (enable) { // See http://crbug.com/50105 for background. - string16 adobereader = ASCIIToUTF16( - PluginMetadata::kAdobeReaderGroupName); - string16 internalpdf = ASCIIToUTF16(ChromeContentClient::kPDFPluginName); + base::string16 adobereader = ASCIIToUTF16( + PluginMetadata::kAdobeReaderGroupName); + base::string16 internalpdf = + ASCIIToUTF16(ChromeContentClient::kPDFPluginName); if (group_name == adobereader) plugin_prefs->EnablePluginGroup(false, internalpdf); else if (group_name == internalpdf) @@ -352,7 +353,7 @@ void PluginsDOMHandler::PluginsLoaded( ListValue* plugin_files = new ListValue(); scoped_ptr<PluginMetadata> plugin_metadata( plugin_finder->GetPluginMetadata(*group_plugins[0])); - string16 group_name = plugin_metadata->name(); + base::string16 group_name = plugin_metadata->name(); std::string group_identifier = plugin_metadata->identifier(); bool group_enabled = false; bool all_plugins_enabled_by_policy = true; diff --git a/chrome/browser/ui/webui/policy_ui.cc b/chrome/browser/ui/webui/policy_ui.cc index 3d93dc5..259e67b 100644 --- a/chrome/browser/ui/webui/policy_ui.cc +++ b/chrome/browser/ui/webui/policy_ui.cc @@ -139,11 +139,12 @@ void GetStatusFromCore(const policy::CloudPolicyCore* core, bool no_error = store->status() == policy::CloudPolicyStore::STATUS_OK && client && client->status() == policy::DM_STATUS_SUCCESS; - string16 status = store->status() == policy::CloudPolicyStore::STATUS_OK && - client && client->status() != policy::DM_STATUS_SUCCESS ? - policy::FormatDeviceManagementStatus(client->status()) : - policy::FormatStoreStatus(store->status(), - store->validation_status()); + base::string16 status = + store->status() == policy::CloudPolicyStore::STATUS_OK && + client && client->status() != policy::DM_STATUS_SUCCESS ? + policy::FormatDeviceManagementStatus(client->status()) : + policy::FormatStoreStatus(store->status(), + store->validation_status()); const em::PolicyData* policy = store->policy(); std::string client_id = policy ? policy->device_id() : std::string(); std::string username = policy ? policy->username() : std::string(); @@ -684,7 +685,7 @@ void PolicyUIHandler::GetPolicyValues(const policy::PolicyMap& map, value->SetString("level", "recommended"); else value->SetString("level", "mandatory"); - string16 error = errors->GetErrors(entry->first); + base::string16 error = errors->GetErrors(entry->first); if (!error.empty()) value->SetString("error", error); values->Set(entry->first, value); diff --git a/chrome/browser/ui/webui/print_preview/print_preview_handler.cc b/chrome/browser/ui/webui/print_preview/print_preview_handler.cc index 5af78f4..e832afe 100644 --- a/chrome/browser/ui/webui/print_preview/print_preview_handler.cc +++ b/chrome/browser/ui/webui/print_preview/print_preview_handler.cc @@ -758,7 +758,7 @@ void PrintPreviewHandler::HandlePrint(const ListValue* args) { #endif scoped_refptr<base::RefCountedBytes> data; - string16 title; + base::string16 title; if (!GetPreviewDataAndTitle(&data, &title)) { // Nothing to print, no preview available. return; @@ -824,7 +824,7 @@ void PrintPreviewHandler::PrintToPdf() { PrintPreviewUI* print_preview_ui = static_cast<PrintPreviewUI*>( web_ui()->GetController()); // Pre-populating select file dialog with print job title. - string16 print_job_title_utf16 = print_preview_ui->initiator_title(); + base::string16 print_job_title_utf16 = print_preview_ui->initiator_title(); #if defined(OS_WIN) base::FilePath::StringType print_job_title(print_job_title_utf16); @@ -918,7 +918,7 @@ void PrintPreviewHandler::PrintWithCloudPrintDialog() { ReportStats(); scoped_refptr<base::RefCountedBytes> data; - string16 title; + base::string16 title; if (!GetPreviewDataAndTitle(&data, &title)) { // Nothing to print, no preview available. return; @@ -931,7 +931,7 @@ void PrintPreviewHandler::PrintWithCloudPrintDialog() { modal_parent, data.get(), title, - string16(), + base::string16(), std::string("application/pdf")); // Once the cloud print dialog comes up we're no longer in a background @@ -1213,7 +1213,7 @@ void PrintPreviewHandler::SelectFile(const base::FilePath& default_filename) { this, new ChromeSelectFilePolicy(preview_web_contents())), select_file_dialog_->SelectFile( ui::SelectFileDialog::SELECT_SAVEAS_FILE, - string16(), + base::string16(), sticky_settings->save_path()->Append(default_filename), &file_type_info, 0, @@ -1258,7 +1258,7 @@ void PrintPreviewHandler::FileSelected(const base::FilePath& path, void PrintPreviewHandler::PostPrintToPdfTask() { scoped_refptr<base::RefCountedBytes> data; - string16 title; + base::string16 title; if (!GetPreviewDataAndTitle(&data, &title)) { NOTREACHED() << "Preview data was checked before file dialog."; return; @@ -1294,7 +1294,7 @@ void PrintPreviewHandler::ClearInitiatorDetails() { bool PrintPreviewHandler::GetPreviewDataAndTitle( scoped_refptr<base::RefCountedBytes>* data, - string16* title) const { + base::string16* title) const { PrintPreviewUI* print_preview_ui = static_cast<PrintPreviewUI*>( web_ui()->GetController()); scoped_refptr<base::RefCountedBytes> tmp_data; @@ -1434,7 +1434,7 @@ void PrintPreviewHandler::StartPrivetLocalPrint( privet_local_print_operation_->SetTicket(print_ticket); scoped_refptr<base::RefCountedBytes> data; - string16 title; + base::string16 title; if (!GetPreviewDataAndTitle(&data, &title)) { base::FundamentalValue http_code_value(-1); diff --git a/chrome/browser/ui/webui/print_preview/print_preview_handler.h b/chrome/browser/ui/webui/print_preview/print_preview_handler.h index c364b32..a35df5d 100644 --- a/chrome/browser/ui/webui/print_preview/print_preview_handler.h +++ b/chrome/browser/ui/webui/print_preview/print_preview_handler.h @@ -242,7 +242,7 @@ class PrintPreviewHandler void GetNumberFormatAndMeasurementSystem(base::DictionaryValue* settings); bool GetPreviewDataAndTitle(scoped_refptr<base::RefCountedBytes>* data, - string16* title) const; + base::string16* title) const; #if defined(USE_CUPS) void SaveCUPSColorSetting(const base::DictionaryValue* settings); diff --git a/chrome/browser/ui/webui/print_preview/print_preview_ui.cc b/chrome/browser/ui/webui/print_preview/print_preview_ui.cc index 0209e97..44c6171 100644 --- a/chrome/browser/ui/webui/print_preview/print_preview_ui.cc +++ b/chrome/browser/ui/webui/print_preview/print_preview_ui.cc @@ -209,7 +209,7 @@ content::WebUIDataSource* CreatePrintPreviewUISource() { IDS_PRINT_PREVIEW_PAGE_LABEL_SINGULAR); source->AddLocalizedString("printPreviewPageLabelPlural", IDS_PRINT_PREVIEW_PAGE_LABEL_PLURAL); - const string16 shortcut_text(UTF8ToUTF16(kAdvancedPrintShortcut)); + const base::string16 shortcut_text(UTF8ToUTF16(kAdvancedPrintShortcut)); #if defined(OS_CHROMEOS) source->AddString( "systemDialogOption", @@ -400,7 +400,7 @@ int PrintPreviewUI::GetAvailableDraftPageCount() { } void PrintPreviewUI::SetInitiatorTitle( - const string16& job_title) { + const base::string16& job_title) { initiator_title_ = job_title; } diff --git a/chrome/browser/ui/webui/print_preview/print_preview_ui.h b/chrome/browser/ui/webui/print_preview/print_preview_ui.h index 33fcd80..5d68c3b 100644 --- a/chrome/browser/ui/webui/print_preview/print_preview_ui.h +++ b/chrome/browser/ui/webui/print_preview/print_preview_ui.h @@ -53,9 +53,9 @@ class PrintPreviewUI : public ConstrainedWebDialogUI { int GetAvailableDraftPageCount(); // Setters - void SetInitiatorTitle(const string16& initiator_title); + void SetInitiatorTitle(const base::string16& initiator_title); - string16 initiator_title() { return initiator_title_; } + base::string16 initiator_title() { return initiator_title_; } bool source_is_modifiable() { return source_is_modifiable_; } @@ -191,7 +191,7 @@ class PrintPreviewUI : public ConstrainedWebDialogUI { // Store the initiator title, used for populating the print preview dialog // title. - string16 initiator_title_; + base::string16 initiator_title_; // Keeps track of whether OnClosePrintPreviewDialog() has been called or not. bool dialog_closed_; diff --git a/chrome/browser/ui/webui/print_preview/print_preview_ui_browsertest.cc b/chrome/browser/ui/webui/print_preview/print_preview_ui_browsertest.cc index d4f64be..d642b0f 100644 --- a/chrome/browser/ui/webui/print_preview/print_preview_ui_browsertest.cc +++ b/chrome/browser/ui/webui/print_preview/print_preview_ui_browsertest.cc @@ -96,7 +96,7 @@ IN_PROC_BROWSER_TEST_F(PrintPreviewTest, WindowedNPAPIPluginHidden) { true); // First load the page and wait for the NPAPI plugin's window to display. - string16 expected_title(ASCIIToUTF16("ready")); + base::string16 expected_title(ASCIIToUTF16("ready")); content::WebContents* tab = browser()->tab_strip_model()->GetActiveWebContents(); content::TitleWatcher title_watcher(tab, expected_title); diff --git a/chrome/browser/ui/webui/set_as_default_browser_ui.cc b/chrome/browser/ui/webui/set_as_default_browser_ui.cc index 89184e2..d088966d 100644 --- a/chrome/browser/ui/webui/set_as_default_browser_ui.cc +++ b/chrome/browser/ui/webui/set_as_default_browser_ui.cc @@ -224,7 +224,7 @@ class SetAsDefaultBrowserDialogImpl : public ui::WebDialogDelegate, protected: // Overridden from WebDialogDelegate: virtual ui::ModalType GetDialogModalType() const OVERRIDE; - virtual string16 GetDialogTitle() const OVERRIDE; + virtual base::string16 GetDialogTitle() const OVERRIDE; virtual GURL GetDialogContentURL() const OVERRIDE; virtual void GetWebUIMessageHandlers( std::vector<WebUIMessageHandler*>* handlers) const OVERRIDE; diff --git a/chrome/browser/ui/webui/signin/profile_signin_confirmation_dialog.h b/chrome/browser/ui/webui/signin/profile_signin_confirmation_dialog.h index ce803be..232b48d 100644 --- a/chrome/browser/ui/webui/signin/profile_signin_confirmation_dialog.h +++ b/chrome/browser/ui/webui/signin/profile_signin_confirmation_dialog.h @@ -53,7 +53,7 @@ class ProfileSigninConfirmationDialog : public ui::WebDialogDelegate { // WebDialogDelegate implementation. virtual ui::ModalType GetDialogModalType() const OVERRIDE; - virtual string16 GetDialogTitle() const OVERRIDE; + virtual base::string16 GetDialogTitle() const OVERRIDE; virtual GURL GetDialogContentURL() const OVERRIDE; virtual void GetWebUIMessageHandlers( std::vector<content::WebUIMessageHandler*>* handlers) const OVERRIDE; diff --git a/chrome/browser/ui/webui/signin/user_manager_screen_handler.cc b/chrome/browser/ui/webui/signin/user_manager_screen_handler.cc index f74eaa0..53e48fe 100644 --- a/chrome/browser/ui/webui/signin/user_manager_screen_handler.cc +++ b/chrome/browser/ui/webui/signin/user_manager_screen_handler.cc @@ -132,8 +132,9 @@ class UserManagerScreenHandler::ProfileUpdateObserver user_manager_handler_->SendUserList(); } - virtual void OnProfileWasRemoved(const base::FilePath& profile_path, - const string16& profile_name) OVERRIDE { + virtual void OnProfileWasRemoved( + const base::FilePath& profile_path, + const base::string16& profile_name) OVERRIDE { // TODO(noms): Change 'SendUserList' to 'removeUser' JS-call when // UserManager is able to find pod belonging to removed user. user_manager_handler_->SendUserList(); @@ -145,8 +146,9 @@ class UserManagerScreenHandler::ProfileUpdateObserver // will be called. } - virtual void OnProfileNameChanged(const base::FilePath& profile_path, - const string16& old_profile_name) OVERRIDE { + virtual void OnProfileNameChanged( + const base::FilePath& profile_path, + const base::string16& old_profile_name) OVERRIDE { user_manager_handler_->SendUserList(); } @@ -254,8 +256,8 @@ void UserManagerScreenHandler::HandleLaunchGuest(const base::ListValue* args) { } void UserManagerScreenHandler::HandleLaunchUser(const base::ListValue* args) { - string16 emailAddress; - string16 displayName; + base::string16 emailAddress; + base::string16 displayName; if (!args->GetString(0, &emailAddress) || !args->GetString(1, &displayName)) { @@ -364,10 +366,12 @@ void UserManagerScreenHandler::GetLocalizedValues( // Strings needed for the user_pod_template public account div, but not ever // actually displayed for desktop users. - localized_strings->SetString("publicAccountReminder", string16()); - localized_strings->SetString("publicAccountEnter", string16()); - localized_strings->SetString("publicAccountEnterAccessibleName", string16()); - localized_strings->SetString("multiple-signin-banner-text", string16()); + localized_strings->SetString("publicAccountReminder", base::string16()); + localized_strings->SetString("publicAccountEnter", base::string16()); + localized_strings->SetString("publicAccountEnterAccessibleName", + base::string16()); + localized_strings->SetString("multiple-signin-banner-text", + base::string16()); } void UserManagerScreenHandler::SendUserList() { diff --git a/chrome/browser/ui/webui/signin/user_manager_ui_browsertest.cc b/chrome/browser/ui/webui/signin/user_manager_ui_browsertest.cc index d1cb865..96c2366 100644 --- a/chrome/browser/ui/webui/signin/user_manager_ui_browsertest.cc +++ b/chrome/browser/ui/webui/signin/user_manager_ui_browsertest.cc @@ -41,7 +41,7 @@ IN_PROC_BROWSER_TEST_F(UserManagerUIBrowserTest, PageLoads) { content::WebContents* web_contents = browser()->tab_strip_model()->GetActiveWebContents(); - string16 title = web_contents->GetTitle(); + base::string16 title = web_contents->GetTitle(); EXPECT_EQ(l10n_util::GetStringUTF16(IDS_USER_MANAGER_SCREEN_TITLE), title); // If the page has loaded correctly, then there should be an account picker. diff --git a/chrome/browser/ui/webui/sync_internals_ui_unittest.cc b/chrome/browser/ui/webui/sync_internals_ui_unittest.cc index 0183aef..02ad293 100644 --- a/chrome/browser/ui/webui/sync_internals_ui_unittest.cc +++ b/chrome/browser/ui/webui/sync_internals_ui_unittest.cc @@ -48,7 +48,7 @@ class TestSyncWebUI: public WebUI { : WebUI(web_contents) {} virtual ~TestSyncWebUI() {} - MOCK_METHOD1(ExecuteJavascript, void(const string16&)); + MOCK_METHOD1(ExecuteJavascript, void(const base::string16&)); }; // Tests with non-NULL ProfileSyncService. diff --git a/chrome/browser/ui/webui/sync_setup_handler.cc b/chrome/browser/ui/webui/sync_setup_handler.cc index 80e4c9c..8d595ec 100644 --- a/chrome/browser/ui/webui/sync_setup_handler.cc +++ b/chrome/browser/ui/webui/sync_setup_handler.cc @@ -199,7 +199,7 @@ void SyncSetupHandler::GetStaticLocalizedValues( content::WebUI* web_ui) { DCHECK(localized_strings); - string16 product_name(GetStringUTF16(IDS_PRODUCT_NAME)); + base::string16 product_name(GetStringUTF16(IDS_PRODUCT_NAME)); localized_strings->SetString( "chooseDataTypesInstructions", GetStringFUTF16(IDS_SYNC_CHOOSE_DATATYPES_INSTRUCTIONS, product_name)); @@ -367,7 +367,8 @@ void SyncSetupHandler::DisplayConfigureSync(bool show_advanced, base::Time passphrase_time = service->GetExplicitPassphraseTime(); syncer::PassphraseType passphrase_type = service->GetPassphraseType(); if (!passphrase_time.is_null()) { - string16 passphrase_time_str = base::TimeFormatShortDate(passphrase_time); + base::string16 passphrase_time_str = + base::TimeFormatShortDate(passphrase_time); args.SetString( "enterPassphraseBody", GetStringFUTF16(IDS_SYNC_ENTER_PASSPHRASE_BODY_WITH_DATE, diff --git a/chrome/browser/ui/webui/sync_setup_handler_unittest.cc b/chrome/browser/ui/webui/sync_setup_handler_unittest.cc index e40ccc3..b72c06b 100644 --- a/chrome/browser/ui/webui/sync_setup_handler_unittest.cc +++ b/chrome/browser/ui/webui/sync_setup_handler_unittest.cc @@ -196,10 +196,10 @@ class TestWebUI : public content::WebUI { virtual ui::ScaleFactor GetDeviceScaleFactor() const OVERRIDE { return ui::SCALE_FACTOR_100P; } - virtual const string16& GetOverriddenTitle() const OVERRIDE { + virtual const base::string16& GetOverriddenTitle() const OVERRIDE { return temp_string_; } - virtual void OverrideTitle(const string16& title) OVERRIDE {} + virtual void OverrideTitle(const base::string16& title) OVERRIDE {} virtual content::PageTransition GetLinkTransitionType() const OVERRIDE { return content::PAGE_TRANSITION_LINK; } @@ -240,7 +240,7 @@ class TestWebUI : public content::WebUI { const std::vector<CallData>& call_data() { return call_data_; } private: std::vector<CallData> call_data_; - string16 temp_string_; + base::string16 temp_string_; }; class TestingSyncSetupHandler : public SyncSetupHandler { diff --git a/chrome/browser/ui/webui/task_manager/task_manager_dialog.cc b/chrome/browser/ui/webui/task_manager/task_manager_dialog.cc index 221df31..b4228cf 100644 --- a/chrome/browser/ui/webui/task_manager/task_manager_dialog.cc +++ b/chrome/browser/ui/webui/task_manager/task_manager_dialog.cc @@ -63,7 +63,7 @@ class TaskManagerDialogImpl : public WebDialogDelegate { virtual ui::ModalType GetDialogModalType() const OVERRIDE { return ui::MODAL_TYPE_NONE; } - virtual string16 GetDialogTitle() const OVERRIDE { + virtual base::string16 GetDialogTitle() const OVERRIDE { return l10n_util::GetStringUTF16(IDS_TASK_MANAGER_TITLE); } virtual std::string GetDialogName() const OVERRIDE { diff --git a/chrome/browser/ui/webui/task_manager/task_manager_handler.cc b/chrome/browser/ui/webui/task_manager/task_manager_handler.cc index f9dc4f9..81aa206 100644 --- a/chrome/browser/ui/webui/task_manager/task_manager_handler.cc +++ b/chrome/browser/ui/webui/task_manager/task_manager_handler.cc @@ -110,7 +110,7 @@ void TaskManagerHandler::RegisterMessages() { static int parseIndex(const Value* value) { int index = -1; - string16 string16_index; + base::string16 base::string16_index; double double_index; if (value->GetAsString(&string16_index)) { bool converted = base::StringToInt(string16_index, &index); diff --git a/chrome/browser/ui/webui/translate_internals/translate_internals_ui.cc b/chrome/browser/ui/webui/translate_internals/translate_internals_ui.cc index d09e512..d3c2429 100644 --- a/chrome/browser/ui/webui/translate_internals/translate_internals_ui.cc +++ b/chrome/browser/ui/webui/translate_internals/translate_internals_ui.cc @@ -37,7 +37,7 @@ void GetLanguages(base::DictionaryValue* dict) { for (std::vector<std::string>::iterator it = language_codes.begin(); it != language_codes.end(); ++it) { const std::string& lang_code = *it; - string16 lang_name = + base::string16 lang_name = l10n_util::GetDisplayNameForLocale(lang_code, app_locale, false); dict->SetString(lang_code, lang_name); } diff --git a/chrome/browser/ui/webui/version_handler.cc b/chrome/browser/ui/webui/version_handler.cc index b46de41..6074c10 100644 --- a/chrome/browser/ui/webui/version_handler.cc +++ b/chrome/browser/ui/webui/version_handler.cc @@ -23,8 +23,8 @@ namespace { // Retrieves the executable and profile paths on the FILE thread. void GetFilePaths(const base::FilePath& profile_path, - string16* exec_path_out, - string16* profile_path_out) { + base::string16* exec_path_out, + base::string16* profile_path_out) { DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::FILE)); base::FilePath executable_path = base::MakeAbsoluteFilePath( @@ -72,8 +72,8 @@ void VersionHandler::HandleRequestVersionInfo(const ListValue* args) { // Grab the executable path on the FILE thread. It is returned in // OnGotFilePaths. - string16* exec_path_buffer = new string16; - string16* profile_path_buffer = new string16; + base::string16* exec_path_buffer = new base::string16; + base::string16* profile_path_buffer = new base::string16; content::BrowserThread::PostTaskAndReply( content::BrowserThread::FILE, FROM_HERE, base::Bind(&GetFilePaths, Profile::FromWebUI(web_ui())->GetPath(), @@ -115,7 +115,7 @@ void VersionHandler::HandleRequestVersionInfo(const ListValue* args) { } void VersionHandler::OnGotFilePaths(string16* executable_path_data, - string16* profile_path_data) { + base::string16* profile_path_data) { DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); StringValue exec_path(*executable_path_data); @@ -130,7 +130,7 @@ void VersionHandler::OnGotPlugins( std::vector<content::WebPluginInfo> info_array; content::PluginService::GetInstance()->GetPluginInfoArray( GURL(), content::kFlashPluginSwfMimeType, false, &info_array, NULL); - string16 flash_version = + base::string16 flash_version = l10n_util::GetStringUTF16(IDS_PLUGINS_DISABLED_PLUGIN); PluginPrefs* plugin_prefs = PluginPrefs::GetForProfile(Profile::FromWebUI(web_ui())).get(); diff --git a/chrome/browser/ui/webui/version_handler.h b/chrome/browser/ui/webui/version_handler.h index 2fc65d4..a5affc2 100644 --- a/chrome/browser/ui/webui/version_handler.h +++ b/chrome/browser/ui/webui/version_handler.h @@ -30,7 +30,7 @@ class VersionHandler : public content::WebUIMessageHandler { // Callback which handles returning the executable and profile paths to the // front end. void OnGotFilePaths(string16* executable_path_data, - string16* profile_path_data); + base::string16* profile_path_data); // Callback for GetPlugins which responds to the page with the Flash version. // This also initiates the OS Version load on ChromeOS. diff --git a/chrome/browser/ui/webui/web_ui_test_handler.cc b/chrome/browser/ui/webui/web_ui_test_handler.cc index 2cbcf1a..0c347e4 100644 --- a/chrome/browser/ui/webui/web_ui_test_handler.cc +++ b/chrome/browser/ui/webui/web_ui_test_handler.cc @@ -27,25 +27,26 @@ WebUITestHandler::WebUITestHandler() is_waiting_(false) { } -void WebUITestHandler::PreloadJavaScript(const string16& js_text, +void WebUITestHandler::PreloadJavaScript(const base::string16& js_text, RenderViewHost* preload_host) { DCHECK(preload_host); preload_host->Send(new ChromeViewMsg_WebUIJavaScript( - preload_host->GetRoutingID(), string16(), js_text, 0, + preload_host->GetRoutingID(), base::string16(), js_text, 0, false)); } -void WebUITestHandler::RunJavaScript(const string16& js_text) { +void WebUITestHandler::RunJavaScript(const base::string16& js_text) { web_ui()->GetWebContents()->GetRenderViewHost()->ExecuteJavascriptInWebFrame( - string16(), js_text); + base::string16(), js_text); } -bool WebUITestHandler::RunJavaScriptTestWithResult(const string16& js_text) { +bool WebUITestHandler::RunJavaScriptTestWithResult( + const base::string16& js_text) { test_succeeded_ = false; run_test_succeeded_ = false; RenderViewHost* rvh = web_ui()->GetWebContents()->GetRenderViewHost(); rvh->ExecuteJavascriptInWebFrameCallbackResult( - string16(), // frame_xpath + base::string16(), // frame_xpath js_text, base::Bind(&WebUITestHandler::JavaScriptComplete, base::Unretained(this))); diff --git a/chrome/browser/ui/webui/web_ui_test_handler.h b/chrome/browser/ui/webui/web_ui_test_handler.h index 91b6321..04cd7c6 100644 --- a/chrome/browser/ui/webui/web_ui_test_handler.h +++ b/chrome/browser/ui/webui/web_ui_test_handler.h @@ -25,15 +25,15 @@ class WebUITestHandler : public content::WebUIMessageHandler { // Sends a message through |preload_host| with the |js_text| to preload at the // appropriate time before the onload call is made. - void PreloadJavaScript(const string16& js_text, + void PreloadJavaScript(const base::string16& js_text, content::RenderViewHost* preload_host); // Runs |js_text| in this object's WebUI frame. Does not wait for any result. - void RunJavaScript(const string16& js_text); + void RunJavaScript(const base::string16& js_text); // Runs |js_text| in this object's WebUI frame. Waits for result, logging an // error message on failure. Returns test pass/fail. - bool RunJavaScriptTestWithResult(const string16& js_text); + bool RunJavaScriptTestWithResult(const base::string16& js_text); // WebUIMessageHandler overrides. // Add test handlers to the current WebUI object. diff --git a/chrome/browser/ui/webui/welcome_ui_android.cc b/chrome/browser/ui/webui/welcome_ui_android.cc index 7a1579d..b5321a8 100644 --- a/chrome/browser/ui/webui/welcome_ui_android.cc +++ b/chrome/browser/ui/webui/welcome_ui_android.cc @@ -54,7 +54,7 @@ WelcomeUI::WelcomeUI(content::WebUI* web_ui) bool tos_visible = tab && tab->ShouldWelcomePageLinkToTermsOfService(); html_source->AddBoolean("tosVisible", tos_visible); - string16 tos_html; + base::string16 tos_html; if (tos_visible) { std::string privacy_notice_url = base::StringPrintf(kPrivacyNoticeBaseURL, locale.c_str()); |