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 | |
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
245 files changed, 891 insertions, 847 deletions
diff --git a/chrome/browser/ui/android/autofill/autofill_dialog_controller_android.cc b/chrome/browser/ui/android/autofill/autofill_dialog_controller_android.cc index 96dcadeb..fabac80a 100644 --- a/chrome/browser/ui/android/autofill/autofill_dialog_controller_android.cc +++ b/chrome/browser/ui/android/autofill/autofill_dialog_controller_android.cc @@ -346,11 +346,12 @@ void AutofillDialogControllerAndroid::DialogContinue( jstring jlast_used_billing, jstring jlast_used_shipping, jstring jlast_used_card) { - const string16 email = AutofillDialogResult::GetWalletEmail(env, wallet); + const base::string16 email = + AutofillDialogResult::GetWalletEmail(env, wallet); const std::string google_transaction_id = AutofillDialogResult::GetWalletGoogleTransactionId(env, wallet); - const string16 last_used_account_name = + const base::string16 last_used_account_name = base::android::ConvertJavaStringToUTF16(env, jlast_used_account_name); const std::string last_used_billing = base::android::ConvertJavaStringToUTF8(env, jlast_used_billing); diff --git a/chrome/browser/ui/android/chrome_http_auth_handler.cc b/chrome/browser/ui/android/chrome_http_auth_handler.cc index 300a6ea..fd85d9a 100644 --- a/chrome/browser/ui/android/chrome_http_auth_handler.cc +++ b/chrome/browser/ui/android/chrome_http_auth_handler.cc @@ -21,7 +21,7 @@ using base::android::ConvertJavaStringToUTF16; using base::android::ConvertUTF16ToJavaString; using base::android::ScopedJavaLocalRef; -ChromeHttpAuthHandler::ChromeHttpAuthHandler(const string16& explanation) +ChromeHttpAuthHandler::ChromeHttpAuthHandler(const base::string16& explanation) : observer_(NULL), explanation_(explanation) { } @@ -43,8 +43,9 @@ jobject ChromeHttpAuthHandler::GetJavaObject() { return java_chrome_http_auth_handler_.obj(); } -void ChromeHttpAuthHandler::OnAutofillDataAvailable(const string16& username, - const string16& password) { +void ChromeHttpAuthHandler::OnAutofillDataAvailable( + const base::string16& username, + const base::string16& password) { DCHECK(java_chrome_http_auth_handler_.obj() != NULL); JNIEnv* env = base::android::AttachCurrentThread(); ScopedJavaLocalRef<jstring> j_username = @@ -61,8 +62,8 @@ void ChromeHttpAuthHandler::SetAuth(JNIEnv* env, jstring username, jstring password) { if (observer_) { - string16 username16 = ConvertJavaStringToUTF16(env, username); - string16 password16 = ConvertJavaStringToUTF16(env, password); + base::string16 username16 = ConvertJavaStringToUTF16(env, username); + base::string16 password16 = ConvertJavaStringToUTF16(env, password); observer_->SetAuth(username16, password16); } } diff --git a/chrome/browser/ui/android/chrome_http_auth_handler.h b/chrome/browser/ui/android/chrome_http_auth_handler.h index 9b46083..b5c52c7 100644 --- a/chrome/browser/ui/android/chrome_http_auth_handler.h +++ b/chrome/browser/ui/android/chrome_http_auth_handler.h @@ -17,7 +17,7 @@ // by, e.g., showing the user a login dialog. class ChromeHttpAuthHandler { public: - ChromeHttpAuthHandler(const string16& explanation); + ChromeHttpAuthHandler(const base::string16& explanation); ~ChromeHttpAuthHandler(); // This must be called before using the object. @@ -35,8 +35,8 @@ class ChromeHttpAuthHandler { // Forwards the autofill data to the Java land object. void OnAutofillDataAvailable( - const string16& username, - const string16& password); + const base::string16& username, + const base::string16& password); // -------------------------------------------------------------- // JNI Methods @@ -67,7 +67,7 @@ class ChromeHttpAuthHandler { LoginHandler* observer_; base::android::ScopedJavaGlobalRef<jobject> java_chrome_http_auth_handler_; // e.g. "The server example.com:80 requires a username and password." - string16 explanation_; + base::string16 explanation_; DISALLOW_COPY_AND_ASSIGN(ChromeHttpAuthHandler); }; diff --git a/chrome/browser/ui/android/content_settings/popup_blocked_infobar_delegate.h b/chrome/browser/ui/android/content_settings/popup_blocked_infobar_delegate.h index 1bbbb79..66c98eb 100644 --- a/chrome/browser/ui/android/content_settings/popup_blocked_infobar_delegate.h +++ b/chrome/browser/ui/android/content_settings/popup_blocked_infobar_delegate.h @@ -23,9 +23,9 @@ class PopupBlockedInfoBarDelegate : public ConfirmInfoBarDelegate { // ConfirmInfoBarDelegate: virtual int GetIconID() const OVERRIDE; virtual PopupBlockedInfoBarDelegate* AsPopupBlockedInfoBarDelegate() OVERRIDE; - virtual string16 GetMessageText() const OVERRIDE; + virtual base::string16 GetMessageText() const OVERRIDE; virtual int GetButtons() const OVERRIDE; - virtual string16 GetButtonLabel(InfoBarButton button) const OVERRIDE; + virtual base::string16 GetButtonLabel(InfoBarButton button) const OVERRIDE; virtual bool Accept() OVERRIDE; int num_popups_; diff --git a/chrome/browser/ui/android/infobars/auto_login_infobar_delegate_android.h b/chrome/browser/ui/android/infobars/auto_login_infobar_delegate_android.h index 8d97b01..d84e7fc 100644 --- a/chrome/browser/ui/android/infobars/auto_login_infobar_delegate_android.h +++ b/chrome/browser/ui/android/infobars/auto_login_infobar_delegate_android.h @@ -17,7 +17,7 @@ class AutoLoginInfoBarDelegateAndroid : public AutoLoginInfoBarDelegate { // AutoLoginInfoBarDelegate: virtual bool Accept() OVERRIDE; virtual bool Cancel() OVERRIDE; - virtual string16 GetMessageText() const OVERRIDE; + virtual base::string16 GetMessageText() const OVERRIDE; // These methods are defined in downstream code. bool AttachAccount(JavaObjectWeakGlobalRef weak_java_translate_helper); diff --git a/chrome/browser/ui/android/infobars/confirm_infobar.cc b/chrome/browser/ui/android/infobars/confirm_infobar.cc index 48a3f14..b61d0c9 100644 --- a/chrome/browser/ui/android/infobars/confirm_infobar.cc +++ b/chrome/browser/ui/android/infobars/confirm_infobar.cc @@ -83,7 +83,7 @@ string16 ConfirmInfoBar::GetTextFor( ConfirmInfoBarDelegate::InfoBarButton button) { ConfirmInfoBarDelegate* delegate = GetDelegate(); return (delegate->GetButtons() & button) ? - delegate->GetButtonLabel(button) : string16(); + delegate->GetButtonLabel(button) : base::string16(); } diff --git a/chrome/browser/ui/android/infobars/confirm_infobar.h b/chrome/browser/ui/android/infobars/confirm_infobar.h index 1156a02..a25da9e 100644 --- a/chrome/browser/ui/android/infobars/confirm_infobar.h +++ b/chrome/browser/ui/android/infobars/confirm_infobar.h @@ -24,7 +24,7 @@ class ConfirmInfoBar : public InfoBarAndroid { const std::string& action_value) OVERRIDE; ConfirmInfoBarDelegate* GetDelegate(); - string16 GetTextFor(ConfirmInfoBarDelegate::InfoBarButton button); + base::string16 GetTextFor(ConfirmInfoBarDelegate::InfoBarButton button); base::android::ScopedJavaGlobalRef<jobject> java_confirm_delegate_; diff --git a/chrome/browser/ui/android/javascript_app_modal_dialog_android.cc b/chrome/browser/ui/android/javascript_app_modal_dialog_android.cc index 2e15b99..5db966c 100644 --- a/chrome/browser/ui/android/javascript_app_modal_dialog_android.cc +++ b/chrome/browser/ui/android/javascript_app_modal_dialog_android.cc @@ -110,14 +110,15 @@ void JavascriptAppModalDialogAndroid::CloseAppModalDialog() { } void JavascriptAppModalDialogAndroid::AcceptAppModalDialog() { - string16 prompt_text; + base::string16 prompt_text; dialog_->OnAccept(prompt_text, false); delete this; } void JavascriptAppModalDialogAndroid::DidAcceptAppModalDialog( JNIEnv* env, jobject, jstring prompt, bool should_suppress_js_dialogs) { - string16 prompt_text = base::android::ConvertJavaStringToUTF16(env, prompt); + base::string16 prompt_text = + base::android::ConvertJavaStringToUTF16(env, prompt); dialog_->OnAccept(prompt_text, should_suppress_js_dialogs); delete this; } diff --git a/chrome/browser/ui/android/login_prompt_android.cc b/chrome/browser/ui/android/login_prompt_android.cc index 25a30a7..6048f68 100644 --- a/chrome/browser/ui/android/login_prompt_android.cc +++ b/chrome/browser/ui/android/login_prompt_android.cc @@ -28,8 +28,8 @@ class LoginHandlerAndroid : public LoginHandler { // LoginHandler methods: virtual void OnAutofillDataAvailable( - const string16& username, - const string16& password) OVERRIDE { + const base::string16& username, + const base::string16& password) OVERRIDE { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); DCHECK(chrome_http_auth_handler_.get() != NULL); chrome_http_auth_handler_->OnAutofillDataAvailable( @@ -39,7 +39,7 @@ class LoginHandlerAndroid : public LoginHandler { virtual void BuildViewForPasswordManager( PasswordManager* manager, - const string16& explanation) OVERRIDE { + const base::string16& explanation) OVERRIDE { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); // Get pointer to TabAndroid diff --git a/chrome/browser/ui/android/simple_message_box_android.cc b/chrome/browser/ui/android/simple_message_box_android.cc index 384a714..5700db7 100644 --- a/chrome/browser/ui/android/simple_message_box_android.cc +++ b/chrome/browser/ui/android/simple_message_box_android.cc @@ -9,8 +9,8 @@ namespace chrome { MessageBoxResult ShowMessageBox(gfx::NativeWindow parent, - const string16& title, - const string16& message, + const base::string16& title, + const base::string16& message, MessageBoxType type) { NOTIMPLEMENTED(); return MESSAGE_BOX_RESULT_NO; diff --git a/chrome/browser/ui/android/tab_model/tab_model.h b/chrome/browser/ui/android/tab_model/tab_model.h index 9f705ca..e00953e 100644 --- a/chrome/browser/ui/android/tab_model/tab_model.h +++ b/chrome/browser/ui/android/tab_model/tab_model.h @@ -63,14 +63,14 @@ class TabModel : public content::NotificationObserver, virtual void OpenClearBrowsingData() const = 0; // Returns search terms extracted from the current url if possible. - string16 GetSearchTermsForCurrentTab(); + base::string16 GetSearchTermsForCurrentTab(); // Returns the parameter that is used to trigger query extraction. std::string GetQueryExtractionParam(); // Calls through to the ToolbarModel's GetCorpusNameForMobile -- see // comments in toolbar_model.h. - string16 GetCorpusNameForCurrentTab(); + base::string16 GetCorpusNameForCurrentTab(); protected: // Instructs the TabModel to broadcast a notification that all tabs are now diff --git a/chrome/browser/ui/android/validation_message_bubble_android.cc b/chrome/browser/ui/android/validation_message_bubble_android.cc index 7ea83a4..9b1af80 100644 --- a/chrome/browser/ui/android/validation_message_bubble_android.cc +++ b/chrome/browser/ui/android/validation_message_bubble_android.cc @@ -28,8 +28,8 @@ inline ContentViewCore* GetContentViewCoreFrom(RenderWidgetHost* widget_host) { ValidationMessageBubbleAndroid::ValidationMessageBubbleAndroid( RenderWidgetHost* widget_host, const gfx::Rect& anchor_in_root_view, - const string16& main_text, - const string16& sub_text) { + const base::string16& main_text, + const base::string16& sub_text) { JNIEnv* env = base::android::AttachCurrentThread(); java_validation_message_bubble_.Reset( Java_ValidationMessageBubble_createAndShow( @@ -70,8 +70,8 @@ namespace chrome { scoped_ptr<ValidationMessageBubble> ValidationMessageBubble::CreateAndShow( RenderWidgetHost* widget_host, const gfx::Rect& anchor_in_root_view, - const string16& main_text, - const string16& sub_text) { + const base::string16& main_text, + const base::string16& sub_text) { return scoped_ptr<ValidationMessageBubble>(new ValidationMessageBubbleAndroid( widget_host, anchor_in_root_view, main_text, sub_text)).Pass(); } diff --git a/chrome/browser/ui/android/validation_message_bubble_android.h b/chrome/browser/ui/android/validation_message_bubble_android.h index ea6ed3c..6997483 100644 --- a/chrome/browser/ui/android/validation_message_bubble_android.h +++ b/chrome/browser/ui/android/validation_message_bubble_android.h @@ -25,8 +25,8 @@ class ValidationMessageBubbleAndroid : public chrome::ValidationMessageBubble { public: ValidationMessageBubbleAndroid(content::RenderWidgetHost* widget_host, const gfx::Rect& anchor_in_screen, - const string16& main_text, - const string16& sub_text); + const base::string16& main_text, + const base::string16& sub_text); virtual ~ValidationMessageBubbleAndroid(); virtual void SetPositionRelativeToAnchor( content::RenderWidgetHost* widget_host, diff --git a/chrome/browser/ui/android/website_settings_popup_android.cc b/chrome/browser/ui/android/website_settings_popup_android.cc index 8eebb5b..9c1b161 100644 --- a/chrome/browser/ui/android/website_settings_popup_android.cc +++ b/chrome/browser/ui/android/website_settings_popup_android.cc @@ -126,7 +126,7 @@ void WebsiteSettingsPopupAndroid::SetIdentityInfo( Java_WebsiteSettingsPopup_addSection(env, popup_jobject_.obj(), icon_id, ConvertUTF8ToJavaString(env, headline).obj(), description.obj()); - string16 certificate_label = + base::string16 certificate_label = l10n_util::GetStringUTF16(IDS_PAGEINFO_CERT_INFO_BUTTON); if (!certificate_label.empty()) { Java_WebsiteSettingsPopup_setCertificateViewer(env, popup_jobject_.obj(), @@ -172,7 +172,7 @@ void WebsiteSettingsPopupAndroid::SetSelectedTab( } void WebsiteSettingsPopupAndroid::SetFirstVisit( - const string16& first_visit) { + const base::string16& first_visit) { NOTIMPLEMENTED(); } diff --git a/chrome/browser/ui/android/website_settings_popup_android.h b/chrome/browser/ui/android/website_settings_popup_android.h index 2edbe626..ea9e5b2 100644 --- a/chrome/browser/ui/android/website_settings_popup_android.h +++ b/chrome/browser/ui/android/website_settings_popup_android.h @@ -32,7 +32,7 @@ class WebsiteSettingsPopupAndroid : public WebsiteSettingsUI { virtual void SetPermissionInfo( const PermissionInfoList& permission_info_list) OVERRIDE; virtual void SetIdentityInfo(const IdentityInfo& identity_info) OVERRIDE; - virtual void SetFirstVisit(const string16& first_visit) OVERRIDE; + virtual void SetFirstVisit(const base::string16& first_visit) OVERRIDE; virtual void SetSelectedTab(WebsiteSettingsUI::TabId tab_id) OVERRIDE; static bool RegisterWebsiteSettingsPopupAndroid(JNIEnv* env); diff --git a/chrome/browser/ui/app_list/app_context_menu.cc b/chrome/browser/ui/app_list/app_context_menu.cc index 4fbaee3..d22e236 100644 --- a/chrome/browser/ui/app_list/app_context_menu.cc +++ b/chrome/browser/ui/app_list/app_context_menu.cc @@ -92,10 +92,10 @@ ui::MenuModel* AppContextMenu::GetMenuModel() { base::Bind(MenuItemHasLauncherContext))); if (!is_platform_app_) - menu_model_->AddItem(LAUNCH_NEW, string16()); + menu_model_->AddItem(LAUNCH_NEW, base::string16()); int index = 0; - extension_menu_items_->AppendExtensionItems(app_id_, string16(), + extension_menu_items_->AppendExtensionItems(app_id_, base::string16(), &index); // Show Pin/Unpin option if shelf is available. @@ -181,7 +181,7 @@ string16 AppContextMenu::GetLabelForCommandId(int command_id) const { l10n_util::GetStringUTF16(IDS_APP_LIST_CONTEXT_MENU_NEW_WINDOW); } else { NOTREACHED(); - return string16(); + return base::string16(); } } diff --git a/chrome/browser/ui/app_list/app_context_menu.h b/chrome/browser/ui/app_list/app_context_menu.h index 7406c23..2dc3d89 100644 --- a/chrome/browser/ui/app_list/app_context_menu.h +++ b/chrome/browser/ui/app_list/app_context_menu.h @@ -38,7 +38,7 @@ class AppContextMenu : public ui::SimpleMenuModel::Delegate { private: // ui::SimpleMenuModel::Delegate overrides: virtual bool IsItemForCommandIdDynamic(int command_id) const OVERRIDE; - virtual string16 GetLabelForCommandId(int command_id) const OVERRIDE; + virtual base::string16 GetLabelForCommandId(int command_id) const OVERRIDE; virtual bool IsCommandIdChecked(int command_id) const OVERRIDE; virtual bool IsCommandIdEnabled(int command_id) const OVERRIDE; virtual bool GetAcceleratorForCommandId( diff --git a/chrome/browser/ui/app_list/app_list_controller_browsertest.cc b/chrome/browser/ui/app_list/app_list_controller_browsertest.cc index 7aad320..d61e9b0 100644 --- a/chrome/browser/ui/app_list/app_list_controller_browsertest.cc +++ b/chrome/browser/ui/app_list/app_list_controller_browsertest.cc @@ -67,7 +67,7 @@ class AppListControllerBrowserTest : public InProcessBrowserTest { temp_profile_dir, base::Bind(&AppListControllerBrowserTest::OnProfileCreated, this), - string16(), string16(), std::string()); + base::string16(), base::string16(), std::string()); content::RunMessageLoop(); // Will stop in OnProfileCreated(). } diff --git a/chrome/browser/ui/app_list/chrome_signin_delegate.h b/chrome/browser/ui/app_list/chrome_signin_delegate.h index 71e9a62..4f263ec 100644 --- a/chrome/browser/ui/app_list/chrome_signin_delegate.h +++ b/chrome/browser/ui/app_list/chrome_signin_delegate.h @@ -23,11 +23,11 @@ class ChromeSigninDelegate : public app_list::SigninDelegate { virtual void ShowSignin() OVERRIDE; virtual void OpenLearnMore() OVERRIDE; virtual void OpenSettings() OVERRIDE; - virtual string16 GetSigninHeading() OVERRIDE; - virtual string16 GetSigninText() OVERRIDE; - virtual string16 GetSigninButtonText() OVERRIDE; - virtual string16 GetLearnMoreLinkText() OVERRIDE; - virtual string16 GetSettingsLinkText() OVERRIDE; + virtual base::string16 GetSigninHeading() OVERRIDE; + virtual base::string16 GetSigninText() OVERRIDE; + virtual base::string16 GetSigninButtonText() OVERRIDE; + virtual base::string16 GetLearnMoreLinkText() OVERRIDE; + virtual base::string16 GetSettingsLinkText() OVERRIDE; Profile* profile_; diff --git a/chrome/browser/ui/app_list/search/app_search_provider.cc b/chrome/browser/ui/app_list/search/app_search_provider.cc index c7fc5f0..329455e 100644 --- a/chrome/browser/ui/app_list/search/app_search_provider.cc +++ b/chrome/browser/ui/app_list/search/app_search_provider.cc @@ -52,7 +52,7 @@ AppSearchProvider::AppSearchProvider( AppSearchProvider::~AppSearchProvider() {} -void AppSearchProvider::Start(const string16& query) { +void AppSearchProvider::Start(const base::string16& query) { const TokenizedString query_terms(query); ClearResults(); diff --git a/chrome/browser/ui/app_list/search/common/webservice_search_provider.cc b/chrome/browser/ui/app_list/search/common/webservice_search_provider.cc index 2b77874..d3fb5b1 100644 --- a/chrome/browser/ui/app_list/search/common/webservice_search_provider.cc +++ b/chrome/browser/ui/app_list/search/common/webservice_search_provider.cc @@ -44,7 +44,7 @@ void WebserviceSearchProvider::StartThrottledQuery( last_keytyped_ = base::Time::Now(); } -bool WebserviceSearchProvider::IsValidQuery(const string16& query) { +bool WebserviceSearchProvider::IsValidQuery(const base::string16& query) { // If |query| contains sensitive data, bail out and do not create the place // holder "search-web-store" result. if (IsSensitiveInput(query) || @@ -58,7 +58,7 @@ bool WebserviceSearchProvider::IsValidQuery(const string16& query) { // Returns whether or not the user's input string, |query|, might contain any // sensitive information, based purely on its value and not where it came from. -bool WebserviceSearchProvider::IsSensitiveInput(const string16& query) { +bool WebserviceSearchProvider::IsSensitiveInput(const base::string16& query) { const GURL query_as_url(query); if (!query_as_url.is_valid()) return false; diff --git a/chrome/browser/ui/app_list/search/common/webservice_search_provider.h b/chrome/browser/ui/app_list/search/common/webservice_search_provider.h index 5aa45db..4e3ce06 100644 --- a/chrome/browser/ui/app_list/search/common/webservice_search_provider.h +++ b/chrome/browser/ui/app_list/search/common/webservice_search_provider.h @@ -25,7 +25,7 @@ class WebserviceSearchProvider : public SearchProvider { virtual ~WebserviceSearchProvider(); // Validate the query for privacy and size. - bool IsValidQuery(const string16& query); + bool IsValidQuery(const base::string16& query); // Start a query with throttling enabled. void StartThrottledQuery(const base::Closure& start_query); @@ -37,7 +37,7 @@ class WebserviceSearchProvider : public SearchProvider { WebserviceCache* cache_; // BrowserContextKeyedService, not owned. private: - bool IsSensitiveInput(const string16& query); + bool IsSensitiveInput(const base::string16& query); // The timestamp when the last key event happened. base::Time last_keytyped_; diff --git a/chrome/browser/ui/app_list/search/mixer_unittest.cc b/chrome/browser/ui/app_list/search/mixer_unittest.cc index 7680ca0..98fa049 100644 --- a/chrome/browser/ui/app_list/search/mixer_unittest.cc +++ b/chrome/browser/ui/app_list/search/mixer_unittest.cc @@ -50,7 +50,7 @@ class TestSearchProvider : public SearchProvider { virtual ~TestSearchProvider() {} // SearchProvider overrides: - virtual void Start(const string16& query) OVERRIDE { + virtual void Start(const base::string16& query) OVERRIDE { ClearResults(); for (size_t i = 0; i < count_; ++i) { const std::string id = @@ -95,7 +95,7 @@ class MixerTest : public testing::Test { } void RunQuery() { - const string16 query; + const base::string16 query; for (size_t i = 0; i < providers_.size(); ++i) { providers_[i]->Start(query); diff --git a/chrome/browser/ui/app_list/search/omnibox_provider.cc b/chrome/browser/ui/app_list/search/omnibox_provider.cc index 18656b6..4ca991c 100644 --- a/chrome/browser/ui/app_list/search/omnibox_provider.cc +++ b/chrome/browser/ui/app_list/search/omnibox_provider.cc @@ -32,7 +32,7 @@ int ACMatchStyleToTagStyle(int styles) { // Translates ACMatchClassifications into SearchResult tags. void ACMatchClassificationsToTags( - const string16& text, + const base::string16& text, const ACMatchClassifications& text_classes, SearchResult::Tags* tags) { int tag_styles = SearchResult::Tag::NONE; diff --git a/chrome/browser/ui/app_list/search/search_controller.cc b/chrome/browser/ui/app_list/search/search_controller.cc index ce48663..2431e20 100644 --- a/chrome/browser/ui/app_list/search/search_controller.cc +++ b/chrome/browser/ui/app_list/search/search_controller.cc @@ -85,7 +85,7 @@ void SearchController::Init() { void SearchController::Start() { Stop(); - string16 query; + base::string16 query; TrimWhitespace(search_box_->text(), TRIM_ALL, &query); dispatching_query_ = true; diff --git a/chrome/browser/ui/app_list/search/term_break_iterator.cc b/chrome/browser/ui/app_list/search/term_break_iterator.cc index 1349683..5c7d44d 100644 --- a/chrome/browser/ui/app_list/search/term_break_iterator.cc +++ b/chrome/browser/ui/app_list/search/term_break_iterator.cc @@ -11,7 +11,7 @@ namespace app_list { -TermBreakIterator::TermBreakIterator(const string16& word) +TermBreakIterator::TermBreakIterator(const base::string16& word) : word_(word), prev_(npos), pos_(0), @@ -48,7 +48,7 @@ bool TermBreakIterator::Advance() { return prev_ != pos_ || !iter_->end(); } -const string16 TermBreakIterator::GetCurrentTerm() const { +const base::string16 TermBreakIterator::GetCurrentTerm() const { DCHECK(prev_ != npos && pos_ != npos); return word_.substr(prev_, pos_ - prev_); } diff --git a/chrome/browser/ui/app_list/search/term_break_iterator.h b/chrome/browser/ui/app_list/search/term_break_iterator.h index eb1bf6a..3a88cf9 100644 --- a/chrome/browser/ui/app_list/search/term_break_iterator.h +++ b/chrome/browser/ui/app_list/search/term_break_iterator.h @@ -26,7 +26,7 @@ namespace app_list { class TermBreakIterator { public: // Note that |word| must out live this iterator. - explicit TermBreakIterator(const string16& word); + explicit TermBreakIterator(const base::string16& word); ~TermBreakIterator(); // Advance to the next term. Returns false if at the end of the word. @@ -34,7 +34,7 @@ class TermBreakIterator { // Returns the current term, which is the substr of |word_| in range // [prev_, pos_). - const string16 GetCurrentTerm() const; + const base::string16 GetCurrentTerm() const; size_t prev() const { return prev_; } size_t pos() const { return pos_; } @@ -54,7 +54,7 @@ class TermBreakIterator { // Returns new state for given |ch|. State GetNewState(char16 ch); - const string16& word_; + const base::string16& word_; size_t prev_; size_t pos_; diff --git a/chrome/browser/ui/app_list/search/term_break_iterator_unittest.cc b/chrome/browser/ui/app_list/search/term_break_iterator_unittest.cc index 05d0cc0..fbd298f 100644 --- a/chrome/browser/ui/app_list/search/term_break_iterator_unittest.cc +++ b/chrome/browser/ui/app_list/search/term_break_iterator_unittest.cc @@ -11,13 +11,13 @@ namespace app_list { namespace test { TEST(TermBreakIteratorTest, EmptyWord) { - string16 empty; + base::string16 empty; TermBreakIterator iter(empty); EXPECT_FALSE(iter.Advance()); } TEST(TermBreakIteratorTest, Simple) { - string16 word(UTF8ToUTF16("simple")); + base::string16 word(UTF8ToUTF16("simple")); TermBreakIterator iter(word); EXPECT_TRUE(iter.Advance()); EXPECT_EQ(UTF8ToUTF16("simple"), iter.GetCurrentTerm()); @@ -25,7 +25,7 @@ TEST(TermBreakIteratorTest, Simple) { } TEST(TermBreakIteratorTest, CamelCase) { - string16 word(UTF8ToUTF16("CamelCase")); + base::string16 word(UTF8ToUTF16("CamelCase")); TermBreakIterator iter(word); EXPECT_TRUE(iter.Advance()); EXPECT_EQ(UTF8ToUTF16("Camel"), iter.GetCurrentTerm()); @@ -35,7 +35,7 @@ TEST(TermBreakIteratorTest, CamelCase) { } TEST(TermBreakIteratorTest, LowerToUpper) { - string16 word(UTF8ToUTF16("lowerToUpper")); + base::string16 word(UTF8ToUTF16("lowerToUpper")); TermBreakIterator iter(word); EXPECT_TRUE(iter.Advance()); EXPECT_EQ(UTF8ToUTF16("lower"), iter.GetCurrentTerm()); @@ -47,7 +47,7 @@ TEST(TermBreakIteratorTest, LowerToUpper) { } TEST(TermBreakIteratorTest, AlphaNumber) { - string16 word(UTF8ToUTF16("Chromium26.0.0.0")); + base::string16 word(UTF8ToUTF16("Chromium26.0.0.0")); TermBreakIterator iter(word); EXPECT_TRUE(iter.Advance()); EXPECT_EQ(UTF8ToUTF16("Chromium"), iter.GetCurrentTerm()); @@ -57,7 +57,7 @@ TEST(TermBreakIteratorTest, AlphaNumber) { } TEST(TermBreakIteratorTest, StartsWithNumber) { - string16 word(UTF8ToUTF16("123startWithNumber")); + base::string16 word(UTF8ToUTF16("123startWithNumber")); TermBreakIterator iter(word); EXPECT_TRUE(iter.Advance()); EXPECT_EQ(UTF8ToUTF16("123"), iter.GetCurrentTerm()); @@ -72,7 +72,7 @@ TEST(TermBreakIteratorTest, StartsWithNumber) { TEST(TermBreakIteratorTest, CaseAndNoCase) { // "English" + two Chinese chars U+4E2D U+6587 + "Word" - string16 word(UTF8ToUTF16("English\xe4\xb8\xad\xe6\x96\x87Word")); + base::string16 word(UTF8ToUTF16("English\xe4\xb8\xad\xe6\x96\x87Word")); TermBreakIterator iter(word); EXPECT_TRUE(iter.Advance()); EXPECT_EQ(UTF8ToUTF16("English"), iter.GetCurrentTerm()); diff --git a/chrome/browser/ui/app_list/search/tokenized_string.cc b/chrome/browser/ui/app_list/search/tokenized_string.cc index 6769e2d..d2a0027 100644 --- a/chrome/browser/ui/app_list/search/tokenized_string.cc +++ b/chrome/browser/ui/app_list/search/tokenized_string.cc @@ -13,7 +13,7 @@ using base::i18n::BreakIterator; namespace app_list { -TokenizedString::TokenizedString(const string16& text) +TokenizedString::TokenizedString(const base::string16& text) : text_(text) { Tokenize(); } @@ -28,7 +28,7 @@ void TokenizedString::Tokenize() { if (!break_iter.IsWord()) continue; - const string16 word(break_iter.GetString()); + const base::string16 word(break_iter.GetString()); const size_t word_start = break_iter.prev(); TermBreakIterator term_iter(word); while (term_iter.Advance()) { diff --git a/chrome/browser/ui/app_list/search/tokenized_string.h b/chrome/browser/ui/app_list/search/tokenized_string.h index 08ba723..94d4e53 100644 --- a/chrome/browser/ui/app_list/search/tokenized_string.h +++ b/chrome/browser/ui/app_list/search/tokenized_string.h @@ -21,10 +21,10 @@ class TokenizedString { typedef std::vector<string16> Tokens; typedef std::vector<gfx::Range> Mappings; - explicit TokenizedString(const string16& text); + explicit TokenizedString(const base::string16& text); ~TokenizedString(); - const string16& text() const { return text_; } + const base::string16& text() const { return text_; } const Tokens& tokens() const { return tokens_; } const Mappings& mappings() const { return mappings_; } @@ -32,7 +32,7 @@ class TokenizedString { void Tokenize(); // Input text. - const string16 text_; + const base::string16 text_; // Broken down tokens and the index mapping of tokens in original string. Tokens tokens_; diff --git a/chrome/browser/ui/app_list/search/tokenized_string_match.cc b/chrome/browser/ui/app_list/search/tokenized_string_match.cc index 5a68af6..8190b90 100644 --- a/chrome/browser/ui/app_list/search/tokenized_string_match.cc +++ b/chrome/browser/ui/app_list/search/tokenized_string_match.cc @@ -95,8 +95,8 @@ bool TokenizedStringMatch::Calculate(const TokenizedString& query, return relevance_ > kNoMatchScore; } -bool TokenizedStringMatch::Calculate(const string16& query, - const string16& text) { +bool TokenizedStringMatch::Calculate(const base::string16& query, + const base::string16& text) { const TokenizedString tokenized_query(query); const TokenizedString tokenized_text(text); return Calculate(tokenized_query, tokenized_text); diff --git a/chrome/browser/ui/app_list/search/tokenized_string_match.h b/chrome/browser/ui/app_list/search/tokenized_string_match.h index 9f22392..99b84da 100644 --- a/chrome/browser/ui/app_list/search/tokenized_string_match.h +++ b/chrome/browser/ui/app_list/search/tokenized_string_match.h @@ -33,7 +33,7 @@ class TokenizedStringMatch { bool Calculate(const TokenizedString& query, const TokenizedString& text); // Convenience wrapper to calculate match from raw string input. - bool Calculate(const string16& query, const string16& text); + bool Calculate(const base::string16& query, const base::string16& text); double relevance() const { return relevance_; } const Hits& hits() const { return hits_; } diff --git a/chrome/browser/ui/app_list/search/tokenized_string_match_unittest.cc b/chrome/browser/ui/app_list/search/tokenized_string_match_unittest.cc index af595bb..b167a29 100644 --- a/chrome/browser/ui/app_list/search/tokenized_string_match_unittest.cc +++ b/chrome/browser/ui/app_list/search/tokenized_string_match_unittest.cc @@ -14,9 +14,9 @@ namespace test { // Returns a string of |text| marked the hits in |match| using block bracket. // e.g. text= "Text", hits = [{0,1}], returns "[T]ext". -std::string MatchHit(const string16& text, +std::string MatchHit(const base::string16& text, const TokenizedStringMatch& match) { - string16 marked = text; + base::string16 marked = text; const TokenizedStringMatch::Hits& hits = match.hits(); for (TokenizedStringMatch::Hits::const_reverse_iterator it = hits.rbegin(); @@ -44,7 +44,7 @@ TEST(TokenizedStringMatchTest, NotMatch) { TokenizedStringMatch match; for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kTestCases); ++i) { - const string16 text(UTF8ToUTF16(kTestCases[i].text)); + const base::string16 text(UTF8ToUTF16(kTestCases[i].text)); EXPECT_FALSE(match.Calculate(UTF8ToUTF16(kTestCases[i].query), text)) << "Test case " << i << " : text=" << kTestCases[i].text @@ -70,7 +70,7 @@ TEST(TokenizedStringMatchTest, Match) { TokenizedStringMatch match; for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kTestCases); ++i) { - const string16 text(UTF8ToUTF16(kTestCases[i].text)); + const base::string16 text(UTF8ToUTF16(kTestCases[i].text)); EXPECT_TRUE(match.Calculate(UTF8ToUTF16(kTestCases[i].query), text)); EXPECT_EQ(kTestCases[i].expect, MatchHit(text, match)); } @@ -98,7 +98,7 @@ TEST(TokenizedStringMatchTest, Relevance) { TokenizedStringMatch match_low; TokenizedStringMatch match_high; for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kTestCases); ++i) { - const string16 text(UTF8ToUTF16(kTestCases[i].text)); + const base::string16 text(UTF8ToUTF16(kTestCases[i].text)); EXPECT_TRUE( match_low.Calculate(UTF8ToUTF16(kTestCases[i].query_low), text)); EXPECT_TRUE( diff --git a/chrome/browser/ui/app_list/search/tokenized_string_unittest.cc b/chrome/browser/ui/app_list/search/tokenized_string_unittest.cc index dfccfce..4825834 100644 --- a/chrome/browser/ui/app_list/search/tokenized_string_unittest.cc +++ b/chrome/browser/ui/app_list/search/tokenized_string_unittest.cc @@ -16,7 +16,7 @@ string16 GetContent(const TokenizedString& tokenized) { const TokenizedString::Tokens& tokens = tokenized.tokens(); const TokenizedString::Mappings& mappings = tokenized.mappings(); - string16 str; + base::string16 str; for (size_t i = 0; i < tokens.size(); ++i) { if (i > 0) str += ' '; @@ -29,56 +29,56 @@ string16 GetContent(const TokenizedString& tokenized) { } // namespace TEST(TokenizedStringTest, Empty) { - string16 empty; + base::string16 empty; TokenizedString tokens(empty); EXPECT_EQ(string16(), GetContent(tokens)); } TEST(TokenizedStringTest, Basic) { { - string16 text(UTF8ToUTF16("ScratchPad")); + base::string16 text(UTF8ToUTF16("ScratchPad")); TokenizedString tokens(text); EXPECT_EQ(UTF8ToUTF16("scratch{0,7} pad{7,10}"), GetContent(tokens)); } { - string16 text(UTF8ToUTF16("Chess2.0")); + base::string16 text(UTF8ToUTF16("Chess2.0")); TokenizedString tokens(text); EXPECT_EQ(UTF8ToUTF16("chess{0,5} 2.0{5,8}"), GetContent(tokens)); } { - string16 text(UTF8ToUTF16("Cut the rope")); + base::string16 text(UTF8ToUTF16("Cut the rope")); TokenizedString tokens(text); EXPECT_EQ(UTF8ToUTF16("cut{0,3} the{4,7} rope{8,12}"), GetContent(tokens)); } { - string16 text(UTF8ToUTF16("AutoCAD WS")); + base::string16 text(UTF8ToUTF16("AutoCAD WS")); TokenizedString tokens(text); EXPECT_EQ(UTF8ToUTF16("auto{0,4} cad{4,7} ws{8,10}"), GetContent(tokens)); } { - string16 text(UTF8ToUTF16("Great TweetDeck")); + base::string16 text(UTF8ToUTF16("Great TweetDeck")); TokenizedString tokens(text); EXPECT_EQ(UTF8ToUTF16("great{0,5} tweet{6,11} deck{11,15}"), GetContent(tokens)); } { - string16 text(UTF8ToUTF16("Draw-It!")); + base::string16 text(UTF8ToUTF16("Draw-It!")); TokenizedString tokens(text); EXPECT_EQ(UTF8ToUTF16("draw{0,4} it{5,7}"), GetContent(tokens)); } { - string16 text(UTF8ToUTF16("Faxing & Signing")); + base::string16 text(UTF8ToUTF16("Faxing & Signing")); TokenizedString tokens(text); EXPECT_EQ(UTF8ToUTF16("faxing{0,6} signing{9,16}"), GetContent(tokens)); } { - string16 text(UTF8ToUTF16("!@#$%^&*()<<<**>>>")); + base::string16 text(UTF8ToUTF16("!@#$%^&*()<<<**>>>")); TokenizedString tokens(text); EXPECT_EQ(UTF8ToUTF16(""), GetContent(tokens)); diff --git a/chrome/browser/ui/apps/app_metro_infobar_delegate_win.h b/chrome/browser/ui/apps/app_metro_infobar_delegate_win.h index 03a384f..a38396e 100644 --- a/chrome/browser/ui/apps/app_metro_infobar_delegate_win.h +++ b/chrome/browser/ui/apps/app_metro_infobar_delegate_win.h @@ -34,11 +34,11 @@ class AppMetroInfoBarDelegateWin : public ConfirmInfoBarDelegate { // ConfirmInfoBarDelegate overrides: virtual int GetIconID() const OVERRIDE; - virtual string16 GetMessageText() const OVERRIDE; - virtual string16 GetButtonLabel(InfoBarButton button) const OVERRIDE; + virtual base::string16 GetMessageText() const OVERRIDE; + virtual base::string16 GetButtonLabel(InfoBarButton button) const OVERRIDE; virtual bool Accept() OVERRIDE; virtual bool Cancel() OVERRIDE; - virtual string16 GetLinkText() const OVERRIDE; + virtual base::string16 GetLinkText() const OVERRIDE; virtual bool LinkClicked(WindowOpenDisposition disposition) OVERRIDE; Mode mode_; diff --git a/chrome/browser/ui/apps/directory_access_confirmation_dialog.cc b/chrome/browser/ui/apps/directory_access_confirmation_dialog.cc index d8c51a5..905e734 100644 --- a/chrome/browser/ui/apps/directory_access_confirmation_dialog.cc +++ b/chrome/browser/ui/apps/directory_access_confirmation_dialog.cc @@ -16,15 +16,15 @@ namespace { class DirectoryAccessConfirmationDialog : public TabModalConfirmDialogDelegate { public: DirectoryAccessConfirmationDialog(bool writable, - const string16& app_name, + const base::string16& app_name, content::WebContents* web_contents, const base::Closure& on_accept, const base::Closure& on_cancel); - virtual string16 GetTitle() OVERRIDE; - virtual string16 GetMessage() OVERRIDE; - virtual string16 GetAcceptButtonTitle() OVERRIDE; - virtual string16 GetCancelButtonTitle() OVERRIDE; + virtual base::string16 GetTitle() OVERRIDE; + virtual base::string16 GetMessage() OVERRIDE; + virtual base::string16 GetAcceptButtonTitle() OVERRIDE; + virtual base::string16 GetCancelButtonTitle() OVERRIDE; private: virtual void OnAccepted() OVERRIDE; @@ -34,12 +34,12 @@ class DirectoryAccessConfirmationDialog : public TabModalConfirmDialogDelegate { const base::Closure on_accept_; const base::Closure on_cancel_; const bool writable_; - const string16 app_name_; + const base::string16 app_name_; }; DirectoryAccessConfirmationDialog::DirectoryAccessConfirmationDialog( bool writable, - const string16& app_name, + const base::string16& app_name, content::WebContents* web_contents, const base::Closure& on_accept, const base::Closure& on_cancel) @@ -88,7 +88,7 @@ void DirectoryAccessConfirmationDialog::OnClosed() { } // namespace void CreateDirectoryAccessConfirmationDialog(bool writable, - const string16& app_name, + const base::string16& app_name, content::WebContents* web_contents, const base::Closure& on_accept, const base::Closure& on_cancel) { diff --git a/chrome/browser/ui/apps/directory_access_confirmation_dialog.h b/chrome/browser/ui/apps/directory_access_confirmation_dialog.h index 7d7c2ec..c0a40b6 100644 --- a/chrome/browser/ui/apps/directory_access_confirmation_dialog.h +++ b/chrome/browser/ui/apps/directory_access_confirmation_dialog.h @@ -13,7 +13,7 @@ class WebContents; } void CreateDirectoryAccessConfirmationDialog(bool writable, - const string16& app_name, + const base::string16& app_name, content::WebContents* web_contents, const base::Closure& on_accept, const base::Closure& on_cancel); diff --git a/chrome/browser/ui/aura/chrome_browser_main_extra_parts_aura.cc b/chrome/browser/ui/aura/chrome_browser_main_extra_parts_aura.cc index bbe4c89..b72fd14 100644 --- a/chrome/browser/ui/aura/chrome_browser_main_extra_parts_aura.cc +++ b/chrome/browser/ui/aura/chrome_browser_main_extra_parts_aura.cc @@ -111,10 +111,10 @@ void ChromeBrowserMainExtraPartsAura::DetectRunningAsRoot() { if (command_line.HasSwitch(switches::kUserDataDir)) return; - string16 title = l10n_util::GetStringFUTF16( + base::string16 title = l10n_util::GetStringFUTF16( IDS_REFUSE_TO_RUN_AS_ROOT, l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)); - string16 message = l10n_util::GetStringFUTF16( + base::string16 message = l10n_util::GetStringFUTF16( IDS_REFUSE_TO_RUN_AS_ROOT_2, l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)); diff --git a/chrome/browser/ui/bookmarks/bookmark_browsertest.cc b/chrome/browser/ui/bookmarks/bookmark_browsertest.cc index 1ccb329..040be54 100644 --- a/chrome/browser/ui/bookmarks/bookmark_browsertest.cc +++ b/chrome/browser/ui/bookmarks/bookmark_browsertest.cc @@ -108,7 +108,8 @@ IN_PROC_BROWSER_TEST_F(BookmarkBrowsertest, DISABLED_MultiProfile) { ui_test_utils::BrowserAddedObserver observer; g_browser_process->profile_manager()->CreateMultiProfileAsync( - string16(), string16(), ProfileManager::CreateCallback(), std::string()); + base::string16(), base::string16(), ProfileManager::CreateCallback(), + std::string()); Browser* browser2 = observer.WaitForSingleNewBrowser(); BookmarkModel* bookmark_model2 = WaitForBookmarkModel(browser2->profile()); diff --git a/chrome/browser/ui/bookmarks/bookmark_context_menu_controller.cc b/chrome/browser/ui/bookmarks/bookmark_context_menu_controller.cc index e8e9caa..cb3b50f 100644 --- a/chrome/browser/ui/bookmarks/bookmark_context_menu_controller.cc +++ b/chrome/browser/ui/bookmarks/bookmark_context_menu_controller.cc @@ -213,7 +213,7 @@ void BookmarkContextMenuController::ExecuteCommand(int id, int event_flags) { const BookmarkNode* parent = bookmark_utils::GetParentForNewNodes(parent_, selection_, &index); GURL url; - string16 title; + base::string16 title; chrome::GetURLAndTitleToBookmark( browser_->tab_strip_model()->GetActiveWebContents(), &url, &title); diff --git a/chrome/browser/ui/bookmarks/bookmark_editor.cc b/chrome/browser/ui/bookmarks/bookmark_editor.cc index 7338c91..b8af440 100644 --- a/chrome/browser/ui/bookmarks/bookmark_editor.cc +++ b/chrome/browser/ui/bookmarks/bookmark_editor.cc @@ -99,7 +99,7 @@ BookmarkEditor::EditDetails BookmarkEditor::EditDetails::AddNodeInFolder( const BookmarkNode* parent_node, int index, const GURL& url, - const string16& title) { + const base::string16& title) { EditDetails details(NEW_URL); details.parent_node = parent_node; details.index = index; diff --git a/chrome/browser/ui/bookmarks/bookmark_editor.h b/chrome/browser/ui/bookmarks/bookmark_editor.h index 75f0f9b..782720d 100644 --- a/chrome/browser/ui/bookmarks/bookmark_editor.h +++ b/chrome/browser/ui/bookmarks/bookmark_editor.h @@ -45,7 +45,7 @@ class BookmarkEditor { static EditDetails AddNodeInFolder(const BookmarkNode* parent_node, int index, const GURL& url, - const string16& title); + const base::string16& title); // Returns an EditDetails instance for the user adding a folder within a // given parent node with a specified index. @@ -85,11 +85,11 @@ class BookmarkEditor { // If type == NEW_URL this gives the URL/title. GURL url; - string16 title; + base::string16 title; // If type == NEW_FOLDER, this is the urls/title pairs to add to the // folder. - std::vector<std::pair<GURL, string16> > urls; + std::vector<std::pair<GURL, base::string16> > urls; private: explicit EditDetails(Type node_type); diff --git a/chrome/browser/ui/bookmarks/bookmark_utils.cc b/chrome/browser/ui/bookmarks/bookmark_utils.cc index f5b760b..4492aa2 100644 --- a/chrome/browser/ui/bookmarks/bookmark_utils.cc +++ b/chrome/browser/ui/bookmarks/bookmark_utils.cc @@ -131,9 +131,9 @@ int ChildURLCountTotal(const BookmarkNode* node) { // Returns in |urls|, the url and title pairs for each open tab in browser. void GetURLsForOpenTabs(Browser* browser, - std::vector<std::pair<GURL, string16> >* urls) { + std::vector<std::pair<GURL, base::string16> >* urls) { for (int i = 0; i < browser->tab_strip_model()->count(); ++i) { - std::pair<GURL, string16> entry; + std::pair<GURL, base::string16> entry; GetURLAndTitleToBookmark(browser->tab_strip_model()->GetWebContentsAt(i), &(entry.first), &(entry.second)); urls->push_back(entry); @@ -244,7 +244,7 @@ GURL GetURLToBookmark(content::WebContents* web_contents) { void GetURLAndTitleToBookmark(content::WebContents* web_contents, GURL* url, - string16* title) { + base::string16* title) { *url = GetURLToBookmark(web_contents); *title = web_contents->GetTitle(); } diff --git a/chrome/browser/ui/bookmarks/bookmark_utils.h b/chrome/browser/ui/bookmarks/bookmark_utils.h index 8cd9abb..e9a6168 100644 --- a/chrome/browser/ui/bookmarks/bookmark_utils.h +++ b/chrome/browser/ui/bookmarks/bookmark_utils.h @@ -78,7 +78,7 @@ GURL GetURLToBookmark(content::WebContents* web_contents); // Fills in the URL and title for a bookmark of |web_contents|. void GetURLAndTitleToBookmark(content::WebContents* web_contents, GURL* url, - string16* title); + base::string16* title); // Toggles whether the bookmark bar is shown only on the new tab page or on // all tabs. This is a preference modifier, not a visual modifier. diff --git a/chrome/browser/ui/bookmarks/recently_used_folders_combo_model.cc b/chrome/browser/ui/bookmarks/recently_used_folders_combo_model.cc index 88df062..4dc69e8 100644 --- a/chrome/browser/ui/bookmarks/recently_used_folders_combo_model.cc +++ b/chrome/browser/ui/bookmarks/recently_used_folders_combo_model.cc @@ -107,13 +107,13 @@ string16 RecentlyUsedFoldersComboModel::GetItemAt(int index) { case Item::TYPE_SEPARATOR: // This function should not be called for separators. NOTREACHED(); - return string16(); + return base::string16(); case Item::TYPE_CHOOSE_ANOTHER_FOLDER: return l10n_util::GetStringUTF16( IDS_BOOKMARK_BUBBLE_CHOOSER_ANOTHER_FOLDER); } NOTREACHED(); - return string16(); + return base::string16(); } bool RecentlyUsedFoldersComboModel::IsItemSeparatorAt(int index) { diff --git a/chrome/browser/ui/bookmarks/recently_used_folders_combo_model.h b/chrome/browser/ui/bookmarks/recently_used_folders_combo_model.h index a04f886..dab2808 100644 --- a/chrome/browser/ui/bookmarks/recently_used_folders_combo_model.h +++ b/chrome/browser/ui/bookmarks/recently_used_folders_combo_model.h @@ -29,7 +29,7 @@ class RecentlyUsedFoldersComboModel // Overridden from ui::ComboboxModel: virtual int GetItemCount() const OVERRIDE; - virtual string16 GetItemAt(int index) OVERRIDE; + virtual base::string16 GetItemAt(int index) OVERRIDE; virtual bool IsItemSeparatorAt(int index) OVERRIDE; virtual int GetDefaultIndex() const OVERRIDE; virtual void AddObserver(ui::ComboboxModelObserver* observer) OVERRIDE; diff --git a/chrome/browser/ui/browser_browsertest.cc b/chrome/browser/ui/browser_browsertest.cc index 618de84..e69c802 100644 --- a/chrome/browser/ui/browser_browsertest.cc +++ b/chrome/browser/ui/browser_browsertest.cc @@ -122,7 +122,7 @@ const base::FilePath::CharType kDocRoot[] = FILE_PATH_LITERAL("chrome/test/data"); // Given a page title, returns the expected window caption string. -string16 WindowCaptionFromPageTitle(const string16& page_title) { +string16 WindowCaptionFromPageTitle(const base::string16& page_title) { #if defined(OS_MACOSX) || defined(OS_CHROMEOS) // On Mac or ChromeOS, we don't want to suffix the page title with // the application name. @@ -333,8 +333,9 @@ class BrowserTest : public ExtensionBrowserTest { protected: // In RTL locales wrap the page title with RTL embedding characters so that it // matches the value returned by GetWindowTitle(). - string16 LocaleWindowCaptionFromPageTitle(const string16& expected_title) { - string16 page_title = WindowCaptionFromPageTitle(expected_title); + base::string16 LocaleWindowCaptionFromPageTitle( + const base::string16& expected_title) { + base::string16 page_title = WindowCaptionFromPageTitle(expected_title); #if defined(OS_WIN) std::string locale = g_browser_process->GetApplicationLocale(); if (base::i18n::GetTextDirectionForLocale(locale.c_str()) == @@ -378,7 +379,7 @@ IN_PROC_BROWSER_TEST_F(BrowserTest, NoTitle) { base::FilePath(kTitle1File))); EXPECT_EQ(LocaleWindowCaptionFromPageTitle(ASCIIToUTF16("title1.html")), browser()->GetWindowTitleForCurrentTab()); - string16 tab_title; + base::string16 tab_title; ASSERT_TRUE(ui_test_utils::GetCurrentTabTitle(browser(), &tab_title)); EXPECT_EQ(ASCIIToUTF16("title1.html"), tab_title); } @@ -396,10 +397,10 @@ IN_PROC_BROWSER_TEST_F(BrowserTest, Title) { browser(), ui_test_utils::GetTestUrl( base::FilePath(base::FilePath::kCurrentDirectory), base::FilePath(kTitle2File))); - const string16 test_title(ASCIIToUTF16("Title Of Awesomeness")); + const base::string16 test_title(ASCIIToUTF16("Title Of Awesomeness")); EXPECT_EQ(LocaleWindowCaptionFromPageTitle(test_title), browser()->GetWindowTitleForCurrentTab()); - string16 tab_title; + base::string16 tab_title; ASSERT_TRUE(ui_test_utils::GetCurrentTabTitle(browser(), &tab_title)); EXPECT_EQ(test_title, tab_title); } @@ -414,7 +415,7 @@ IN_PROC_BROWSER_TEST_F(BrowserTest, JavascriptAlertActivatesTab) { WebContents* second_tab = browser()->tab_strip_model()->GetWebContentsAt(1); ASSERT_TRUE(second_tab); second_tab->GetRenderViewHost()->ExecuteJavascriptInWebFrame( - string16(), + base::string16(), ASCIIToUTF16("alert('Activate!');")); AppModalDialog* alert = ui_test_utils::WaitForAppModalDialog(); alert->CloseModalDialog(); @@ -477,7 +478,7 @@ IN_PROC_BROWSER_TEST_F(BrowserTest, CrossProcessNavCancelsDialogs) { // See http://crbug.com/312490. WebContents* contents = browser()->tab_strip_model()->GetActiveWebContents(); contents->GetRenderViewHost()->ExecuteJavascriptInWebFrame( - string16(), + base::string16(), ASCIIToUTF16("alert('one'); alert('two');")); AppModalDialog* alert = ui_test_utils::WaitForAppModalDialog(); EXPECT_TRUE(alert->IsValid()); @@ -1774,7 +1775,7 @@ IN_PROC_BROWSER_TEST_F(BrowserTest, InterstitialClosesDialogs) { WebContents* contents = browser()->tab_strip_model()->GetActiveWebContents(); contents->GetRenderViewHost()->ExecuteJavascriptInWebFrame( - string16(), + base::string16(), ASCIIToUTF16("alert('Dialog showing!');")); AppModalDialog* alert = ui_test_utils::WaitForAppModalDialog(); EXPECT_TRUE(alert->IsValid()); @@ -1979,7 +1980,7 @@ IN_PROC_BROWSER_TEST_F(BrowserTest, WindowOpenClose) { GURL url = ui_test_utils::GetTestUrl( base::FilePath(), base::FilePath().AppendASCII("window.close.html")); - string16 title = ASCIIToUTF16("Title Of Awesomeness"); + base::string16 title = ASCIIToUTF16("Title Of Awesomeness"); content::TitleWatcher title_watcher( browser()->tab_strip_model()->GetActiveWebContents(), title); ui_test_utils::NavigateToURLBlockUntilNavigationsComplete(browser(), url, 2); @@ -2029,7 +2030,7 @@ IN_PROC_BROWSER_TEST_F(ShowModalDialogTest, BasicTest) { GURL url = ui_test_utils::GetTestUrl( base::FilePath(), base::FilePath().AppendASCII("showmodaldialog.html")); - string16 expected_title(ASCIIToUTF16("SUCCESS")); + base::string16 expected_title(ASCIIToUTF16("SUCCESS")); content::TitleWatcher title_watcher( browser()->tab_strip_model()->GetActiveWebContents(), expected_title); ui_test_utils::NavigateToURL(browser(), url); @@ -2043,7 +2044,7 @@ IN_PROC_BROWSER_TEST_F(BrowserTest, DisallowFileUrlUniversalAccessTest) { base::FilePath(), base::FilePath().AppendASCII("fileurl_universalaccess.html")); - string16 expected_title(ASCIIToUTF16("Disallowed")); + base::string16 expected_title(ASCIIToUTF16("Disallowed")); content::TitleWatcher title_watcher( browser()->tab_strip_model()->GetActiveWebContents(), expected_title); title_watcher.AlsoWaitForTitle(ASCIIToUTF16("Allowed")); @@ -2249,11 +2250,11 @@ class ClickModifierTest : public InProcessBrowserTest { base::FilePath(FILE_PATH_LITERAL("href.html"))); } - string16 getFirstPageTitle() { + base::string16 getFirstPageTitle() { return ASCIIToUTF16(kFirstPageTitle); } - string16 getSecondPageTitle() { + base::string16 getSecondPageTitle() { return ASCIIToUTF16(kSecondPageTitle); } diff --git a/chrome/browser/ui/browser_navigator_browsertest.cc b/chrome/browser/ui/browser_navigator_browsertest.cc index 20c0723..87291e8 100644 --- a/chrome/browser/ui/browser_navigator_browsertest.cc +++ b/chrome/browser/ui/browser_navigator_browsertest.cc @@ -1331,9 +1331,9 @@ IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest, ASSERT_TRUE(test_server()->Start()); // Open a browser initiated POST request in new foreground tab. - string16 expected_title(base::ASCIIToUTF16(kExpectedTitle)); + base::string16 expected_title(base::ASCIIToUTF16(kExpectedTitle)); std::string post_data = kExpectedTitle; - string16 title; + base::string16 title; ASSERT_TRUE(OpenPOSTURLInNewForegroundTabAndGetTitle( test_server()->GetURL(kEchoTitleCommand), post_data, true, &title)); EXPECT_EQ(expected_title, title); @@ -1347,9 +1347,9 @@ IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest, ASSERT_TRUE(test_server()->Start()); // Open a renderer initiated POST request in new foreground tab. - string16 expected_title(base::ASCIIToUTF16(kExpectedTitle)); + base::string16 expected_title(base::ASCIIToUTF16(kExpectedTitle)); std::string post_data = kExpectedTitle; - string16 title; + base::string16 title; ASSERT_TRUE(OpenPOSTURLInNewForegroundTabAndGetTitle( test_server()->GetURL(kEchoTitleCommand), post_data, false, &title)); EXPECT_NE(expected_title, title); diff --git a/chrome/browser/ui/chrome_select_file_policy_unittest.cc b/chrome/browser/ui/chrome_select_file_policy_unittest.cc index f57b874..1c739b5 100644 --- a/chrome/browser/ui/chrome_select_file_policy_unittest.cc +++ b/chrome/browser/ui/chrome_select_file_policy_unittest.cc @@ -47,7 +47,7 @@ class FileSelectionUser : public ui::SelectFileDialog::Listener { this, new ChromeSelectFilePolicy(NULL)); const base::FilePath file_path; - const string16 title = string16(); + const base::string16 title = base::string16(); file_selection_initialisation_in_progress = true; select_file_dialog_->SelectFile(ui::SelectFileDialog::SELECT_OPEN_FILE, diff --git a/chrome/browser/ui/confirm_bubble_model.cc b/chrome/browser/ui/confirm_bubble_model.cc index 74d127b..9710910 100644 --- a/chrome/browser/ui/confirm_bubble_model.cc +++ b/chrome/browser/ui/confirm_bubble_model.cc @@ -29,7 +29,7 @@ void ConfirmBubbleModel::Cancel() { } string16 ConfirmBubbleModel::GetLinkText() const { - return string16(); + return base::string16(); } void ConfirmBubbleModel::LinkClicked() { diff --git a/chrome/browser/ui/content_settings/content_setting_bubble_model.cc b/chrome/browser/ui/content_settings/content_setting_bubble_model.cc index 0cbb0dc..66671bc 100644 --- a/chrome/browser/ui/content_settings/content_setting_bubble_model.cc +++ b/chrome/browser/ui/content_settings/content_setting_bubble_model.cc @@ -243,7 +243,7 @@ bool ContentSettingSingleRadioGroup::settings_changed() const { // content type and setting the default value based on the content setting. void ContentSettingSingleRadioGroup::SetRadioGroup() { GURL url = web_contents()->GetURL(); - string16 display_host; + base::string16 display_host; net::AppendFormattedHost( url, profile()->GetPrefs()->GetString(prefs::kAcceptLanguages), @@ -655,7 +655,7 @@ void ContentSettingMediaStreamBubbleModel::SetRadioGroup() { RadioGroup radio_group; radio_group.url = url; - string16 display_host_utf16; + base::string16 display_host_utf16; net::AppendFormattedHost( url, profile()->GetPrefs()->GetString(prefs::kAcceptLanguages), @@ -1015,7 +1015,7 @@ ContentSettingRPHBubbleModel::ContentSettingRPHBubbleModel( pending_handler_ = content_settings->pending_protocol_handler(); previous_handler_ = content_settings->previous_protocol_handler(); - string16 protocol; + base::string16 protocol; if (pending_handler_.protocol() == "mailto") { protocol = l10n_util::GetStringUTF16( IDS_REGISTER_PROTOCOL_HANDLER_MAILTO_NAME); diff --git a/chrome/browser/ui/content_settings/media_setting_changed_infobar_delegate.h b/chrome/browser/ui/content_settings/media_setting_changed_infobar_delegate.h index 7fdbe86..073c21f 100644 --- a/chrome/browser/ui/content_settings/media_setting_changed_infobar_delegate.h +++ b/chrome/browser/ui/content_settings/media_setting_changed_infobar_delegate.h @@ -24,9 +24,9 @@ class MediaSettingChangedInfoBarDelegate : public ConfirmInfoBarDelegate { // ConfirmInfoBarDelegate: virtual int GetIconID() const OVERRIDE; virtual Type GetInfoBarType() const OVERRIDE; - virtual string16 GetMessageText() const OVERRIDE; + virtual base::string16 GetMessageText() const OVERRIDE; virtual int GetButtons() const OVERRIDE; - virtual string16 GetButtonLabel(InfoBarButton button) const OVERRIDE; + virtual base::string16 GetButtonLabel(InfoBarButton button) const OVERRIDE; virtual bool Accept() OVERRIDE; DISALLOW_COPY_AND_ASSIGN(MediaSettingChangedInfoBarDelegate); diff --git a/chrome/browser/ui/extensions/extension_install_ui_default.cc b/chrome/browser/ui/extensions/extension_install_ui_default.cc index cec3a91..ba23037 100644 --- a/chrome/browser/ui/extensions/extension_install_ui_default.cc +++ b/chrome/browser/ui/extensions/extension_install_ui_default.cc @@ -91,9 +91,9 @@ class ErrorInfoBarDelegate : public ConfirmInfoBarDelegate { virtual ~ErrorInfoBarDelegate(); // ConfirmInfoBarDelegate: - virtual string16 GetMessageText() const OVERRIDE; + virtual base::string16 GetMessageText() const OVERRIDE; virtual int GetButtons() const OVERRIDE; - virtual string16 GetLinkText() const OVERRIDE; + virtual base::string16 GetLinkText() const OVERRIDE; virtual bool LinkClicked(WindowOpenDisposition disposition) OVERRIDE; extensions::CrxInstallerError error_; @@ -127,7 +127,7 @@ int ErrorInfoBarDelegate::GetButtons() const { string16 ErrorInfoBarDelegate::GetLinkText() const { return (error_.type() == extensions::CrxInstallerError::ERROR_OFF_STORE) ? - l10n_util::GetStringUTF16(IDS_LEARN_MORE) : string16(); + l10n_util::GetStringUTF16(IDS_LEARN_MORE) : base::string16(); } bool ErrorInfoBarDelegate::LinkClicked(WindowOpenDisposition disposition) { diff --git a/chrome/browser/ui/find_bar/find_bar.h b/chrome/browser/ui/find_bar/find_bar.h index 1be1b08..9fd85ef 100644 --- a/chrome/browser/ui/find_bar/find_bar.h +++ b/chrome/browser/ui/find_bar/find_bar.h @@ -58,11 +58,11 @@ class FindBar { // Set the text in the find box. virtual void SetFindTextAndSelectedRange( - const string16& find_text, + const base::string16& find_text, const gfx::Range& selected_range) = 0; // Gets the search string currently visible in the find box. - virtual string16 GetFindText() = 0; + virtual base::string16 GetFindText() = 0; // Gets the selection. virtual gfx::Range GetSelectedRange() = 0; @@ -70,7 +70,7 @@ class FindBar { // Updates the FindBar with the find result details contained within the // specified |result|. virtual void UpdateUIForFindResult(const FindNotificationDetails& result, - const string16& find_text) = 0; + const base::string16& find_text) = 0; // No match was found; play an audible alert. virtual void AudibleAlert() = 0; @@ -106,10 +106,10 @@ class FindBarTesting { bool* fully_visible) = 0; // Gets the search string currently selected in the Find box. - virtual string16 GetFindSelectedText() = 0; + virtual base::string16 GetFindSelectedText() = 0; // Gets the match count text (ie. 1 of 3) visible in the Find box. - virtual string16 GetMatchCountText() = 0; + virtual base::string16 GetMatchCountText() = 0; // Gets the pixel width of the FindBar. virtual int GetWidth() = 0; diff --git a/chrome/browser/ui/find_bar/find_tab_helper.h b/chrome/browser/ui/find_bar/find_tab_helper.h index 38fec42..1340851 100644 --- a/chrome/browser/ui/find_bar/find_tab_helper.h +++ b/chrome/browser/ui/find_bar/find_tab_helper.h @@ -53,10 +53,10 @@ class FindTabHelper : public content::WebContentsObserver, // Accessor for find_text_. Used to determine if this WebContents has any // active searches. - string16 find_text() const { return find_text_; } + base::string16 find_text() const { return find_text_; } // Accessor for the previous search we issued. - string16 previous_find_text() const { return previous_find_text_; } + base::string16 previous_find_text() const { return previous_find_text_; } gfx::Range selected_range() const { return selected_range_; } void set_selected_range(const gfx::Range& selected_range) { @@ -109,10 +109,10 @@ class FindTabHelper : public content::WebContentsObserver, // The current string we are/just finished searching for. This is used to // figure out if this is a Find or a FindNext operation (FindNext should not // increase the request id). - string16 find_text_; + base::string16 find_text_; // The string we searched for before |find_text_|. - string16 previous_find_text_; + base::string16 previous_find_text_; // The selection within the text. gfx::Range selected_range_; diff --git a/chrome/browser/ui/fullscreen/fullscreen_exit_bubble.h b/chrome/browser/ui/fullscreen/fullscreen_exit_bubble.h index ed8671a..630c92a 100644 --- a/chrome/browser/ui/fullscreen/fullscreen_exit_bubble.h +++ b/chrome/browser/ui/fullscreen/fullscreen_exit_bubble.h @@ -75,12 +75,12 @@ class FullscreenExitBubble : public gfx::AnimationDelegate { void Cancel(); // The following strings may change according to the content type and URL. - string16 GetCurrentMessageText() const; - string16 GetCurrentDenyButtonText() const; + base::string16 GetCurrentMessageText() const; + base::string16 GetCurrentDenyButtonText() const; // The following strings never change. - string16 GetAllowButtonText() const; - string16 GetInstructionText() const; + base::string16 GetAllowButtonText() const; + base::string16 GetInstructionText() const; // The browser this bubble is in. Browser* browser_; diff --git a/chrome/browser/ui/fullscreen/fullscreen_exit_bubble_type.cc b/chrome/browser/ui/fullscreen/fullscreen_exit_bubble_type.cc index 0a107bd..6f954c41 100644 --- a/chrome/browser/ui/fullscreen/fullscreen_exit_bubble_type.cc +++ b/chrome/browser/ui/fullscreen/fullscreen_exit_bubble_type.cc @@ -18,7 +18,7 @@ namespace fullscreen_bubble { string16 GetLabelTextForType(FullscreenExitBubbleType type, const GURL& url, ExtensionService* extension_service) { - string16 host(UTF8ToUTF16(url.host())); + base::string16 host(UTF8ToUTF16(url.host())); if (extension_service) { const ExtensionSet* extensions = extension_service->extensions(); DCHECK(extensions); @@ -56,7 +56,7 @@ string16 GetLabelTextForType(FullscreenExitBubbleType type, IDS_FULLSCREEN_UNKNOWN_EXTENSION_TRIGGERED_FULLSCREEN); default: NOTREACHED(); - return string16(); + return base::string16(); } } switch (type) { @@ -86,7 +86,7 @@ string16 GetLabelTextForType(FullscreenExitBubbleType type, IDS_FULLSCREEN_EXTENSION_TRIGGERED_FULLSCREEN, host); default: NOTREACHED(); - return string16(); + return base::string16(); } } @@ -104,10 +104,10 @@ string16 GetDenyButtonTextForType(FullscreenExitBubbleType type) { case FEB_TYPE_BROWSER_FULLSCREEN_EXIT_INSTRUCTION: case FEB_TYPE_BROWSER_EXTENSION_FULLSCREEN_EXIT_INSTRUCTION: NOTREACHED(); // No button in this case. - return string16(); + return base::string16(); default: NOTREACHED(); - return string16(); + return base::string16(); } } diff --git a/chrome/browser/ui/global_error/global_error.h b/chrome/browser/ui/global_error/global_error.h index cacd1ff..23d0175 100644 --- a/chrome/browser/ui/global_error/global_error.h +++ b/chrome/browser/ui/global_error/global_error.h @@ -40,7 +40,7 @@ class GlobalError { // Returns the command ID for the menu item. virtual int MenuItemCommandID() = 0; // Returns the label for the menu item. - virtual string16 MenuItemLabel() = 0; + virtual base::string16 MenuItemLabel() = 0; // Returns the resource ID for the menu item icon. int MenuItemIconResourceID(); // Called when the user clicks on the menu item. @@ -69,16 +69,16 @@ class GlobalErrorWithStandardBubble // Returns an icon to use for the bubble view. virtual gfx::Image GetBubbleViewIcon(); // Returns the title for the bubble view. - virtual string16 GetBubbleViewTitle() = 0; + virtual base::string16 GetBubbleViewTitle() = 0; // Returns the messages for the bubble view, one per line. Multiple messages // are only supported on Views. // TODO(yoz): Add multi-line support for GTK and Cocoa. virtual std::vector<string16> GetBubbleViewMessages() = 0; // Returns the accept button label for the bubble view. - virtual string16 GetBubbleViewAcceptButtonLabel() = 0; + virtual base::string16 GetBubbleViewAcceptButtonLabel() = 0; // Returns the cancel button label for the bubble view. To hide the cancel // button return an empty string. - virtual string16 GetBubbleViewCancelButtonLabel() = 0; + virtual base::string16 GetBubbleViewCancelButtonLabel() = 0; // Called when the bubble view is closed. |browser| is the Browser that the // bubble view was shown on. void BubbleViewDidClose(Browser* browser); diff --git a/chrome/browser/ui/global_error/global_error_service_browsertest.cc b/chrome/browser/ui/global_error/global_error_service_browsertest.cc index 2da6440..cb731e5 100644 --- a/chrome/browser/ui/global_error/global_error_service_browsertest.cc +++ b/chrome/browser/ui/global_error/global_error_service_browsertest.cc @@ -26,24 +26,24 @@ class BubbleViewError : public GlobalErrorWithStandardBubble { ADD_FAILURE(); return 0; } - virtual string16 MenuItemLabel() OVERRIDE { + virtual base::string16 MenuItemLabel() OVERRIDE { ADD_FAILURE(); - return string16(); + return base::string16(); } virtual void ExecuteMenuItem(Browser* browser) OVERRIDE { ADD_FAILURE(); } virtual bool HasBubbleView() OVERRIDE { return true; } - virtual string16 GetBubbleViewTitle() OVERRIDE { - return string16(); + virtual base::string16 GetBubbleViewTitle() OVERRIDE { + return base::string16(); } virtual std::vector<string16> GetBubbleViewMessages() OVERRIDE { return std::vector<string16>(); } - virtual string16 GetBubbleViewAcceptButtonLabel() OVERRIDE { - return string16(); + virtual base::string16 GetBubbleViewAcceptButtonLabel() OVERRIDE { + return base::string16(); } - virtual string16 GetBubbleViewCancelButtonLabel() OVERRIDE { - return string16(); + virtual base::string16 GetBubbleViewCancelButtonLabel() OVERRIDE { + return base::string16(); } virtual void OnBubbleViewDidClose(Browser* browser) OVERRIDE { EXPECT_TRUE(browser); diff --git a/chrome/browser/ui/global_error/global_error_service_unittest.cc b/chrome/browser/ui/global_error/global_error_service_unittest.cc index 9010229..5493392 100644 --- a/chrome/browser/ui/global_error/global_error_service_unittest.cc +++ b/chrome/browser/ui/global_error/global_error_service_unittest.cc @@ -24,9 +24,9 @@ class BaseError : public GlobalError { ADD_FAILURE(); return 0; } - virtual string16 MenuItemLabel() OVERRIDE { + virtual base::string16 MenuItemLabel() OVERRIDE { ADD_FAILURE(); - return string16(); + return base::string16(); } virtual void ExecuteMenuItem(Browser* browser) OVERRIDE { ADD_FAILURE(); } @@ -56,7 +56,7 @@ class MenuError : public BaseError { virtual bool HasMenuItem() OVERRIDE { return true; } virtual int MenuItemCommandID() OVERRIDE { return command_id_; } - virtual string16 MenuItemLabel() OVERRIDE { return string16(); } + virtual base::string16 MenuItemLabel() OVERRIDE { return base::string16(); } virtual void ExecuteMenuItem(Browser* browser) OVERRIDE {} private: diff --git a/chrome/browser/ui/hung_plugin_tab_helper.cc b/chrome/browser/ui/hung_plugin_tab_helper.cc index c4da8bd..6ed3507 100644 --- a/chrome/browser/ui/hung_plugin_tab_helper.cc +++ b/chrome/browser/ui/hung_plugin_tab_helper.cc @@ -135,33 +135,33 @@ class HungPluginInfoBarDelegate : public ConfirmInfoBarDelegate { static InfoBar* Create(InfoBarService* infobar_service, HungPluginTabHelper* helper, int plugin_child_id, - const string16& plugin_name); + const base::string16& plugin_name); private: HungPluginInfoBarDelegate(HungPluginTabHelper* helper, int plugin_child_id, - const string16& plugin_name); + const base::string16& plugin_name); virtual ~HungPluginInfoBarDelegate(); // ConfirmInfoBarDelegate: virtual int GetIconID() const OVERRIDE; - virtual string16 GetMessageText() const OVERRIDE; + virtual base::string16 GetMessageText() const OVERRIDE; virtual int GetButtons() const OVERRIDE; - virtual string16 GetButtonLabel(InfoBarButton button) const OVERRIDE; + virtual base::string16 GetButtonLabel(InfoBarButton button) const OVERRIDE; virtual bool Accept() OVERRIDE; HungPluginTabHelper* helper_; int plugin_child_id_; - string16 message_; - string16 button_text_; + base::string16 message_; + base::string16 button_text_; }; // static InfoBar* HungPluginInfoBarDelegate::Create(InfoBarService* infobar_service, HungPluginTabHelper* helper, int plugin_child_id, - const string16& plugin_name) { + const base::string16& plugin_name) { return infobar_service->AddInfoBar(ConfirmInfoBarDelegate::CreateInfoBar( scoped_ptr<ConfirmInfoBarDelegate>(new HungPluginInfoBarDelegate( helper, plugin_child_id, plugin_name)))); @@ -170,7 +170,7 @@ InfoBar* HungPluginInfoBarDelegate::Create(InfoBarService* infobar_service, HungPluginInfoBarDelegate::HungPluginInfoBarDelegate( HungPluginTabHelper* helper, int plugin_child_id, - const string16& plugin_name) + const base::string16& plugin_name) : ConfirmInfoBarDelegate(), helper_(helper), plugin_child_id_(plugin_child_id), @@ -213,11 +213,11 @@ bool HungPluginInfoBarDelegate::Accept() { // not we're currently showing the infobar. struct HungPluginTabHelper::PluginState { // Initializes the plugin state to be a hung plugin. - PluginState(const base::FilePath& p, const string16& n); + PluginState(const base::FilePath& p, const base::string16& n); ~PluginState(); base::FilePath path; - string16 name; + base::string16 name; // Possibly-null if we're not showing an infobar right now. InfoBar* infobar; @@ -242,7 +242,7 @@ struct HungPluginTabHelper::PluginState { const int HungPluginTabHelper::PluginState::kInitialReshowDelaySec = 10; HungPluginTabHelper::PluginState::PluginState(const base::FilePath& p, - const string16& n) + const base::string16& n) : path(p), name(n), infobar(NULL), @@ -310,7 +310,7 @@ void HungPluginTabHelper::PluginHungStatusChanged( return; } - string16 plugin_name = + base::string16 plugin_name = content::PluginService::GetInstance()->GetPluginDisplayNameByPath( plugin_path); diff --git a/chrome/browser/ui/metro_pin_tab_helper_win.cc b/chrome/browser/ui/metro_pin_tab_helper_win.cc index 7ae61c3..9f1dc00 100644 --- a/chrome/browser/ui/metro_pin_tab_helper_win.cc +++ b/chrome/browser/ui/metro_pin_tab_helper_win.cc @@ -43,7 +43,7 @@ const char kMetroPinMetric[] = "Metro.SecondaryTilePin"; // Generate an ID for the tile based on |url_str|. The ID is simply a hash of // the URL. -string16 GenerateTileId(const string16& url_str) { +string16 GenerateTileId(const base::string16& url_str) { uint8 hash[crypto::kSHA256Length]; crypto::SHA256HashString(UTF16ToUTF8(url_str), hash, sizeof(hash)); std::string hash_str = base::HexEncode(hash, sizeof(hash)); @@ -68,7 +68,7 @@ base::FilePath GetTileImagesDir() { // |logo_dir|. The path of any created logo is returned in |logo_path|. Return // value indicates whether a site specific logo was created. bool CreateSiteSpecificLogo(const SkBitmap& bitmap, - const string16& tile_id, + const base::string16& tile_id, const base::FilePath& logo_dir, base::FilePath* logo_path) { const int kLogoWidth = 120; @@ -152,8 +152,8 @@ class PinPageTaskRunner : public base::RefCountedThreadSafe<PinPageTaskRunner> { // Creates a task runner for the pinning operation with the given details. // |favicon| can be a null image (i.e. favicon.isNull() can be true), in // which case the backup tile image will be used. - PinPageTaskRunner(const string16& title, - const string16& url, + PinPageTaskRunner(const base::string16& title, + const base::string16& url, const SkBitmap& favicon); void Run(); @@ -163,16 +163,16 @@ class PinPageTaskRunner : public base::RefCountedThreadSafe<PinPageTaskRunner> { ~PinPageTaskRunner() {} // Details of the page being pinned. - const string16 title_; - const string16 url_; + const base::string16 title_; + const base::string16 url_; SkBitmap favicon_; friend class base::RefCountedThreadSafe<PinPageTaskRunner>; DISALLOW_COPY_AND_ASSIGN(PinPageTaskRunner); }; -PinPageTaskRunner::PinPageTaskRunner(const string16& title, - const string16& url, +PinPageTaskRunner::PinPageTaskRunner(const base::string16& title, + const base::string16& url, const SkBitmap& favicon) : title_(title), url_(url), @@ -190,7 +190,7 @@ void PinPageTaskRunner::Run() { void PinPageTaskRunner::RunOnFileThread() { DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::FILE)); - string16 tile_id = GenerateTileId(url_); + base::string16 tile_id = GenerateTileId(url_); base::FilePath logo_dir = GetTileImagesDir(); if (logo_dir.empty()) { LOG(ERROR) << "Could not create directory to store tile image."; @@ -232,8 +232,8 @@ void PinPageTaskRunner::RunOnFileThread() { class MetroPinTabHelper::FaviconChooser { public: FaviconChooser(MetroPinTabHelper* helper, - const string16& title, - const string16& url, + const base::string16& title, + const base::string16& url, const SkBitmap& history_bitmap); ~FaviconChooser() {} @@ -254,8 +254,8 @@ class MetroPinTabHelper::FaviconChooser { MetroPinTabHelper* helper_; // Title and URL of the page being pinned. - const string16 title_; - const string16 url_; + const base::string16 title_; + const base::string16 url_; // The best candidate we have so far for the current pin operation. SkBitmap best_candidate_; @@ -268,8 +268,8 @@ class MetroPinTabHelper::FaviconChooser { MetroPinTabHelper::FaviconChooser::FaviconChooser( MetroPinTabHelper* helper, - const string16& title, - const string16& url, + const base::string16& title, + const base::string16& url, const SkBitmap& history_bitmap) : helper_(helper), title_(title), @@ -345,7 +345,7 @@ bool MetroPinTabHelper::IsPinned() const { if (!metro_module) return false; - typedef BOOL (*MetroIsPinnedToStartScreen)(const string16&); + typedef BOOL (*MetroIsPinnedToStartScreen)(const base::string16&); MetroIsPinnedToStartScreen metro_is_pinned_to_start_screen = reinterpret_cast<MetroIsPinnedToStartScreen>( ::GetProcAddress(metro_module, "MetroIsPinnedToStartScreen")); @@ -355,7 +355,7 @@ bool MetroPinTabHelper::IsPinned() const { } GURL url = web_contents()->GetURL(); - string16 tile_id = GenerateTileId(UTF8ToUTF16(url.spec())); + base::string16 tile_id = GenerateTileId(UTF8ToUTF16(url.spec())); return metro_is_pinned_to_start_screen(tile_id) != 0; } @@ -372,8 +372,8 @@ void MetroPinTabHelper::TogglePinnedToStartScreen() { base::win::METRO_PIN_INITIATED, base::win::METRO_PIN_STATE_LIMIT); GURL url = web_contents()->GetURL(); - string16 url_str = UTF8ToUTF16(url.spec()); - string16 title = web_contents()->GetTitle(); + base::string16 url_str = UTF8ToUTF16(url.spec()); + base::string16 title = web_contents()->GetTitle(); // TODO(oshima): Use scoped_ptr::Pass to pass it to other thread. SkBitmap favicon; FaviconTabHelper* favicon_tab_helper = FaviconTabHelper::FromWebContents( @@ -449,7 +449,7 @@ void MetroPinTabHelper::UnPinPageFromStartScreen() { } GURL url = web_contents()->GetURL(); - string16 tile_id = GenerateTileId(UTF8ToUTF16(url.spec())); + base::string16 tile_id = GenerateTileId(UTF8ToUTF16(url.spec())); metro_un_pin_from_start_screen(tile_id, base::Bind(&PinPageReportUmaCallback)); } diff --git a/chrome/browser/ui/omnibox/alternate_nav_infobar_delegate.cc b/chrome/browser/ui/omnibox/alternate_nav_infobar_delegate.cc index d1b5bc4..1c82f43 100644 --- a/chrome/browser/ui/omnibox/alternate_nav_infobar_delegate.cc +++ b/chrome/browser/ui/omnibox/alternate_nav_infobar_delegate.cc @@ -24,7 +24,7 @@ AlternateNavInfoBarDelegate::~AlternateNavInfoBarDelegate() { // static void AlternateNavInfoBarDelegate::Create( content::WebContents* web_contents, - const string16& text, + const base::string16& text, const AutocompleteMatch& match, const GURL& search_url) { InfoBarService* infobar_service = @@ -37,7 +37,7 @@ void AlternateNavInfoBarDelegate::Create( AlternateNavInfoBarDelegate::AlternateNavInfoBarDelegate( Profile* profile, - const string16& text, + const base::string16& text, const AutocompleteMatch& match, const GURL& search_url) : InfoBarDelegate(), @@ -54,8 +54,8 @@ AlternateNavInfoBarDelegate::AlternateNavInfoBarDelegate( string16 AlternateNavInfoBarDelegate::GetMessageTextWithOffset( size_t* link_offset) const { - const string16 label = l10n_util::GetStringFUTF16( - IDS_ALTERNATE_NAV_URL_VIEW_LABEL, string16(), link_offset); + const base::string16 label = l10n_util::GetStringFUTF16( + IDS_ALTERNATE_NAV_URL_VIEW_LABEL, base::string16(), link_offset); return label; } diff --git a/chrome/browser/ui/omnibox/alternate_nav_infobar_delegate.h b/chrome/browser/ui/omnibox/alternate_nav_infobar_delegate.h index 7c92901..e27b864 100644 --- a/chrome/browser/ui/omnibox/alternate_nav_infobar_delegate.h +++ b/chrome/browser/ui/omnibox/alternate_nav_infobar_delegate.h @@ -16,17 +16,17 @@ class AlternateNavInfoBarDelegate : public InfoBarDelegate { // Creates an alternate nav infobar and delegate and adds the infobar to the // infobar service for |web_contents|. static void Create(content::WebContents* web_contents, - const string16& text, + const base::string16& text, const AutocompleteMatch& match, const GURL& search_url); - string16 GetMessageTextWithOffset(size_t* link_offset) const; - string16 GetLinkText() const; + base::string16 GetMessageTextWithOffset(size_t* link_offset) const; + base::string16 GetLinkText() const; bool LinkClicked(WindowOpenDisposition disposition); private: AlternateNavInfoBarDelegate(Profile* profile, - const string16& text, + const base::string16& text, const AutocompleteMatch& match, const GURL& search_url); @@ -39,7 +39,7 @@ class AlternateNavInfoBarDelegate : public InfoBarDelegate { virtual Type GetInfoBarType() const OVERRIDE; Profile* profile_; - const string16 text_; + const base::string16 text_; const AutocompleteMatch match_; const GURL search_url_; diff --git a/chrome/browser/ui/omnibox/location_bar_util.cc b/chrome/browser/ui/omnibox/location_bar_util.cc index 8bfffbd..3c327a0 100644 --- a/chrome/browser/ui/omnibox/location_bar_util.cc +++ b/chrome/browser/ui/omnibox/location_bar_util.cc @@ -16,13 +16,13 @@ namespace location_bar_util { -string16 CalculateMinString(const string16& description) { +string16 CalculateMinString(const base::string16& description) { // Chop at the first '.' or whitespace. const size_t dot_index = description.find('.'); const size_t ws_index = description.find_first_of(base::kWhitespaceUTF16); size_t chop_index = std::min(dot_index, ws_index); - string16 min_string; - if (chop_index == string16::npos) { + base::string16 min_string; + if (chop_index == base::string16::npos) { // No dot or whitespace, truncate to at most 3 chars. min_string = gfx::TruncateString(description, 3); } else { diff --git a/chrome/browser/ui/omnibox/location_bar_util.h b/chrome/browser/ui/omnibox/location_bar_util.h index e9eb7e9..0f9e8a8 100644 --- a/chrome/browser/ui/omnibox/location_bar_util.h +++ b/chrome/browser/ui/omnibox/location_bar_util.h @@ -18,7 +18,7 @@ class Rect; namespace location_bar_util { // Build a short string to use in keyword-search when the field isn't very big. -string16 CalculateMinString(const string16& description); +string16 CalculateMinString(const base::string16& description); // Paint the background and border for |action| on |tab_id|. |bounds| should // include the top and bottom of the location bar, and the middle column diff --git a/chrome/browser/ui/omnibox/omnibox_controller.cc b/chrome/browser/ui/omnibox/omnibox_controller.cc index 087a1fd..903f314 100644 --- a/chrome/browser/ui/omnibox/omnibox_controller.cc +++ b/chrome/browser/ui/omnibox/omnibox_controller.cc @@ -65,7 +65,7 @@ OmniboxController::~OmniboxController() { } void OmniboxController::StartAutocomplete( - string16 user_text, + base::string16 user_text, size_t cursor_position, const GURL& current_url, AutocompleteInput::PageClassification current_page_classification, @@ -78,7 +78,7 @@ void OmniboxController::StartAutocomplete( // We don't explicitly clear OmniboxPopupModel::manually_selected_match, as // Start ends up invoking OmniboxPopupModel::OnResultChanged which clears it. autocomplete_controller_->Start(AutocompleteInput( - user_text, cursor_position, string16(), current_url, + user_text, cursor_position, base::string16(), current_url, current_page_classification, prevent_inline_autocomplete, prefer_keyword, allow_exact_keyword_match, AutocompleteInput::ALL_MATCHES)); @@ -115,8 +115,8 @@ void OmniboxController::OnResultChanged(bool default_match_changed) { } else { InvalidateCurrentMatch(); popup_->OnResultChanged(); - omnibox_edit_model_->OnPopupDataChanged(string16(), NULL, string16(), - false); + omnibox_edit_model_->OnPopupDataChanged(base::string16(), NULL, + base::string16(), false); } } else { popup_->OnResultChanged(); diff --git a/chrome/browser/ui/omnibox/omnibox_controller.h b/chrome/browser/ui/omnibox/omnibox_controller.h index e5e2d97..326f1f9 100644 --- a/chrome/browser/ui/omnibox/omnibox_controller.h +++ b/chrome/browser/ui/omnibox/omnibox_controller.h @@ -42,7 +42,7 @@ class OmniboxController : public AutocompleteControllerDelegate { // |current_url| is only set for mobile ports. void StartAutocomplete( - string16 user_text, + base::string16 user_text, size_t cursor_position, const GURL& current_url, AutocompleteInput::PageClassification current_page_classification, diff --git a/chrome/browser/ui/omnibox/omnibox_edit_model.cc b/chrome/browser/ui/omnibox/omnibox_edit_model.cc index 20f6e72..9ce8881 100644 --- a/chrome/browser/ui/omnibox/omnibox_edit_model.cc +++ b/chrome/browser/ui/omnibox/omnibox_edit_model.cc @@ -105,8 +105,8 @@ const char kFocusToEditTimeHistogram[] = "Omnibox.FocusToEditTime"; // between focusing and opening an omnibox match. const char kFocusToOpenTimeHistogram[] = "Omnibox.FocusToOpenTime"; -void RecordPercentageMatchHistogram(const string16& old_text, - const string16& new_text, +void RecordPercentageMatchHistogram(const base::string16& old_text, + const base::string16& new_text, bool url_replacement_active, content::PageTransition transition) { size_t avg_length = (old_text.length() + new_text.length()) / 2; @@ -114,8 +114,8 @@ void RecordPercentageMatchHistogram(const string16& old_text, int percent = 0; if (!old_text.empty() && !new_text.empty()) { size_t shorter_length = std::min(old_text.length(), new_text.length()); - string16::const_iterator end(old_text.begin() + shorter_length); - string16::const_iterator mismatch( + base::string16::const_iterator end(old_text.begin() + shorter_length); + base::string16::const_iterator mismatch( std::mismatch(old_text.begin(), end, new_text.begin()).first); size_t matching_characters = mismatch - old_text.begin(); percent = static_cast<float>(matching_characters) / avg_length * 100; @@ -146,9 +146,9 @@ void RecordPercentageMatchHistogram(const string16& old_text, // OmniboxEditModel::State ---------------------------------------------------- OmniboxEditModel::State::State(bool user_input_in_progress, - const string16& user_text, - const string16& gray_text, - const string16& keyword, + const base::string16& user_text, + const base::string16& gray_text, + const base::string16& keyword, bool is_keyword_hint, bool url_replacement_enabled, OmniboxFocusState focus_state, @@ -201,7 +201,7 @@ const OmniboxEditModel::State OmniboxEditModel::GetStateForTabSwitch() { // Weird edge case to match other browsers: if the edit is empty, revert to // the permanent text (so the user can get it back easily) but select it (so // on switching back, typing will "just work"). - const string16 user_text(UserTextFromDisplayText(view_->GetText())); + const base::string16 user_text(UserTextFromDisplayText(view_->GetText())); if (user_text.empty()) { base::AutoReset<bool> tmp(&in_revert_, true); view_->RevertAll(); @@ -283,8 +283,8 @@ bool OmniboxEditModel::UpdatePermanentText() { // process -- before and after the auto-commit, the omnibox should show the // same user text and the same instant suggestion, even if the auto-commit // happens while the edit doesn't have focus. - string16 new_permanent_text = controller_->GetToolbarModel()->GetText(); - string16 gray_text = view_->GetGrayTextAutocompletion(); + base::string16 new_permanent_text = controller_->GetToolbarModel()->GetText(); + base::string16 gray_text = view_->GetGrayTextAutocompletion(); const bool visibly_changed_permanent_text = (permanent_text_ != new_permanent_text) && (!has_focus() || @@ -302,7 +302,7 @@ GURL OmniboxEditModel::PermanentURL() { return URLFixerUpper::FixupURL(UTF16ToUTF8(permanent_text_), std::string()); } -void OmniboxEditModel::SetUserText(const string16& text) { +void OmniboxEditModel::SetUserText(const base::string16& text) { SetInputInProgress(true); InternalSetUserText(text); omnibox_controller_->InvalidateCurrentMatch(); @@ -311,11 +311,11 @@ void OmniboxEditModel::SetUserText(const string16& text) { } bool OmniboxEditModel::CommitSuggestedText() { - const string16 suggestion = view_->GetGrayTextAutocompletion(); + const base::string16 suggestion = view_->GetGrayTextAutocompletion(); if (suggestion.empty()) return false; - const string16 final_text = view_->GetText() + suggestion; + const base::string16 final_text = view_->GetText() + suggestion; view_->OnBeforePossibleChange(); view_->SetWindowTextAndCaretPos(final_text, final_text.length(), false, false); @@ -377,7 +377,7 @@ void OmniboxEditModel::OnChanged() { } void OmniboxEditModel::GetDataForURLExport(GURL* url, - string16* title, + base::string16* title, gfx::Image* favicon) { *url = CurrentMatch(NULL).destination_url; if (*url == URLFixerUpper::FixupURL(UTF16ToUTF8(permanent_text_), @@ -409,7 +409,7 @@ AutocompleteMatch::Type OmniboxEditModel::CurrentTextType() const { void OmniboxEditModel::AdjustTextForCopy(int sel_min, bool is_all_selected, - string16* text, + base::string16* text, GURL* url, bool* write_url) { *write_url = false; @@ -447,7 +447,7 @@ void OmniboxEditModel::AdjustTextForCopy(int sel_min, if (perm_url.SchemeIs(content::kHttpScheme) && url->SchemeIs(content::kHttpScheme) && perm_url.host() == url->host()) { *write_url = true; - string16 http = ASCIIToUTF16(content::kHttpScheme) + + base::string16 http = ASCIIToUTF16(content::kHttpScheme) + ASCIIToUTF16(content::kStandardSchemeSeparator); if (text->compare(0, http.length(), http) != 0) *text = http + *text; @@ -485,7 +485,7 @@ void OmniboxEditModel::SetInputInProgress(bool in_progress) { void OmniboxEditModel::Revert() { SetInputInProgress(false); paste_state_ = NONE; - InternalSetUserText(string16()); + InternalSetUserText(base::string16()); keyword_.clear(); is_keyword_hint_ = false; has_temporary_text_ = false; @@ -546,7 +546,7 @@ void OmniboxEditModel::StopAutocomplete() { autocomplete_controller()->Stop(true); } -bool OmniboxEditModel::CanPasteAndGo(const string16& text) const { +bool OmniboxEditModel::CanPasteAndGo(const base::string16& text) const { if (!view_->command_updater()->IsCommandEnabled(IDC_OPEN_CURRENT_URL)) return false; @@ -555,7 +555,7 @@ bool OmniboxEditModel::CanPasteAndGo(const string16& text) const { return match.destination_url.is_valid(); } -void OmniboxEditModel::PasteAndGo(const string16& text) { +void OmniboxEditModel::PasteAndGo(const base::string16& text) { DCHECK(CanPasteAndGo(text)); UMA_HISTOGRAM_COUNTS("Omnibox.PasteAndGo", 1); @@ -567,7 +567,7 @@ void OmniboxEditModel::PasteAndGo(const string16& text) { OmniboxPopupModel::kNoMatch); } -bool OmniboxEditModel::IsPasteAndSearch(const string16& text) const { +bool OmniboxEditModel::IsPasteAndSearch(const base::string16& text) const { AutocompleteMatch match; ClassifyStringForPasteAndGo(text, &match, NULL); return AutocompleteMatch::IsSearchType(match.type); @@ -654,7 +654,7 @@ void OmniboxEditModel::OpenMatch(AutocompleteMatch match, autocomplete_controller()->UpdateMatchDestinationURL( elapsed_time_since_user_first_modified_omnibox, &match); - const string16& user_text = + const base::string16& user_text = user_input_in_progress_ ? user_text_ : permanent_text_; scoped_ptr<OmniboxNavigationObserver> observer( new OmniboxNavigationObserver( @@ -763,7 +763,7 @@ void OmniboxEditModel::OpenMatch(AutocompleteMatch match, } // Get the current text before we call RevertAll() which will clear it. - string16 current_text = view_->GetText(); + base::string16 current_text = view_->GetText(); if (disposition != NEW_BACKGROUND_TAB) { base::AutoReset<bool> tmp(&in_revert_, true); @@ -836,11 +836,11 @@ void OmniboxEditModel::AcceptTemporaryTextAsUserText() { delegate_->NotifySearchTabHelper(user_input_in_progress_, !in_revert_); } -void OmniboxEditModel::ClearKeyword(const string16& visible_text) { +void OmniboxEditModel::ClearKeyword(const base::string16& visible_text) { autocomplete_controller()->Stop(false); omnibox_controller_->ClearPopupKeywordMode(); - const string16 window_text(keyword_ + visible_text); + const base::string16 window_text(keyword_ + visible_text); // Only reset the result if the edit text has changed since the // keyword was accepted, or if the popup is closed. @@ -1001,9 +1001,9 @@ void OmniboxEditModel::OnUpOrDownKeyPressed(int count) { } void OmniboxEditModel::OnPopupDataChanged( - const string16& text, + const base::string16& text, GURL* destination_for_temporary_text_change, - const string16& keyword, + const base::string16& keyword, bool is_keyword_hint) { // The popup changed its data, the match in the controller is no longer valid. omnibox_controller_->InvalidateCurrentMatch(); @@ -1049,7 +1049,8 @@ void OmniboxEditModel::OnPopupDataChanged( if (inline_autocomplete_text_.empty()) view_->OnInlineAutocompleteTextCleared(); - string16 user_text = user_input_in_progress_ ? user_text_ : permanent_text_; + base::string16 user_text = user_input_in_progress_ ? user_text_ + : permanent_text_; if (keyword_state_changed && KeywordIsSelected()) { // If we reach here, the user most likely entered keyword mode by inserting // a space between a keyword name and a search string (as pressing space or @@ -1090,8 +1091,8 @@ void OmniboxEditModel::OnPopupDataChanged( OnChanged(); } -bool OmniboxEditModel::OnAfterPossibleChange(const string16& old_text, - const string16& new_text, +bool OmniboxEditModel::OnAfterPossibleChange(const base::string16& old_text, + const base::string16& new_text, size_t selection_start, size_t selection_end, bool selection_differs, @@ -1201,7 +1202,7 @@ void OmniboxEditModel::OnCurrentMatchChanged() { // We store |keyword| and |is_keyword_hint| in temporary variables since // OnPopupDataChanged use their previous state to detect changes. - string16 keyword; + base::string16 keyword; bool is_keyword_hint; match.GetKeywordUIState(profile_, &keyword, &is_keyword_hint); if (popup_model()) @@ -1209,7 +1210,7 @@ void OmniboxEditModel::OnCurrentMatchChanged() { // OnPopupDataChanged() resets OmniboxController's |current_match_| early // on. Therefore, copy match.inline_autocompletion to a temp to preserve // its value across the entire call. - const string16 inline_autocompletion(match.inline_autocompletion); + const base::string16 inline_autocompletion(match.inline_autocompletion); OnPopupDataChanged(inline_autocompletion, NULL, keyword, is_keyword_hint); } @@ -1225,7 +1226,7 @@ bool OmniboxEditModel::query_in_progress() const { return !autocomplete_controller()->done(); } -void OmniboxEditModel::InternalSetUserText(const string16& text) { +void OmniboxEditModel::InternalSetUserText(const base::string16& text) { user_text_ = text; just_deleted_text_ = false; inline_autocomplete_text_.clear(); @@ -1240,12 +1241,14 @@ void OmniboxEditModel::ClearPopupKeywordMode() const { omnibox_controller_->ClearPopupKeywordMode(); } -string16 OmniboxEditModel::DisplayTextFromUserText(const string16& text) const { +string16 OmniboxEditModel::DisplayTextFromUserText( + const base::string16& text) const { return KeywordIsSelected() ? KeywordProvider::SplitReplacementStringFromInput(text, false) : text; } -string16 OmniboxEditModel::UserTextFromDisplayText(const string16& text) const { +string16 OmniboxEditModel::UserTextFromDisplayText( + const base::string16& text) const { return KeywordIsSelected() ? (keyword_ + char16(' ') + text) : text; } @@ -1309,7 +1312,8 @@ void OmniboxEditModel::RevertTemporaryText(bool revert_popup) { view_->OnRevertTemporaryText(); } -bool OmniboxEditModel::MaybeAcceptKeywordBySpace(const string16& new_text) { +bool OmniboxEditModel::MaybeAcceptKeywordBySpace( + const base::string16& new_text) { size_t keyword_length = new_text.length() - 1; return (paste_state_ == NONE) && is_keyword_hint_ && !keyword_.empty() && inline_autocomplete_text_.empty() && @@ -1320,8 +1324,8 @@ bool OmniboxEditModel::MaybeAcceptKeywordBySpace(const string16& new_text) { } bool OmniboxEditModel::CreatedKeywordSearchByInsertingSpaceInMiddle( - const string16& old_text, - const string16& new_text, + const base::string16& old_text, + const base::string16& new_text, size_t caret_position) const { DCHECK_GE(new_text.length(), caret_position); @@ -1341,7 +1345,7 @@ bool OmniboxEditModel::CreatedKeywordSearchByInsertingSpaceInMiddle( } // Then check if the text before the inserted space matches a keyword. - string16 keyword; + base::string16 keyword; TrimWhitespace(new_text.substr(0, space_position), TRIM_LEADING, &keyword); return !keyword.empty() && !autocomplete_controller()->keyword_provider()-> GetKeywordForText(keyword).empty(); @@ -1386,7 +1390,7 @@ AutocompleteInput::PageClassification OmniboxEditModel::ClassifyPage() const { } void OmniboxEditModel::ClassifyStringForPasteAndGo( - const string16& text, + const base::string16& text, AutocompleteMatch* match, GURL* alternate_nav_url) const { DCHECK(match); diff --git a/chrome/browser/ui/omnibox/omnibox_edit_model.h b/chrome/browser/ui/omnibox/omnibox_edit_model.h index 0506598..dd5f04c 100644 --- a/chrome/browser/ui/omnibox/omnibox_edit_model.h +++ b/chrome/browser/ui/omnibox/omnibox_edit_model.h @@ -53,9 +53,9 @@ class OmniboxEditModel { struct State { State(bool user_input_in_progress, - const string16& user_text, - const string16& gray_text, - const string16& keyword, + const base::string16& user_text, + const base::string16& gray_text, + const base::string16& keyword, bool is_keyword_hint, bool url_replacement_enabled, OmniboxFocusState focus_state, @@ -63,9 +63,9 @@ class OmniboxEditModel { ~State(); bool user_input_in_progress; - const string16 user_text; - const string16 gray_text; - const string16 keyword; + const base::string16 user_text; + const base::string16 gray_text; + const base::string16 keyword; const bool is_keyword_hint; bool url_replacement_enabled; OmniboxFocusState focus_state; @@ -114,7 +114,9 @@ class OmniboxEditModel { // Called when the user wants to export the entire current text as a URL. // Sets the url, and if known, the title and favicon. - void GetDataForURLExport(GURL* url, string16* title, gfx::Image* favicon); + void GetDataForURLExport(GURL* url, + base::string16* title, + gfx::Image* favicon); // Returns true if the current edit contents will be treated as a // URL/navigation, as opposed to a search. @@ -131,7 +133,7 @@ class OmniboxEditModel { // is set to true and |url| set to the url to write. void AdjustTextForCopy(int sel_min, bool is_all_selected, - string16* text, + base::string16* text, GURL* url, bool* write_url); @@ -151,7 +153,7 @@ class OmniboxEditModel { GURL PermanentURL(); // Sets the user_text_ to |text|. Only the View should call this. - void SetUserText(const string16& text); + void SetUserText(const base::string16& text); // Commits the gray suggested text as if it's been input by the user. // Returns true if the text was committed. @@ -174,14 +176,14 @@ class OmniboxEditModel { void StopAutocomplete(); // Determines whether the user can "paste and go", given the specified text. - bool CanPasteAndGo(const string16& text) const; + bool CanPasteAndGo(const base::string16& text) const; // Navigates to the destination last supplied to CanPasteAndGo. - void PasteAndGo(const string16& text); + void PasteAndGo(const base::string16& text); // Returns true if this is a paste-and-search rather than paste-and-go (or // nothing). - bool IsPasteAndSearch(const string16& text) const; + bool IsPasteAndSearch(const base::string16& text) const; // Asks the browser to load the popup's currently selected item, using the // supplied disposition. This may close the popup. If |for_drop| is true, @@ -215,7 +217,7 @@ class OmniboxEditModel { // Accessors for keyword-related state (see comments on keyword_ and // is_keyword_hint_). - const string16& keyword() const { return keyword_; } + const base::string16& keyword() const { return keyword_; } bool is_keyword_hint() const { return is_keyword_hint_; } // Accepts the current keyword hint as a keyword. It always returns true for @@ -229,7 +231,7 @@ class OmniboxEditModel { // Clears the current keyword. |visible_text| is the (non-keyword) text // currently visible in the edit. - void ClearKeyword(const string16& visible_text); + void ClearKeyword(const base::string16& visible_text); // Returns the current autocomplete result. This logic should in the future // live in AutocompleteController but resides here for now. This method is @@ -294,9 +296,9 @@ class OmniboxEditModel { // or the currently selected keyword if |is_keyword_hint| is false (see // comments on keyword_ and is_keyword_hint_). void OnPopupDataChanged( - const string16& text, + const base::string16& text, GURL* destination_for_temporary_text_change, - const string16& keyword, + const base::string16& keyword, bool is_keyword_hint); // Called by the OmniboxView after something changes, with details about what @@ -308,8 +310,8 @@ class OmniboxEditModel { // If |allow_keyword_ui_change| is false then the change should not affect // keyword ui state, even if the text matches a keyword exactly. This value // may be false when the user is composing a text with an IME. - bool OnAfterPossibleChange(const string16& old_text, - const string16& new_text, + bool OnAfterPossibleChange(const base::string16& old_text, + const base::string16& new_text, size_t selection_start, size_t selection_end, bool selection_differs, @@ -364,7 +366,7 @@ class OmniboxEditModel { bool query_in_progress() const; // Called whenever user_text_ should change. - void InternalSetUserText(const string16& text); + void InternalSetUserText(const base::string16& text); // Returns true if a keyword is selected. bool KeywordIsSelected() const; @@ -375,8 +377,8 @@ class OmniboxEditModel { // Conversion between user text and display text. User text is the text the // user has input. Display text is the text being shown in the edit. The // two are different if a keyword is selected. - string16 DisplayTextFromUserText(const string16& text) const; - string16 UserTextFromDisplayText(const string16& text) const; + base::string16 DisplayTextFromUserText(const base::string16& text) const; + base::string16 UserTextFromDisplayText(const base::string16& text) const; // If there's a selected match, copies it into |match|. Else, returns the // default match for the current text, as well as the alternate nav URL, if @@ -394,13 +396,13 @@ class OmniboxEditModel { // foo| -> foo | (a space was appended to a keyword) // foo[bar] -> foo | (a space replaced other text after a keyword) // Returns true if the current keyword is accepted. - bool MaybeAcceptKeywordBySpace(const string16& new_text); + bool MaybeAcceptKeywordBySpace(const base::string16& new_text); // Checks whether the user inserted a space into |old_text| and by doing so // created a |new_text| that looks like "<keyword> <search phrase>". bool CreatedKeywordSearchByInsertingSpaceInMiddle( - const string16& old_text, - const string16& new_text, + const base::string16& old_text, + const base::string16& new_text, size_t caret_position) const; // Checks if a given character is a valid space character for accepting @@ -415,7 +417,7 @@ class OmniboxEditModel { // Sets |match| and |alternate_nav_url| based on classifying |text|. // |alternate_nav_url| may be NULL. - void ClassifyStringForPasteAndGo(const string16& text, + void ClassifyStringForPasteAndGo(const base::string16& text, AutocompleteMatch* match, GURL* alternate_nav_url) const; @@ -441,7 +443,7 @@ class OmniboxEditModel { FocusSource focus_source_; // The URL of the currently displayed page. - string16 permanent_text_; + base::string16 permanent_text_; // This flag is true when the user has modified the contents of the edit, but // not yet accepted them. We use this to determine when we need to save @@ -452,7 +454,7 @@ class OmniboxEditModel { // The text that the user has entered. This does not include inline // autocomplete text that has not yet been accepted. - string16 user_text_; + base::string16 user_text_; // We keep track of when the user last focused on the omnibox. base::TimeTicks last_omnibox_focus_; @@ -482,7 +484,7 @@ class OmniboxEditModel { // simply ask the popup for the desired URL directly. As a result, the // contents of this variable only need to be updated when the popup is closed // but user_input_in_progress_ is not being cleared. - string16 url_for_remembered_user_selection_; + base::string16 url_for_remembered_user_selection_; // Inline autocomplete is allowed if the user has not just deleted text, and // no temporary text is showing. In this case, inline_autocomplete_text_ is @@ -492,7 +494,7 @@ class OmniboxEditModel { // text (actions that close the popup should either accept the text, convert // it to a normal selection, or change the edit entirely). bool just_deleted_text_; - string16 inline_autocomplete_text_; + base::string16 inline_autocomplete_text_; // Used by OnPopupDataChanged to keep track of whether there is currently a // temporary text. @@ -525,7 +527,7 @@ class OmniboxEditModel { // selected keyword, or just some input text that looks like a keyword (so we // can show a hint to press <tab>). This is the keyword in either case; // is_keyword_hint_ (below) distinguishes the two cases. - string16 keyword_; + base::string16 keyword_; // True if the keyword associated with this match is merely a hint, i.e. the // user hasn't actually selected a keyword yet. When this is true, we can use diff --git a/chrome/browser/ui/omnibox/omnibox_navigation_observer.cc b/chrome/browser/ui/omnibox/omnibox_navigation_observer.cc index b7b9057..98750ff 100644 --- a/chrome/browser/ui/omnibox/omnibox_navigation_observer.cc +++ b/chrome/browser/ui/omnibox/omnibox_navigation_observer.cc @@ -52,7 +52,7 @@ bool IsValidNavigation(const GURL& original_url, const GURL& final_url) { OmniboxNavigationObserver::OmniboxNavigationObserver( Profile* profile, - const string16& text, + const base::string16& text, const AutocompleteMatch& match, const AutocompleteMatch& alternate_nav_match) : text_(text), diff --git a/chrome/browser/ui/omnibox/omnibox_navigation_observer.h b/chrome/browser/ui/omnibox/omnibox_navigation_observer.h index 1d0a6bc..f4a795c 100644 --- a/chrome/browser/ui/omnibox/omnibox_navigation_observer.h +++ b/chrome/browser/ui/omnibox/omnibox_navigation_observer.h @@ -54,7 +54,7 @@ class OmniboxNavigationObserver : public content::NotificationObserver, }; OmniboxNavigationObserver(Profile* profile, - const string16& text, + const base::string16& text, const AutocompleteMatch& match, const AutocompleteMatch& alternate_nav_match); virtual ~OmniboxNavigationObserver(); @@ -94,7 +94,7 @@ class OmniboxNavigationObserver : public content::NotificationObserver, // the alternate nav infobar if necessary, and deletes |this|. void OnAllLoadingFinished(); - const string16 text_; + const base::string16 text_; const AutocompleteMatch match_; const AutocompleteMatch alternate_nav_match_; scoped_refptr<history::ShortcutsBackend> shortcuts_backend_; // May be NULL diff --git a/chrome/browser/ui/omnibox/omnibox_popup_model.cc b/chrome/browser/ui/omnibox/omnibox_popup_model.cc index 2f782cd..d7d88ba 100644 --- a/chrome/browser/ui/omnibox/omnibox_popup_model.cc +++ b/chrome/browser/ui/omnibox/omnibox_popup_model.cc @@ -106,7 +106,7 @@ void OmniboxPopupModel::SetSelectedLine(size_t line, // Update the edit with the new data for this match. // TODO(pkasting): If |selected_line_| moves to the controller, this can be // eliminated and just become a call to the observer on the edit. - string16 keyword; + base::string16 keyword; bool is_keyword_hint; match.GetKeywordUIState(edit_model_->profile(), &keyword, &is_keyword_hint); diff --git a/chrome/browser/ui/omnibox/omnibox_view.cc b/chrome/browser/ui/omnibox/omnibox_view.cc index 0387b1e..79cafa0 100644 --- a/chrome/browser/ui/omnibox/omnibox_view.cc +++ b/chrome/browser/ui/omnibox/omnibox_view.cc @@ -16,24 +16,24 @@ #include "ui/base/clipboard/clipboard.h" // static -string16 OmniboxView::StripJavascriptSchemas(const string16& text) { - const string16 kJsPrefix(ASCIIToUTF16(content::kJavaScriptScheme) + +string16 OmniboxView::StripJavascriptSchemas(const base::string16& text) { + const base::string16 kJsPrefix(ASCIIToUTF16(content::kJavaScriptScheme) + ASCIIToUTF16(":")); - string16 out(text); + base::string16 out(text); while (StartsWith(out, kJsPrefix, false)) TrimWhitespace(out.substr(kJsPrefix.length()), TRIM_LEADING, &out); return out; } // static -string16 OmniboxView::SanitizeTextForPaste(const string16& text) { +string16 OmniboxView::SanitizeTextForPaste(const base::string16& text) { // Check for non-newline whitespace; if found, collapse whitespace runs down // to single spaces. // TODO(shess): It may also make sense to ignore leading or // trailing whitespace when making this determination. for (size_t i = 0; i < text.size(); ++i) { if (IsWhitespace(text[i]) && text[i] != '\n' && text[i] != '\r') { - const string16 collapsed = CollapseWhitespace(text, false); + const base::string16 collapsed = CollapseWhitespace(text, false); // If the user is pasting all-whitespace, paste a single space // rather than nothing, since pasting nothing feels broken. return collapsed.empty() ? @@ -51,7 +51,7 @@ string16 OmniboxView::GetClipboardText() { ui::Clipboard* clipboard = ui::Clipboard::GetForCurrentThread(); if (clipboard->IsFormatAvailable(ui::Clipboard::GetPlainTextWFormatType(), ui::CLIPBOARD_TYPE_COPY_PASTE)) { - string16 text; + base::string16 text; clipboard->ReadText(ui::CLIPBOARD_TYPE_COPY_PASTE, &text); return SanitizeTextForPaste(text); } @@ -73,7 +73,7 @@ string16 OmniboxView::GetClipboardText() { return StripJavascriptSchemas(UTF8ToUTF16(url.spec())); } - return string16(); + return base::string16(); } OmniboxView::~OmniboxView() { @@ -102,12 +102,12 @@ int OmniboxView::GetIcon() const { model_->CurrentTextType() : AutocompleteMatchType::URL_WHAT_YOU_TYPED); } -void OmniboxView::SetUserText(const string16& text) { +void OmniboxView::SetUserText(const base::string16& text) { SetUserText(text, text, true); } -void OmniboxView::SetUserText(const string16& text, - const string16& display_text, +void OmniboxView::SetUserText(const base::string16& text, + const base::string16& display_text, bool update_popup) { if (model_.get()) model_->SetUserText(text); diff --git a/chrome/browser/ui/omnibox/omnibox_view.h b/chrome/browser/ui/omnibox/omnibox_view.h index 1899590..d56d120 100644 --- a/chrome/browser/ui/omnibox/omnibox_view.h +++ b/chrome/browser/ui/omnibox/omnibox_view.h @@ -86,7 +86,7 @@ class OmniboxView { // Returns the current text of the edit control, which could be the // "temporary" text set by the popup, the "permanent" text set by the // browser, or just whatever the user has currently typed. - virtual string16 GetText() const = 0; + virtual base::string16 GetText() const = 0; // |true| if the user is in the process of editing the field, or if // the field is empty. @@ -98,14 +98,14 @@ class OmniboxView { // The user text is the text the user has manually keyed in. When present, // this is shown in preference to the permanent text; hitting escape will // revert to the permanent text. - void SetUserText(const string16& text); - virtual void SetUserText(const string16& text, - const string16& display_text, + void SetUserText(const base::string16& text); + virtual void SetUserText(const base::string16& text, + const base::string16& display_text, bool update_popup); // Sets the window text and the caret position. |notify_text_changed| is true // if the model should be notified of the change. - virtual void SetWindowTextAndCaretPos(const string16& text, + virtual void SetWindowTextAndCaretPos(const base::string16& text, size_t caret_pos, bool update_popup, bool notify_text_changed) = 0; @@ -164,7 +164,7 @@ class OmniboxView { // when there wasn't previously a temporary text and thus we need to save off // the user's existing selection. |notify_text_changed| is true if the model // should be notified of the change. - virtual void OnTemporaryTextMaybeChanged(const string16& display_text, + virtual void OnTemporaryTextMaybeChanged(const base::string16& display_text, bool save_original_selection, bool notify_text_changed) = 0; @@ -173,7 +173,7 @@ class OmniboxView { // the user input portion of that (so, up to but not including the inline // autocompletion). Returns whether the display text actually changed. virtual bool OnInlineAutocompleteTextMaybeChanged( - const string16& display_text, size_t user_text_length) = 0; + const base::string16& display_text, size_t user_text_length) = 0; // Called when the inline autocomplete text in the model has been cleared. virtual void OnInlineAutocompleteTextCleared() = 0; @@ -201,10 +201,10 @@ class OmniboxView { virtual gfx::NativeView GetRelativeWindowForPopup() const = 0; // Shows |input| as gray suggested text after what the user has typed. - virtual void SetGrayTextAutocompletion(const string16& input) = 0; + virtual void SetGrayTextAutocompletion(const base::string16& input) = 0; // Returns the current gray suggested text. - virtual string16 GetGrayTextAutocompletion() const = 0; + virtual base::string16 GetGrayTextAutocompletion() const = 0; // Returns the width in pixels needed to display the current text. The // returned value includes margins. @@ -232,7 +232,7 @@ class OmniboxView { #endif // Returns |text| with any leading javascript schemas stripped. - static string16 StripJavascriptSchemas(const string16& text); + static base::string16 StripJavascriptSchemas(const base::string16& text); // First, calls StripJavascriptSchemas(). Then automatically collapses // internal whitespace as follows: @@ -241,12 +241,12 @@ class OmniboxView { // etc. So all newlines are removed. // * Otherwise, users may be pasting in search data, e.g. street addresses. In // this case, runs of whitespace are collapsed down to single spaces. - static string16 SanitizeTextForPaste(const string16& text); + static base::string16 SanitizeTextForPaste(const base::string16& text); // Returns the current clipboard contents as a string that can be pasted in. // In addition to just getting CF_UNICODETEXT out, this can also extract URLs // from bookmarks on the clipboard. - static string16 GetClipboardText(); + static base::string16 GetClipboardText(); protected: OmniboxView(Profile* profile, diff --git a/chrome/browser/ui/omnibox/omnibox_view_browsertest.cc b/chrome/browser/ui/omnibox/omnibox_view_browsertest.cc index 7023d45..69aa2ba 100644 --- a/chrome/browser/ui/omnibox/omnibox_view_browsertest.cc +++ b/chrome/browser/ui/omnibox/omnibox_view_browsertest.cc @@ -128,7 +128,7 @@ std::string GetPrimarySelectionText() { #endif // Stores the given text to clipboard. -void SetClipboardText(const string16& text) { +void SetClipboardText(const base::string16& text) { ui::Clipboard* clipboard = ui::Clipboard::GetForCurrentThread(); ui::ScopedClipboardWriter writer(clipboard, ui::CLIPBOARD_TYPE_COPY_PASTE); writer.WriteText(text); @@ -304,7 +304,7 @@ class OmniboxViewTest : public InProcessBrowserTest, entry.typed_count, time, false, history::SOURCE_BROWSED); if (entry.starred) - bookmark_utils::AddIfNotBookmarked(bookmark_model, url, string16()); + bookmark_utils::AddIfNotBookmarked(bookmark_model, url, base::string16()); // Wait at least for the AddPageWithDetails() call to finish. { content::NotificationRegistrar registrar; @@ -553,7 +553,7 @@ IN_PROC_BROWSER_TEST_F(OmniboxViewTest, MAYBE_Escape) { OmniboxView* omnibox_view = NULL; ASSERT_NO_FATAL_FAILURE(GetOmniboxView(&omnibox_view)); - string16 old_text = omnibox_view->GetText(); + base::string16 old_text = omnibox_view->GetText(); EXPECT_FALSE(old_text.empty()); EXPECT_TRUE(omnibox_view->IsSelectAll()); @@ -716,7 +716,7 @@ IN_PROC_BROWSER_TEST_F(OmniboxViewTest, MAYBE_EscapeToDefaultMatch) { ASSERT_NO_FATAL_FAILURE(WaitForAutocompleteControllerDone()); ASSERT_TRUE(popup_model->IsOpen()); - string16 old_text = omnibox_view->GetText(); + base::string16 old_text = omnibox_view->GetText(); // Make sure inline autocomplete is triggerred. EXPECT_GT(old_text.length(), arraysize(kInlineAutocompleteText) - 1); @@ -754,7 +754,7 @@ IN_PROC_BROWSER_TEST_F(OmniboxViewTest, MAYBE_BasicTextOperations) { OmniboxView* omnibox_view = NULL; ASSERT_NO_FATAL_FAILURE(GetOmniboxView(&omnibox_view)); - string16 old_text = omnibox_view->GetText(); + base::string16 old_text = omnibox_view->GetText(); EXPECT_EQ(UTF8ToUTF16(content::kAboutBlankURL), old_text); EXPECT_TRUE(omnibox_view->IsSelectAll()); @@ -821,7 +821,7 @@ IN_PROC_BROWSER_TEST_F(OmniboxViewTest, MAYBE_AcceptKeywordBySpace) { OmniboxView* omnibox_view = NULL; ASSERT_NO_FATAL_FAILURE(GetOmniboxView(&omnibox_view)); - string16 search_keyword(ASCIIToUTF16(kSearchKeyword)); + base::string16 search_keyword(ASCIIToUTF16(kSearchKeyword)); // Trigger keyword hint mode. ASSERT_NO_FATAL_FAILURE(SendKeySequence(kSearchKeywordKeys)); @@ -998,7 +998,7 @@ IN_PROC_BROWSER_TEST_F(OmniboxViewTest, MAYBE_AcceptKeywordBySpace) { ASSERT_NO_FATAL_FAILURE(SendKey(ui::VKEY_E, 0)); ASSERT_NO_FATAL_FAILURE(WaitForAutocompleteControllerDone()); ASSERT_TRUE(popup_model->IsOpen()); - string16 search_keyword2(ASCIIToUTF16(kSearchKeyword2)); + base::string16 search_keyword2(ASCIIToUTF16(kSearchKeyword2)); while ((omnibox_view->GetText() != search_keyword2) && (popup_model->selected_line() < popup_model->result().size() - 1)) omnibox_view->model()->OnUpOrDownKeyPressed(1); @@ -1089,7 +1089,7 @@ IN_PROC_BROWSER_TEST_F(OmniboxViewTest, MAYBE_DeleteItem) { OmniboxPopupModel* popup_model = omnibox_view->model()->popup_model(); ASSERT_TRUE(popup_model); - string16 old_text = omnibox_view->GetText(); + base::string16 old_text = omnibox_view->GetText(); // Input something that can match history items. omnibox_view->SetUserText(ASCIIToUTF16("site.com/p")); @@ -1102,7 +1102,7 @@ IN_PROC_BROWSER_TEST_F(OmniboxViewTest, MAYBE_DeleteItem) { ASSERT_TRUE(popup_model->IsOpen()); ASSERT_GE(popup_model->result().size(), 3U); - string16 user_text = omnibox_view->GetText(); + base::string16 user_text = omnibox_view->GetText(); ASSERT_EQ(ASCIIToUTF16("site.com/p"), user_text); omnibox_view->SelectAll(true); ASSERT_TRUE(omnibox_view->IsSelectAll()); @@ -1111,7 +1111,7 @@ IN_PROC_BROWSER_TEST_F(OmniboxViewTest, MAYBE_DeleteItem) { size_t default_line = popup_model->selected_line(); omnibox_view->model()->OnUpOrDownKeyPressed(1); ASSERT_EQ(default_line + 1, popup_model->selected_line()); - string16 selected_text = + base::string16 selected_text = popup_model->result().match_at(default_line + 1).fill_into_edit; // Temporary text is shown. ASSERT_EQ(selected_text, omnibox_view->GetText()); @@ -1183,7 +1183,7 @@ IN_PROC_BROWSER_TEST_F(OmniboxViewTest, MAYBE_TabAcceptKeyword) { OmniboxView* omnibox_view = NULL; ASSERT_NO_FATAL_FAILURE(GetOmniboxView(&omnibox_view)); - string16 text = ASCIIToUTF16(kSearchKeyword); + base::string16 text = ASCIIToUTF16(kSearchKeyword); // Trigger keyword hint mode. ASSERT_NO_FATAL_FAILURE(SendKeySequence(kSearchKeywordKeys)); @@ -1288,7 +1288,7 @@ IN_PROC_BROWSER_TEST_F(OmniboxViewTest, MAYBE_TabTraverseResultsTest) { ASSERT_NO_FATAL_FAILURE(WaitForAutocompleteControllerDone()); // Trigger keyword mode by tab. - string16 text = ASCIIToUTF16(kSearchKeyword); + base::string16 text = ASCIIToUTF16(kSearchKeyword); ASSERT_NO_FATAL_FAILURE(SendKey(ui::VKEY_TAB, 0)); ASSERT_FALSE(omnibox_view->model()->is_keyword_hint()); ASSERT_EQ(text, omnibox_view->model()->keyword()); @@ -1371,7 +1371,7 @@ IN_PROC_BROWSER_TEST_F(OmniboxViewTest, ASSERT_NO_FATAL_FAILURE(WaitForAutocompleteControllerDone()); ASSERT_TRUE(popup_model->IsOpen()); - string16 old_text = omnibox_view->GetText(); + base::string16 old_text = omnibox_view->GetText(); // Make sure inline autocomplete is triggerred. EXPECT_GT(old_text.length(), arraysize(kInlineAutocompleteText) - 1); @@ -1391,7 +1391,7 @@ IN_PROC_BROWSER_TEST_F(OmniboxViewTest, UndoRedo) { OmniboxView* omnibox_view = NULL; ASSERT_NO_FATAL_FAILURE(GetOmniboxView(&omnibox_view)); - string16 old_text = omnibox_view->GetText(); + base::string16 old_text = omnibox_view->GetText(); EXPECT_EQ(UTF8ToUTF16(content::kAboutBlankURL), old_text); EXPECT_TRUE(omnibox_view->IsSelectAll()); @@ -1474,7 +1474,7 @@ IN_PROC_BROWSER_TEST_F(OmniboxViewTest, DoesNotUpdateAutocompleteOnBlur) { size_t start, end; omnibox_view->GetSelectionBounds(&start, &end); EXPECT_TRUE(start != end); - string16 old_autocomplete_text = + base::string16 old_autocomplete_text = omnibox_view->model()->autocomplete_controller()->input().text(); // Unfocus the omnibox. This should clear the text field selection and @@ -1600,7 +1600,7 @@ IN_PROC_BROWSER_TEST_F(OmniboxViewTest, CopyURLToClipboard) { // These platforms should read bookmark format. #if defined(OS_WIN) || defined(OS_CHROMEOS) || defined(OS_MACOSX) - string16 title; + base::string16 title; std::string url; clipboard->ReadBookmark(&title, &url); EXPECT_EQ(target_url, url); @@ -1646,7 +1646,7 @@ IN_PROC_BROWSER_TEST_F(OmniboxViewTest, CutURLToClipboard) { // These platforms should read bookmark format. #if defined(OS_WIN) || defined(OS_CHROMEOS) || defined(OS_MACOSX) - string16 title; + base::string16 title; std::string url; clipboard->ReadBookmark(&title, &url); EXPECT_EQ(target_url, url); @@ -1790,9 +1790,9 @@ IN_PROC_BROWSER_TEST_F(OmniboxViewTest, scoped_ptr<ToolbarModel> toolbar_model(test_toolbar_model); browser()->swap_toolbar_models(&toolbar_model); - string16 url_a(ASCIIToUTF16("http://www.a.com/")); - string16 url_b(ASCIIToUTF16("http://www.b.com/")); - string16 url_c(ASCIIToUTF16("http://www.c.com/")); + base::string16 url_a(ASCIIToUTF16("http://www.a.com/")); + base::string16 url_b(ASCIIToUTF16("http://www.b.com/")); + base::string16 url_c(ASCIIToUTF16("http://www.c.com/")); chrome::FocusLocationBar(browser()); test_toolbar_model->set_text(url_a); omnibox_view->Update(); diff --git a/chrome/browser/ui/omnibox/omnibox_view_unittest.cc b/chrome/browser/ui/omnibox/omnibox_view_unittest.cc index d2dc86b..5056e76 100644 --- a/chrome/browser/ui/omnibox/omnibox_view_unittest.cc +++ b/chrome/browser/ui/omnibox/omnibox_view_unittest.cc @@ -46,20 +46,20 @@ TEST_F(OmniboxViewTest, TestStripSchemasUnsafeForPaste) { TEST_F(OmniboxViewTest, SanitizeTextForPaste) { // Broken URL has newlines stripped. - const string16 kWrappedURL(ASCIIToUTF16( + const base::string16 kWrappedURL(ASCIIToUTF16( "http://www.chromium.org/developers/testing/chromium-\n" "build-infrastructure/tour-of-the-chromium-buildbot")); - const string16 kFixedURL(ASCIIToUTF16( + const base::string16 kFixedURL(ASCIIToUTF16( "http://www.chromium.org/developers/testing/chromium-" "build-infrastructure/tour-of-the-chromium-buildbot")); EXPECT_EQ(kFixedURL, OmniboxView::SanitizeTextForPaste(kWrappedURL)); // Multi-line address is converted to a single-line address. - const string16 kWrappedAddress(ASCIIToUTF16( + const base::string16 kWrappedAddress(ASCIIToUTF16( "1600 Amphitheatre Parkway\nMountain View, CA")); - const string16 kFixedAddress(ASCIIToUTF16( + const base::string16 kFixedAddress(ASCIIToUTF16( "1600 Amphitheatre Parkway Mountain View, CA")); EXPECT_EQ(kFixedAddress, OmniboxView::SanitizeTextForPaste(kWrappedAddress)); } @@ -67,7 +67,7 @@ TEST_F(OmniboxViewTest, SanitizeTextForPaste) { TEST_F(OmniboxViewTest, GetClipboardText) { ui::Clipboard* clipboard = ui::Clipboard::GetForCurrentThread(); - const string16 kPlainText(ASCIIToUTF16("test text")); + const base::string16 kPlainText(ASCIIToUTF16("test text")); const std::string kURL("http://www.example.com/"); // Can we pull straight text off the clipboard? @@ -79,8 +79,8 @@ TEST_F(OmniboxViewTest, GetClipboardText) { EXPECT_EQ(kPlainText, OmniboxView::GetClipboardText()); // Can we pull a string consists of white-space? - const string16 kSpace6(ASCIIToUTF16(" ")); - const string16 kSpace1(ASCIIToUTF16(" ")); + const base::string16 kSpace6(ASCIIToUTF16(" ")); + const base::string16 kSpace1(ASCIIToUTF16(" ")); { ui::ScopedClipboardWriter clipboard_writer(clipboard, ui::CLIPBOARD_TYPE_COPY_PASTE); @@ -100,7 +100,7 @@ TEST_F(OmniboxViewTest, GetClipboardText) { // Bookmark clipboard apparently not supported on Linux. // See TODO on ClipboardText.BookmarkTest. #if !defined(OS_POSIX) || defined(OS_MACOSX) - const string16 kTitle(ASCIIToUTF16("The Example Company")); + const base::string16 kTitle(ASCIIToUTF16("The Example Company")); // Can we pull a bookmark off the clipboard? { ui::ScopedClipboardWriter clipboard_writer(clipboard, @@ -121,7 +121,7 @@ TEST_F(OmniboxViewTest, GetClipboardText) { // Do we get nothing if there is neither text nor a bookmark? { - const string16 kMarkup(ASCIIToUTF16("<strong>Hi!</string>")); + const base::string16 kMarkup(ASCIIToUTF16("<strong>Hi!</string>")); ui::ScopedClipboardWriter clipboard_writer(clipboard, ui::CLIPBOARD_TYPE_COPY_PASTE); clipboard_writer.WriteHTML(kMarkup, kURL); diff --git a/chrome/browser/ui/panels/native_panel_stack_window.h b/chrome/browser/ui/panels/native_panel_stack_window.h index a8c63ca..ee54173 100644 --- a/chrome/browser/ui/panels/native_panel_stack_window.h +++ b/chrome/browser/ui/panels/native_panel_stack_window.h @@ -18,7 +18,7 @@ class Vector2d; class NativePanelStackWindowDelegate { public: // Returns the title representing the whole stack. - virtual string16 GetTitle() const = 0; + virtual base::string16 GetTitle() const = 0; // Returns the icon denoting the whole stack. virtual gfx::Image GetIcon() const = 0; diff --git a/chrome/browser/ui/panels/panel.cc b/chrome/browser/ui/panels/panel.cc index 16b1013..b011d63 100644 --- a/chrome/browser/ui/panels/panel.cc +++ b/chrome/browser/ui/panels/panel.cc @@ -748,9 +748,9 @@ bool Panel::ExecuteCommandIfEnabled(int id) { return false; } -string16 Panel::GetWindowTitle() const { +base::string16 Panel::GetWindowTitle() const { content::WebContents* contents = GetWebContents(); - string16 title; + base::string16 title; // |contents| can be NULL during the window's creation. if (contents) { @@ -891,8 +891,9 @@ void Panel::UpdateAppIcon() { void Panel::FormatTitleForDisplay(string16* title) { size_t current_index = 0; size_t match_index; - while ((match_index = title->find(L'\n', current_index)) != string16::npos) { - title->replace(match_index, 1, string16()); + while ((match_index = title->find(L'\n', current_index)) != + base::string16::npos) { + title->replace(match_index, 1, base::string16()); current_index = match_index; } } diff --git a/chrome/browser/ui/panels/panel.h b/chrome/browser/ui/panels/panel.h index 3e5bde5..5a84428 100644 --- a/chrome/browser/ui/panels/panel.h +++ b/chrome/browser/ui/panels/panel.h @@ -276,7 +276,7 @@ class Panel : public ui::BaseWindow, bool ExecuteCommandIfEnabled(int id); // Gets the title of the window from the web contents. - string16 GetWindowTitle() const; + base::string16 GetWindowTitle() const; // Gets the Favicon of the web contents. gfx::Image GetCurrentPageIcon() const; diff --git a/chrome/browser/ui/panels/panel_browsertest.cc b/chrome/browser/ui/panels/panel_browsertest.cc index 0549d50..80ef7a8 100644 --- a/chrome/browser/ui/panels/panel_browsertest.cc +++ b/chrome/browser/ui/panels/panel_browsertest.cc @@ -1440,8 +1440,8 @@ IN_PROC_BROWSER_TEST_F(PanelBrowserTest, OnBeforeUnloadOnClose) { PanelManager* panel_manager = PanelManager::GetInstance(); EXPECT_EQ(0, panel_manager->num_panels()); // No panels initially. - const string16 title_first_close = UTF8ToUTF16("TitleFirstClose"); - const string16 title_second_close = UTF8ToUTF16("TitleSecondClose"); + const base::string16 title_first_close = UTF8ToUTF16("TitleFirstClose"); + const base::string16 title_second_close = UTF8ToUTF16("TitleSecondClose"); // Create a test panel with web contents loaded. CreatePanelParams params("PanelTest1", gfx::Rect(0, 0, 300, 300), diff --git a/chrome/browser/ui/panels/stacked_panel_collection.cc b/chrome/browser/ui/panels/stacked_panel_collection.cc index 92e4aa6..ca8c28d 100644 --- a/chrome/browser/ui/panels/stacked_panel_collection.cc +++ b/chrome/browser/ui/panels/stacked_panel_collection.cc @@ -141,7 +141,7 @@ void StackedPanelCollection::RefreshLayoutWithTopPanelStartingAt( string16 StackedPanelCollection::GetTitle() const { if (panels_.empty()) - return string16(); + return base::string16(); Panel* panel = panels_.front(); const extensions::Extension* extension = panel->GetExtension(); diff --git a/chrome/browser/ui/panels/stacked_panel_collection.h b/chrome/browser/ui/panels/stacked_panel_collection.h index 147abcb..790910a 100644 --- a/chrome/browser/ui/panels/stacked_panel_collection.h +++ b/chrome/browser/ui/panels/stacked_panel_collection.h @@ -104,7 +104,7 @@ class StackedPanelCollection : public PanelCollection, }; // Overridden from PanelBoundsBatchUpdateObserver: - virtual string16 GetTitle() const OVERRIDE; + virtual base::string16 GetTitle() const OVERRIDE; virtual gfx::Image GetIcon() const OVERRIDE; virtual void PanelBoundsBatchUpdateCompleted() OVERRIDE; diff --git a/chrome/browser/ui/process_singleton_dialog_linux.h b/chrome/browser/ui/process_singleton_dialog_linux.h index c80aa30..ffea405 100644 --- a/chrome/browser/ui/process_singleton_dialog_linux.h +++ b/chrome/browser/ui/process_singleton_dialog_linux.h @@ -12,7 +12,7 @@ // started by that point in the startup process. // Shows the dialog, and returns once the dialog has been closed. -bool ShowProcessSingletonDialog(const string16& message, - const string16& relaunch_text); +bool ShowProcessSingletonDialog(const base::string16& message, + const base::string16& relaunch_text); #endif // CHROME_BROWSER_UI_PROCESS_SINGLETON_DIALOG_LINUX_H_ diff --git a/chrome/browser/ui/protocol_dialog_delegate.h b/chrome/browser/ui/protocol_dialog_delegate.h index 87140c1..48ff0b2 100644 --- a/chrome/browser/ui/protocol_dialog_delegate.h +++ b/chrome/browser/ui/protocol_dialog_delegate.h @@ -27,9 +27,9 @@ class ProtocolDialogDelegate { // dialog is checked. virtual void DoCancel(const GURL& url, bool dont_block) const = 0; - virtual string16 GetMessageText() const = 0; - virtual string16 GetCheckboxText() const = 0; - virtual string16 GetTitleText() const = 0; + virtual base::string16 GetMessageText() const = 0; + virtual base::string16 GetCheckboxText() const = 0; + virtual base::string16 GetTitleText() const = 0; const GURL& url() const { return url_; } diff --git a/chrome/browser/ui/screen_capture_notification_ui.h b/chrome/browser/ui/screen_capture_notification_ui.h index b714c2d..c3d3dbe 100644 --- a/chrome/browser/ui/screen_capture_notification_ui.h +++ b/chrome/browser/ui/screen_capture_notification_ui.h @@ -17,7 +17,8 @@ class ScreenCaptureNotificationUI : public content::MediaStreamUI { // Creates platform-specific screen capture notification UI. |text| specifies // the text that should be shown in the notification. - static scoped_ptr<ScreenCaptureNotificationUI> Create(const string16& text); + static scoped_ptr<ScreenCaptureNotificationUI> Create( + const base::string16& text); }; #endif // CHROME_BROWSER_UI_SCREEN_CAPTURE_NOTIFICATION_UI_H_ diff --git a/chrome/browser/ui/screen_capture_notification_ui_stub.cc b/chrome/browser/ui/screen_capture_notification_ui_stub.cc index 83a98b8..5dfb1a8 100644 --- a/chrome/browser/ui/screen_capture_notification_ui_stub.cc +++ b/chrome/browser/ui/screen_capture_notification_ui_stub.cc @@ -19,7 +19,7 @@ class ScreenCaptureNotificationUIStub : public ScreenCaptureNotificationUI { // static scoped_ptr<ScreenCaptureNotificationUI> ScreenCaptureNotificationUI::Create( - const string16& title) { + const base::string16& title) { return scoped_ptr<ScreenCaptureNotificationUI>( new ScreenCaptureNotificationUIStub()); } diff --git a/chrome/browser/ui/search/instant_controller.cc b/chrome/browser/ui/search/instant_controller.cc index c208a26..f3a2a4f 100644 --- a/chrome/browser/ui/search/instant_controller.cc +++ b/chrome/browser/ui/search/instant_controller.cc @@ -53,7 +53,7 @@ bool IsContentsFrom(const InstantPage* page, // supplied |search_terms|. Sets the |search_terms| on the transient entry for // search terms extraction to work correctly. void EnsureSearchTermsAreSet(content::WebContents* contents, - const string16& search_terms) { + const base::string16& search_terms) { content::NavigationController* controller = &contents->GetController(); // If search terms are already correct or there is already a transient entry @@ -142,7 +142,7 @@ void InstantController::InstantPageLoadFailed(content::WebContents* contents) { RedirectToLocalNTP(contents); } -bool InstantController::SubmitQuery(const string16& search_terms) { +bool InstantController::SubmitQuery(const base::string16& search_terms) { if (instant_tab_ && instant_tab_->supports_instant() && search_mode_.is_origin_search()) { // Use |instant_tab_| to run the query if we're already on a search results diff --git a/chrome/browser/ui/search/instant_controller.h b/chrome/browser/ui/search/instant_controller.h index 4f32f06..866ad2c 100644 --- a/chrome/browser/ui/search/instant_controller.h +++ b/chrome/browser/ui/search/instant_controller.h @@ -62,7 +62,7 @@ class InstantController : public InstantPage::Delegate { // Called if the browser is navigating to a search URL for |search_terms| with // search-term-replacement enabled. If |instant_tab_| can be used to process // the search, this does so and returns true. Else, returns false. - bool SubmitQuery(const string16& search_terms); + bool SubmitQuery(const base::string16& search_terms); // Called to indicate that the omnibox focus state changed with the given // |reason|. If |focus_state| is FOCUS_NONE, |view_gaining_focus| is set to diff --git a/chrome/browser/ui/search/instant_extended_interactive_uitest.cc b/chrome/browser/ui/search/instant_extended_interactive_uitest.cc index 4d03f33..38aac27 100644 --- a/chrome/browser/ui/search/instant_extended_interactive_uitest.cc +++ b/chrome/browser/ui/search/instant_extended_interactive_uitest.cc @@ -229,7 +229,7 @@ class InstantExtendedTest : public InProcessBrowserTest, GURL search(template_url->url_ref().ReplaceSearchTerms( TemplateURLRef::SearchTermsArgs(term))); history->AddPageWithDetails( - search, string16(), visit_count, visit_count, + search, base::string16(), visit_count, visit_count, base::Time::Now(), false, history::SOURCE_BROWSED); history->SetKeywordSearchTermsForURL( search, template_url->id(), term); diff --git a/chrome/browser/ui/search/instant_extended_manual_interactive_uitest.cc b/chrome/browser/ui/search/instant_extended_manual_interactive_uitest.cc index a16e16e..8660b1a 100644 --- a/chrome/browser/ui/search/instant_extended_manual_interactive_uitest.cc +++ b/chrome/browser/ui/search/instant_extended_manual_interactive_uitest.cc @@ -166,7 +166,7 @@ IN_PROC_BROWSER_TEST_F(InstantExtendedManualTest, MANUAL_SearchesFromFakebox) { EXPECT_EQ(OMNIBOX_FOCUS_VISIBLE, omnibox()->model()->focus_state()); // Pressing enter should search for [test]. - const string16& search_title = ASCIIToUTF16("test - Google Search"); + const base::string16& search_title = ASCIIToUTF16("test - Google Search"); content::TitleWatcher title_watcher(active_tab, search_title); PressEnterAndWaitForNavigation(); EXPECT_EQ(search_title, title_watcher.WaitAndGetTitle()); diff --git a/chrome/browser/ui/search/instant_page.cc b/chrome/browser/ui/search/instant_page.cc index 5c68682..7e1bec7 100644 --- a/chrome/browser/ui/search/instant_page.cc +++ b/chrome/browser/ui/search/instant_page.cc @@ -71,7 +71,7 @@ bool InstantPage::ShouldProcessAboutToNavigateMainFrame() { void InstantPage::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 */, @@ -92,11 +92,11 @@ void InstantPage::DidNavigateMainFrame( void InstantPage::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 (is_main_frame) delegate_->InstantPageLoadFailed(contents()); diff --git a/chrome/browser/ui/search/instant_page.h b/chrome/browser/ui/search/instant_page.h index 6fd20596..8967d91 100644 --- a/chrome/browser/ui/search/instant_page.h +++ b/chrome/browser/ui/search/instant_page.h @@ -114,7 +114,7 @@ class InstantPage : public content::WebContentsObserver, // Overridden from content::WebContentsObserver: 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, @@ -124,11 +124,11 @@ class InstantPage : public content::WebContentsObserver, const content::FrameNavigateParams& params) 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; // Overridden from SearchModelObserver: diff --git a/chrome/browser/ui/search/instant_test_utils.h b/chrome/browser/ui/search/instant_test_utils.h index 300866a..1e3c7b5 100644 --- a/chrome/browser/ui/search/instant_test_utils.h +++ b/chrome/browser/ui/search/instant_test_utils.h @@ -95,7 +95,7 @@ class InstantTestBase { bool* loaded); // Returns the omnibox's inline autocompletion (shown in blue highlight). - string16 GetBlueText(); + base::string16 GetBlueText(); private: GURL instant_url_; diff --git a/chrome/browser/ui/search/search_ipc_router.cc b/chrome/browser/ui/search/search_ipc_router.cc index ff1a3f7..e062553 100644 --- a/chrome/browser/ui/search/search_ipc_router.cc +++ b/chrome/browser/ui/search/search_ipc_router.cc @@ -25,8 +25,9 @@ void SearchIPCRouter::DetermineIfPageSupportsInstant() { Send(new ChromeViewMsg_DetermineIfPageSupportsInstant(routing_id())); } -void SearchIPCRouter::SendChromeIdentityCheckResult(const string16& identity, - bool identity_match) { +void SearchIPCRouter::SendChromeIdentityCheckResult( + const base::string16& identity, + bool identity_match) { if (!policy_->ShouldProcessChromeIdentityCheck()) return; @@ -85,7 +86,7 @@ void SearchIPCRouter::ToggleVoiceSearch() { Send(new ChromeViewMsg_SearchBoxToggleVoiceSearch(routing_id())); } -void SearchIPCRouter::Submit(const string16& text) { +void SearchIPCRouter::Submit(const base::string16& text) { if (!policy_->ShouldSubmitQuery()) return; @@ -221,7 +222,7 @@ void SearchIPCRouter::OnLogEvent(int page_id, NTPLoggingEventType event) const { } void SearchIPCRouter::OnPasteAndOpenDropDown(int page_id, - const string16& text) const { + const base::string16& text) const { if (!web_contents()->IsActiveEntry(page_id)) return; @@ -232,8 +233,9 @@ void SearchIPCRouter::OnPasteAndOpenDropDown(int page_id, delegate_->PasteIntoOmnibox(text); } -void SearchIPCRouter::OnChromeIdentityCheck(int page_id, - const string16& identity) const { +void SearchIPCRouter::OnChromeIdentityCheck( + int page_id, + const base::string16& identity) const { if (!web_contents()->IsActiveEntry(page_id)) return; diff --git a/chrome/browser/ui/search/search_ipc_router.h b/chrome/browser/ui/search/search_ipc_router.h index c2475f30..70c1006 100644 --- a/chrome/browser/ui/search/search_ipc_router.h +++ b/chrome/browser/ui/search/search_ipc_router.h @@ -64,12 +64,12 @@ class SearchIPCRouter : public content::WebContentsObserver { // Called when the page wants to paste the |text| (or the clipboard contents // if the |text| is empty) into the omnibox. - virtual void PasteIntoOmnibox(const string16& text) = 0; + virtual void PasteIntoOmnibox(const base::string16& text) = 0; // Called when the SearchBox wants to verify the signed-in Chrome identity // against the provided |identity|. Will make a round-trip to the browser // and eventually return the result through SendChromeIdentityCheckResult. - virtual void OnChromeIdentityCheck(const string16& identity) = 0; + virtual void OnChromeIdentityCheck(const base::string16& identity) = 0; }; // An interface to be implemented by consumers of SearchIPCRouter objects to @@ -109,7 +109,7 @@ class SearchIPCRouter : public content::WebContentsObserver { void DetermineIfPageSupportsInstant(); // Tells the renderer about the result of the Chrome identity check. - void SendChromeIdentityCheckResult(const string16& identity, + void SendChromeIdentityCheckResult(const base::string16& identity, bool identity_match); // Tells the renderer information it needs to display promos. @@ -131,7 +131,7 @@ class SearchIPCRouter : public content::WebContentsObserver { void ToggleVoiceSearch(); // Tells the page that the user pressed Enter in the omnibox. - void Submit(const string16& text); + void Submit(const base::string16& text); // Called when the tab corresponding to |this| instance is activated. void OnTabActivated(); @@ -169,8 +169,8 @@ class SearchIPCRouter : public content::WebContentsObserver { void OnUndoMostVisitedDeletion(int page_id, const GURL& url) const; void OnUndoAllMostVisitedDeletions(int page_id) const; void OnLogEvent(int page_id, NTPLoggingEventType event) const; - void OnPasteAndOpenDropDown(int page_id, const string16& text) const; - void OnChromeIdentityCheck(int page_id, const string16& identity) const; + void OnPasteAndOpenDropDown(int page_id, const base::string16& text) const; + void OnChromeIdentityCheck(int page_id, const base::string16& identity) const; // Used by unit tests to set a fake delegate. void set_delegate(Delegate* delegate); diff --git a/chrome/browser/ui/search/search_ipc_router_unittest.cc b/chrome/browser/ui/search/search_ipc_router_unittest.cc index 0e5d6b3..40a4f56 100644 --- a/chrome/browser/ui/search/search_ipc_router_unittest.cc +++ b/chrome/browser/ui/search/search_ipc_router_unittest.cc @@ -52,8 +52,8 @@ class MockSearchIPCRouterDelegate : public SearchIPCRouter::Delegate { MOCK_METHOD1(OnUndoMostVisitedDeletion, void(const GURL& url)); MOCK_METHOD0(OnUndoAllMostVisitedDeletions, void()); MOCK_METHOD1(OnLogEvent, void(NTPLoggingEventType event)); - MOCK_METHOD1(PasteIntoOmnibox, void(const string16&)); - MOCK_METHOD1(OnChromeIdentityCheck, void(const string16& identity)); + MOCK_METHOD1(PasteIntoOmnibox, void(const base::string16&)); + MOCK_METHOD1(OnChromeIdentityCheck, void(const base::string16& identity)); }; class MockSearchIPCRouterPolicy : public SearchIPCRouter::Policy { @@ -355,7 +355,7 @@ TEST_F(SearchIPCRouterTest, ProcessChromeIdentityCheckMsg) { NavigateAndCommitActiveTab(GURL(chrome::kChromeSearchLocalNtpUrl)); SetupMockDelegateAndPolicy(); MockSearchIPCRouterPolicy* policy = GetSearchIPCRouterPolicy(); - const string16 test_identity = ASCIIToUTF16("foo@bar.com"); + const base::string16 test_identity = ASCIIToUTF16("foo@bar.com"); EXPECT_CALL(*mock_delegate(), OnChromeIdentityCheck(test_identity)).Times(1); EXPECT_CALL(*policy, ShouldProcessChromeIdentityCheck()).Times(1) .WillOnce(testing::Return(true)); @@ -373,7 +373,7 @@ TEST_F(SearchIPCRouterTest, IgnoreChromeIdentityCheckMsg) { SetupMockDelegateAndPolicy(); MockSearchIPCRouterPolicy* policy = GetSearchIPCRouterPolicy(); - const string16 test_identity = ASCIIToUTF16("foo@bar.com"); + const base::string16 test_identity = ASCIIToUTF16("foo@bar.com"); EXPECT_CALL(*mock_delegate(), OnChromeIdentityCheck(test_identity)).Times(0); EXPECT_CALL(*policy, ShouldProcessChromeIdentityCheck()).Times(1) .WillOnce(testing::Return(false)); @@ -538,7 +538,7 @@ TEST_F(SearchIPCRouterTest, IgnoreMessageIfThePageIsNotActive) { invalid_page_id, NTP_MOUSEOVER)); OnMessageReceived(*message); - string16 text; + base::string16 text; EXPECT_CALL(*mock_delegate(), PasteIntoOmnibox(text)).Times(0); EXPECT_CALL(*policy, ShouldProcessPasteIntoOmnibox(is_active_tab)).Times(0); message.reset(new ChromeViewHostMsg_PasteAndOpenDropdown( @@ -555,7 +555,7 @@ TEST_F(SearchIPCRouterTest, ProcessPasteAndOpenDropdownMsg) { bool is_active_tab = IsActiveTab(contents); EXPECT_TRUE(is_active_tab); - string16 text; + base::string16 text; EXPECT_CALL(*mock_delegate(), PasteIntoOmnibox(text)).Times(1); EXPECT_CALL(*policy, ShouldProcessPasteIntoOmnibox(is_active_tab)).Times(1) .WillOnce(testing::Return(true)); @@ -568,7 +568,7 @@ TEST_F(SearchIPCRouterTest, ProcessPasteAndOpenDropdownMsg) { TEST_F(SearchIPCRouterTest, IgnorePasteAndOpenDropdownMsg) { NavigateAndCommitActiveTab(GURL("chrome-search://foo/bar")); SetupMockDelegateAndPolicy(); - string16 text; + base::string16 text; EXPECT_CALL(*mock_delegate(), PasteIntoOmnibox(text)).Times(0); content::WebContents* contents = web_contents(); diff --git a/chrome/browser/ui/search/search_tab_helper.cc b/chrome/browser/ui/search/search_tab_helper.cc index 9218277..f779ede 100644 --- a/chrome/browser/ui/search/search_tab_helper.cc +++ b/chrome/browser/ui/search/search_tab_helper.cc @@ -199,7 +199,7 @@ void SearchTabHelper::SetSuggestionToPrefetch( ipc_router_.SetSuggestionToPrefetch(suggestion); } -void SearchTabHelper::Submit(const string16& text) { +void SearchTabHelper::Submit(const base::string16& text) { ipc_router_.Submit(text); } @@ -270,11 +270,11 @@ void SearchTabHelper::DidNavigateMainFrame( void SearchTabHelper::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 (is_main_frame && chrome::ShouldUseCacheableNTP() && @@ -491,7 +491,7 @@ void SearchTabHelper::OnLogEvent(NTPLoggingEventType event) { data->LogEvent(event); } -void SearchTabHelper::PasteIntoOmnibox(const string16& text) { +void SearchTabHelper::PasteIntoOmnibox(const base::string16& text) { // iOS and Android don't use the Instant framework. #if !defined(OS_IOS) && !defined(OS_ANDROID) Browser* browser = chrome::FindBrowserWithWebContents(web_contents()); @@ -503,7 +503,7 @@ void SearchTabHelper::PasteIntoOmnibox(const string16& text) { // from the clipboard already sanitized. The second case is needed to handle // drag-and-drop value and it has to be sanitazed before setting it into the // omnibox. - string16 text_to_paste = text.empty() ? omnibox->GetClipboardText() : + base::string16 text_to_paste = text.empty() ? omnibox->GetClipboardText() : omnibox->SanitizeTextForPaste(text); if (text_to_paste.empty()) @@ -519,10 +519,11 @@ void SearchTabHelper::PasteIntoOmnibox(const string16& text) { #endif } -void SearchTabHelper::OnChromeIdentityCheck(const string16& identity) { +void SearchTabHelper::OnChromeIdentityCheck(const base::string16& identity) { SigninManagerBase* manager = SigninManagerFactory::GetForProfile(profile()); if (manager) { - const string16 username = UTF8ToUTF16(manager->GetAuthenticatedUsername()); + const base::string16 username = + UTF8ToUTF16(manager->GetAuthenticatedUsername()); ipc_router_.SendChromeIdentityCheckResult(identity, identity == username); } diff --git a/chrome/browser/ui/search/search_tab_helper.h b/chrome/browser/ui/search/search_tab_helper.h index 7c62944..e6f28b9 100644 --- a/chrome/browser/ui/search/search_tab_helper.h +++ b/chrome/browser/ui/search/search_tab_helper.h @@ -72,7 +72,7 @@ class SearchTabHelper : public content::WebContentsObserver, void SetSuggestionToPrefetch(const InstantSuggestion& suggestion); // Tells the page that the user pressed Enter in the omnibox. - void Submit(const string16& text); + void Submit(const base::string16& text); // Called when the tab corresponding to |this| instance is activated. void OnTabActivated(); @@ -135,11 +135,11 @@ class SearchTabHelper : public content::WebContentsObserver, const content::FrameNavigateParams& params) 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; virtual void DidFinishLoad( int64 frame_id, @@ -160,8 +160,8 @@ class SearchTabHelper : public content::WebContentsObserver, virtual void OnUndoMostVisitedDeletion(const GURL& url) OVERRIDE; virtual void OnUndoAllMostVisitedDeletions() OVERRIDE; virtual void OnLogEvent(NTPLoggingEventType event) OVERRIDE; - virtual void PasteIntoOmnibox(const string16& text) OVERRIDE; - virtual void OnChromeIdentityCheck(const string16& identity) OVERRIDE; + virtual void PasteIntoOmnibox(const base::string16& text) OVERRIDE; + virtual void OnChromeIdentityCheck(const base::string16& identity) OVERRIDE; // Overridden from InstantServiceObserver: virtual void ThemeInfoChanged(const ThemeBackgroundInfo& theme_info) OVERRIDE; diff --git a/chrome/browser/ui/search/search_tab_helper_unittest.cc b/chrome/browser/ui/search/search_tab_helper_unittest.cc index 33d51dd..923983b 100644 --- a/chrome/browser/ui/search/search_tab_helper_unittest.cc +++ b/chrome/browser/ui/search/search_tab_helper_unittest.cc @@ -49,8 +49,8 @@ class MockSearchIPCRouterDelegate : public SearchIPCRouter::Delegate { MOCK_METHOD1(OnUndoMostVisitedDeletion, void(const GURL& url)); MOCK_METHOD0(OnUndoAllMostVisitedDeletions, void()); MOCK_METHOD1(OnLogEvent, void(NTPLoggingEventType event)); - MOCK_METHOD1(PasteIntoOmnibox, void(const string16&)); - MOCK_METHOD1(OnChromeIdentityCheck, void(const string16& identity)); + MOCK_METHOD1(PasteIntoOmnibox, void(const base::string16&)); + MOCK_METHOD1(OnChromeIdentityCheck, void(const base::string16& identity)); }; } // namespace @@ -141,7 +141,7 @@ TEST_F(SearchTabHelperTest, OnChromeIdentityCheckMatch) { SearchTabHelper::FromWebContents(web_contents()); ASSERT_NE(static_cast<SearchTabHelper*>(NULL), search_tab_helper); - const string16 test_identity = ASCIIToUTF16("foo@bar.com"); + const base::string16 test_identity = ASCIIToUTF16("foo@bar.com"); search_tab_helper->OnChromeIdentityCheck(test_identity); const IPC::Message* message = process()->sink().GetUniqueMessageMatching( @@ -161,7 +161,7 @@ TEST_F(SearchTabHelperTest, OnChromeIdentityCheckMismatch) { SearchTabHelper::FromWebContents(web_contents()); ASSERT_NE(static_cast<SearchTabHelper*>(NULL), search_tab_helper); - const string16 test_identity = ASCIIToUTF16("bar@foo.com"); + const base::string16 test_identity = ASCIIToUTF16("bar@foo.com"); search_tab_helper->OnChromeIdentityCheck(test_identity); const IPC::Message* message = process()->sink().GetUniqueMessageMatching( @@ -181,7 +181,7 @@ TEST_F(SearchTabHelperTest, OnChromeIdentityCheckSignedOutMatch) { SearchTabHelper::FromWebContents(web_contents()); ASSERT_NE(static_cast<SearchTabHelper*>(NULL), search_tab_helper); - const string16 test_identity; + const base::string16 test_identity; search_tab_helper->OnChromeIdentityCheck(test_identity); const IPC::Message* message = process()->sink().GetUniqueMessageMatching( @@ -201,7 +201,7 @@ TEST_F(SearchTabHelperTest, OnChromeIdentityCheckSignedOutMismatch) { SearchTabHelper::FromWebContents(web_contents()); ASSERT_NE(static_cast<SearchTabHelper*>(NULL), search_tab_helper); - const string16 test_identity = ASCIIToUTF16("bar@foo.com"); + const base::string16 test_identity = ASCIIToUTF16("bar@foo.com"); search_tab_helper->OnChromeIdentityCheck(test_identity); const IPC::Message* message = process()->sink().GetUniqueMessageMatching( @@ -219,8 +219,8 @@ class TabTitleObserver : public content::WebContentsObserver { explicit TabTitleObserver(content::WebContents* contents) : WebContentsObserver(contents) {} - string16 title_on_start() { return title_on_start_; } - string16 title_on_commit() { return title_on_commit_; } + base::string16 title_on_start() { return title_on_start_; } + base::string16 title_on_commit() { return title_on_commit_; } private: virtual void DidStartProvisionalLoadForFrame( @@ -240,14 +240,14 @@ class TabTitleObserver : public content::WebContentsObserver { title_on_commit_ = web_contents()->GetTitle(); } - string16 title_on_start_; - string16 title_on_commit_; + base::string16 title_on_start_; + base::string16 title_on_commit_; }; TEST_F(SearchTabHelperTest, TitleIsSetForNTP) { TabTitleObserver title_observer(web_contents()); NavigateAndCommit(GURL(chrome::kChromeUINewTabURL)); - const string16 title = l10n_util::GetStringUTF16(IDS_NEW_TAB_TITLE); + const base::string16 title = l10n_util::GetStringUTF16(IDS_NEW_TAB_TITLE); EXPECT_EQ(title, title_observer.title_on_start()); EXPECT_EQ(title, title_observer.title_on_commit()); EXPECT_EQ(title, web_contents()->GetTitle()); diff --git a/chrome/browser/ui/status_bubble.h b/chrome/browser/ui/status_bubble.h index fad678a..aee0a79 100644 --- a/chrome/browser/ui/status_bubble.h +++ b/chrome/browser/ui/status_bubble.h @@ -31,7 +31,7 @@ class StatusBubble { // when the cursor exits a link) will set the status bubble back to its // status text. To hide the status bubble again, either call SetStatus // with an empty string, or call Hide(). - virtual void SetStatus(const string16& status) = 0; + virtual void SetStatus(const base::string16& status) = 0; // Sets the bubble text to a URL - if given a non-empty URL, this will cause // the bubble to fade in and remain open until given an empty URL or until diff --git a/chrome/browser/ui/sync/inline_login_dialog.cc b/chrome/browser/ui/sync/inline_login_dialog.cc index 8444a35..4ef93e8 100644 --- a/chrome/browser/ui/sync/inline_login_dialog.cc +++ b/chrome/browser/ui/sync/inline_login_dialog.cc @@ -24,7 +24,7 @@ ui::ModalType InlineLoginDialog::GetDialogModalType() const { } string16 InlineLoginDialog::GetDialogTitle() const { - return string16(); + return base::string16(); } GURL InlineLoginDialog::GetDialogContentURL() const { diff --git a/chrome/browser/ui/sync/inline_login_dialog.h b/chrome/browser/ui/sync/inline_login_dialog.h index 076fca5..00fcd6c 100644 --- a/chrome/browser/ui/sync/inline_login_dialog.h +++ b/chrome/browser/ui/sync/inline_login_dialog.h @@ -26,7 +26,7 @@ class InlineLoginDialog : public ui::WebDialogDelegate { // ui::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<content::WebUIMessageHandler*>* handlers) const OVERRIDE; diff --git a/chrome/browser/ui/sync/one_click_signin_helper.cc b/chrome/browser/ui/sync/one_click_signin_helper.cc index 8abeb75..9150170 100644 --- a/chrome/browser/ui/sync/one_click_signin_helper.cc +++ b/chrome/browser/ui/sync/one_click_signin_helper.cc @@ -175,11 +175,11 @@ class ConfirmEmailDialogDelegate : public TabModalConfirmDialogDelegate { virtual ~ConfirmEmailDialogDelegate(); // TabModalConfirmDialogDelegate: - virtual string16 GetTitle() OVERRIDE; - virtual string16 GetMessage() OVERRIDE; - virtual string16 GetAcceptButtonTitle() OVERRIDE; - virtual string16 GetCancelButtonTitle() OVERRIDE; - virtual string16 GetLinkText() const OVERRIDE; + virtual base::string16 GetTitle() OVERRIDE; + virtual base::string16 GetMessage() OVERRIDE; + virtual base::string16 GetAcceptButtonTitle() OVERRIDE; + virtual base::string16 GetCancelButtonTitle() OVERRIDE; + virtual base::string16 GetLinkText() const OVERRIDE; virtual void OnAccepted() OVERRIDE; virtual void OnCanceled() OVERRIDE; virtual void OnClosed() OVERRIDE; @@ -543,7 +543,7 @@ class CurrentHistoryCleaner : public content::WebContentsObserver { virtual void WebContentsDestroyed(content::WebContents* contents) OVERRIDE; 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, @@ -567,7 +567,7 @@ CurrentHistoryCleaner::~CurrentHistoryCleaner() { void CurrentHistoryCleaner::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, @@ -728,7 +728,7 @@ bool OneClickSigninHelper::CanOffer(content::WebContents* web_contents, if (g_browser_process && !same_email) { ProfileManager* manager = g_browser_process->profile_manager(); if (manager) { - string16 email16 = UTF8ToUTF16(email); + base::string16 email16 = UTF8ToUTF16(email); ProfileInfoCache& cache = manager->GetProfileInfoCache(); for (size_t i = 0; i < cache.GetNumberOfProfiles(); ++i) { @@ -1028,7 +1028,7 @@ void OneClickSigninHelper::ShowSigninErrorBubble(Browser* browser, browser->window()->ShowOneClickSigninBubble( BrowserWindow::ONE_CLICK_SIGNIN_BUBBLE_TYPE_BUBBLE, - string16(), /* no SAML email */ + base::string16(), /* no SAML email */ UTF8ToUTF16(error), // This callback is never invoked. // TODO(rogerta): Separate out the bubble API so we don't have to pass diff --git a/chrome/browser/ui/sync/one_click_signin_sync_starter.cc b/chrome/browser/ui/sync/one_click_signin_sync_starter.cc index 86ee6de..e075f48 100644 --- a/chrome/browser/ui/sync/one_click_signin_sync_starter.cc +++ b/chrome/browser/ui/sync/one_click_signin_sync_starter.cc @@ -318,7 +318,7 @@ void OneClickSigninSyncStarter::ConfirmAndSignin() { browser_->window()->ShowOneClickSigninBubble( BrowserWindow::ONE_CLICK_SIGNIN_BUBBLE_TYPE_SAML_MODAL_DIALOG, UTF8ToUTF16(signin->GetUsernameForAuthInProgress()), - string16(), // No error message to display. + base::string16(), // No error message to display. base::Bind(&OneClickSigninSyncStarter::UntrustedSigninConfirmed, weak_pointer_factory_.GetWeakPtr())); } else { @@ -377,7 +377,7 @@ void OneClickSigninSyncStarter::SigninSuccess() { profile_sync_service->SetSyncSetupCompleted(); FinishProfileSyncServiceSetup(); if (confirmation_required_ == CONFIRM_AFTER_SIGNIN) { - string16 message; + base::string16 message; if (!profile_sync_service) { // Sync is disabled by policy. message = l10n_util::GetStringUTF16( @@ -400,11 +400,11 @@ void OneClickSigninSyncStarter::SigninSuccess() { } void OneClickSigninSyncStarter::DisplayFinalConfirmationBubble( - const string16& custom_message) { + const base::string16& custom_message) { EnsureBrowser(); browser_->window()->ShowOneClickSigninBubble( BrowserWindow::ONE_CLICK_SIGNIN_BUBBLE_TYPE_BUBBLE, - string16(), // No email required - this is not a SAML confirmation. + base::string16(), // No email required - this is not a SAML confirmation. custom_message, // Callback is ignored. BrowserWindow::StartSyncCallback()); diff --git a/chrome/browser/ui/sync/one_click_signin_sync_starter.h b/chrome/browser/ui/sync/one_click_signin_sync_starter.h index c8087ce..e70c754 100644 --- a/chrome/browser/ui/sync/one_click_signin_sync_starter.h +++ b/chrome/browser/ui/sync/one_click_signin_sync_starter.h @@ -192,7 +192,7 @@ class OneClickSigninSyncStarter : public SigninTracker::Observer, // Shows the post-signin confirmation bubble. If |custom_message| is empty, // the default "You are signed in" message is displayed. - void DisplayFinalConfirmationBubble(const string16& custom_message); + void DisplayFinalConfirmationBubble(const base::string16& custom_message); // Makes sure browser_ points to a valid browser (opens a new browser if // necessary). Useful in the case where the user has created a new Profile as diff --git a/chrome/browser/ui/sync/profile_signin_confirmation_helper.cc b/chrome/browser/ui/sync/profile_signin_confirmation_helper.cc index 84e9aa6..47ce5cf 100644 --- a/chrome/browser/ui/sync/profile_signin_confirmation_helper.cc +++ b/chrome/browser/ui/sync/profile_signin_confirmation_helper.cc @@ -143,7 +143,7 @@ void ProfileSigninConfirmationHelper::CheckHasHistory(int max_entries) { history::QueryOptions opts; opts.max_count = max_entries; service->QueryHistory( - string16(), opts, &request_consumer_, + base::string16(), opts, &request_consumer_, base::Bind(&ProfileSigninConfirmationHelper::OnHistoryQueryResults, this, max_entries)); diff --git a/chrome/browser/ui/sync/profile_signin_confirmation_helper_unittest.cc b/chrome/browser/ui/sync/profile_signin_confirmation_helper_unittest.cc index 8dc335c..58cb52a 100644 --- a/chrome/browser/ui/sync/profile_signin_confirmation_helper_unittest.cc +++ b/chrome/browser/ui/sync/profile_signin_confirmation_helper_unittest.cc @@ -181,8 +181,8 @@ TEST_F(ProfileSigninConfirmationHelperTest, PromptForNewProfile_Bookmarks) { ASSERT_TRUE(model_); // Profile is new but has bookmarks. - model_->AddURL(model_->bookmark_bar_node(), 0, string16(ASCIIToUTF16("foo")), - GURL("http://foo.com")); + model_->AddURL(model_->bookmark_bar_node(), 0, + base::string16(ASCIIToUTF16("foo")), GURL("http://foo.com")); EXPECT_TRUE( GetCallbackResult( base::Bind( diff --git a/chrome/browser/ui/tab_modal_confirm_dialog_delegate.cc b/chrome/browser/ui/tab_modal_confirm_dialog_delegate.cc index ad3884d..fb2d922 100644 --- a/chrome/browser/ui/tab_modal_confirm_dialog_delegate.cc +++ b/chrome/browser/ui/tab_modal_confirm_dialog_delegate.cc @@ -89,7 +89,7 @@ string16 TabModalConfirmDialogDelegate::GetCancelButtonTitle() { } string16 TabModalConfirmDialogDelegate::GetLinkText() const { - return string16(); + return base::string16(); } const char* TabModalConfirmDialogDelegate::GetAcceptButtonIcon() { diff --git a/chrome/browser/ui/tab_modal_confirm_dialog_delegate.h b/chrome/browser/ui/tab_modal_confirm_dialog_delegate.h index f872ee3..2aa2130 100644 --- a/chrome/browser/ui/tab_modal_confirm_dialog_delegate.h +++ b/chrome/browser/ui/tab_modal_confirm_dialog_delegate.h @@ -70,8 +70,8 @@ class TabModalConfirmDialogDelegate : public content::NotificationObserver { void LinkClicked(WindowOpenDisposition disposition); // The title of the dialog. Note that the title is not shown on all platforms. - virtual string16 GetTitle() = 0; - virtual string16 GetMessage() = 0; + virtual base::string16 GetTitle() = 0; + virtual base::string16 GetMessage() = 0; // Icon to show for the dialog. If this method is not overridden, a default // icon (like the application icon) is shown. @@ -79,12 +79,12 @@ class TabModalConfirmDialogDelegate : public content::NotificationObserver { // Title for the accept and the cancel buttons. // The default implementation uses IDS_OK and IDS_CANCEL. - virtual string16 GetAcceptButtonTitle(); - virtual string16 GetCancelButtonTitle(); + virtual base::string16 GetAcceptButtonTitle(); + virtual base::string16 GetCancelButtonTitle(); // Returns the text of the link to be displayed, if any. Otherwise returns // an empty string. - virtual string16 GetLinkText() const; + virtual base::string16 GetLinkText() const; // GTK stock icon names for the accept and cancel buttons, respectively. // The icons are only used on GTK. If these methods are not overriden, diff --git a/chrome/browser/ui/test/test_confirm_bubble_model.h b/chrome/browser/ui/test/test_confirm_bubble_model.h index 5a09f6a5..7be7725 100644 --- a/chrome/browser/ui/test/test_confirm_bubble_model.h +++ b/chrome/browser/ui/test/test_confirm_bubble_model.h @@ -19,14 +19,14 @@ class TestConfirmBubbleModel : public ConfirmBubbleModel { virtual ~TestConfirmBubbleModel(); // ConfirmBubbleModel overrides: - virtual string16 GetTitle() const OVERRIDE; - virtual string16 GetMessageText() const OVERRIDE; + virtual base::string16 GetTitle() const OVERRIDE; + virtual base::string16 GetMessageText() const OVERRIDE; virtual gfx::Image* GetIcon() const OVERRIDE; virtual int GetButtons() const OVERRIDE; - virtual string16 GetButtonLabel(BubbleButton button) const OVERRIDE; + virtual base::string16 GetButtonLabel(BubbleButton button) const OVERRIDE; virtual void Accept() OVERRIDE; virtual void Cancel() OVERRIDE; - virtual string16 GetLinkText() const OVERRIDE; + virtual base::string16 GetLinkText() const OVERRIDE; virtual void LinkClicked() OVERRIDE; private: diff --git a/chrome/browser/ui/views/apps/native_app_window_views.cc b/chrome/browser/ui/views/apps/native_app_window_views.cc index c5a8b95..886f7b9 100644 --- a/chrome/browser/ui/views/apps/native_app_window_views.cc +++ b/chrome/browser/ui/views/apps/native_app_window_views.cc @@ -299,7 +299,7 @@ void NativeAppWindowViews::InitializeDefaultWindow( } #if defined(OS_WIN) - string16 app_name_wide = UTF8ToWide(app_name); + base::string16 app_name_wide = UTF8ToWide(app_name); HWND hwnd = GetNativeAppWindowHWND(); ui::win::SetAppIdForWindow(ShellIntegration::GetAppModelIdForProfile( app_name_wide, profile()->GetPath()), hwnd); diff --git a/chrome/browser/ui/views/apps/native_app_window_views.h b/chrome/browser/ui/views/apps/native_app_window_views.h index 10b69c6..4c4338b 100644 --- a/chrome/browser/ui/views/apps/native_app_window_views.h +++ b/chrome/browser/ui/views/apps/native_app_window_views.h @@ -127,7 +127,7 @@ class NativeAppWindowViews : public apps::NativeAppWindow, virtual views::View* GetInitiallyFocusedView() OVERRIDE; virtual bool CanResize() const OVERRIDE; virtual bool CanMaximize() const OVERRIDE; - virtual string16 GetWindowTitle() const OVERRIDE; + virtual base::string16 GetWindowTitle() const OVERRIDE; virtual bool ShouldShowWindowTitle() const OVERRIDE; virtual gfx::ImageSkia GetWindowAppIcon() OVERRIDE; virtual gfx::ImageSkia GetWindowIcon() OVERRIDE; diff --git a/chrome/browser/ui/views/external_tab_container_win.cc b/chrome/browser/ui/views/external_tab_container_win.cc index aae3926..a16b79f 100644 --- a/chrome/browser/ui/views/external_tab_container_win.cc +++ b/chrome/browser/ui/views/external_tab_container_win.cc @@ -753,11 +753,12 @@ void ExternalTabContainerWin::AddNewContents(WebContents* source, } } -void ExternalTabContainerWin::WebContentsCreated(WebContents* source_contents, - int64 source_frame_id, - const string16& frame_name, - const GURL& target_url, - WebContents* new_contents) { +void ExternalTabContainerWin::WebContentsCreated( + WebContents* source_contents, + int64 source_frame_id, + const base::string16& frame_name, + const GURL& target_url, + WebContents* new_contents) { if (!load_requests_via_automation_) return; @@ -802,7 +803,7 @@ void ExternalTabContainerWin::UpdateTargetURL(WebContents* source, int32 page_id, const GURL& url) { if (automation_) { - string16 url_string = base::UTF8ToUTF16(url.spec()); + base::string16 url_string = base::UTF8ToUTF16(url.spec()); automation_->Send( new AutomationMsg_UpdateTargetUrl(tab_handle_, url_string)); } @@ -1021,7 +1022,7 @@ void ExternalTabContainerWin::RegisterProtocolHandler( WebContents* tab, const std::string& protocol, const GURL& url, - const string16& title, + const base::string16& title, bool user_gesture) { Browser::RegisterProtocolHandlerHelper(tab, protocol, url, title, user_gesture, NULL); @@ -1071,11 +1072,11 @@ bool ExternalTabContainerWin::OnMessageReceived(const IPC::Message& message) { void ExternalTabContainerWin::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 (automation_) { automation_->Send(new AutomationMsg_NavigationFailed( diff --git a/chrome/browser/ui/views/first_run_bubble.cc b/chrome/browser/ui/views/first_run_bubble.cc index 7b74f2e..030e7bb 100644 --- a/chrome/browser/ui/views/first_run_bubble.cc +++ b/chrome/browser/ui/views/first_run_bubble.cc @@ -42,7 +42,7 @@ void FirstRunBubble::Init() { views::Label* title = new views::Label(l10n_util::GetStringFUTF16( IDS_FR_BUBBLE_TITLE, browser_ ? - GetDefaultSearchEngineName(browser_->profile()) : string16())); + GetDefaultSearchEngineName(browser_->profile()) : base::string16())); title->SetFont(original_font.DeriveFont(2, gfx::Font::BOLD)); views::Link* change = diff --git a/chrome/browser/ui/views/frame/browser_non_client_frame_view.cc b/chrome/browser/ui/views/frame/browser_non_client_frame_view.cc index 11bdb83..bbc3345 100644 --- a/chrome/browser/ui/views/frame/browser_non_client_frame_view.cc +++ b/chrome/browser/ui/views/frame/browser_non_client_frame_view.cc @@ -87,7 +87,7 @@ void BrowserNonClientFrameView::UpdateAvatarInfo() { ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); gfx::Image avatar; gfx::Image taskbar_badge_avatar; - string16 text; + base::string16 text; bool is_rectangle = false; if (browser_view_->IsGuestSession()) { avatar = rb.GetImageNamed(browser_view_->GetGuestIconResourceID()); @@ -148,7 +148,7 @@ void BrowserNonClientFrameView::UpdateNewStyleAvatarInfo( if (browser_view_->ShouldShowAvatar()) { if (!new_avatar_button_) { - string16 profile_name = + base::string16 profile_name = profiles::GetActiveProfileDisplayName(browser_view_->browser()); new_avatar_button_ = new NewAvatarButton( listener, profile_name, style, browser_view_->browser()); diff --git a/chrome/browser/ui/views/frame/browser_root_view.cc b/chrome/browser/ui/views/frame/browser_root_view.cc index 3ebb52b..06ded06 100644 --- a/chrome/browser/ui/views/frame/browser_root_view.cc +++ b/chrome/browser/ui/views/frame/browser_root_view.cc @@ -94,17 +94,17 @@ int BrowserRootView::OnPerformDrop(const ui::DropTargetEvent& event) { // do this as the TabStrip doesn't know about the autocomplete edit and needs // to know about it to handle 'paste and go'. GURL url; - string16 title; + base::string16 title; ui::OSExchangeData mapped_data; if (!event.data().GetURLAndTitle(&url, &title) || !url.is_valid()) { // The url isn't valid. Use the paste and go url. if (GetPasteAndGoURL(event.data(), &url)) - mapped_data.SetURL(url, string16()); + mapped_data.SetURL(url, base::string16()); // else case: couldn't extract a url or 'paste and go' url. This ends up // passing through an ui::OSExchangeData with nothing in it. We need to do // this so that the tab strip cleans up properly. } else { - mapped_data.SetURL(url, string16()); + mapped_data.SetURL(url, base::string16()); } forwarding_to_tab_strip_ = false; scoped_ptr<ui::DropTargetEvent> mapped_event( @@ -185,7 +185,7 @@ bool BrowserRootView::GetPasteAndGoURL(const ui::OSExchangeData& data, if (!data.HasString()) return false; - string16 text; + base::string16 text; if (!data.GetString(&text) || text.empty()) return false; text = AutocompleteMatch::SanitizeString(text); diff --git a/chrome/browser/ui/views/frame/browser_view.cc b/chrome/browser/ui/views/frame/browser_view.cc index 6149121..ed77b66 100644 --- a/chrome/browser/ui/views/frame/browser_view.cc +++ b/chrome/browser/ui/views/frame/browser_view.cc @@ -1215,8 +1215,8 @@ void BrowserView::ShowTranslateBubble( #if defined(ENABLE_ONE_CLICK_SIGNIN) void BrowserView::ShowOneClickSigninBubble( OneClickSigninBubbleType type, - const string16& email, - const string16& error_message, + const base::string16& email, + const base::string16& error_message, const StartSyncCallback& start_sync_callback) { scoped_ptr<OneClickSigninBubbleDelegate> delegate; delegate.reset(new OneClickSigninBubbleLinksDelegate(browser())); diff --git a/chrome/browser/ui/views/frame/browser_view.h b/chrome/browser/ui/views/frame/browser_view.h index a053d2c..d53f373 100644 --- a/chrome/browser/ui/views/frame/browser_view.h +++ b/chrome/browser/ui/views/frame/browser_view.h @@ -333,8 +333,8 @@ class BrowserView : public BrowserWindow, #if defined(ENABLE_ONE_CLICK_SIGNIN) virtual void ShowOneClickSigninBubble( OneClickSigninBubbleType type, - const string16& email, - const string16& error_message, + const base::string16& email, + const base::string16& error_message, const StartSyncCallback& start_sync_callback) OVERRIDE; #endif // TODO(beng): Not an override, move somewhere else. @@ -397,8 +397,8 @@ class BrowserView : public BrowserWindow, virtual bool CanResize() const OVERRIDE; virtual bool CanMaximize() const OVERRIDE; virtual bool CanActivate() const OVERRIDE; - virtual string16 GetWindowTitle() const OVERRIDE; - virtual string16 GetAccessibleWindowTitle() const OVERRIDE; + virtual base::string16 GetWindowTitle() const OVERRIDE; + virtual base::string16 GetAccessibleWindowTitle() const OVERRIDE; virtual views::View* GetInitiallyFocusedView() OVERRIDE; virtual bool ShouldShowWindowTitle() const OVERRIDE; virtual gfx::ImageSkia GetWindowAppIcon() OVERRIDE; diff --git a/chrome/browser/ui/views/frame/browser_view_unittest.cc b/chrome/browser/ui/views/frame/browser_view_unittest.cc index fb3bc91..ee53aaa 100644 --- a/chrome/browser/ui/views/frame/browser_view_unittest.cc +++ b/chrome/browser/ui/views/frame/browser_view_unittest.cc @@ -120,7 +120,7 @@ TEST_F(BrowserViewTest, BrowserViewLayout) { // Bookmark bar is reparented to BrowserView on NTP. NavigateAndCommitActiveTabWithTitle(browser, GURL(chrome::kChromeUINewTabURL), - string16()); + base::string16()); EXPECT_TRUE(bookmark_bar->visible()); EXPECT_TRUE(bookmark_bar->IsDetached()); EXPECT_EQ(browser_view(), bookmark_bar->parent()); @@ -148,7 +148,7 @@ TEST_F(BrowserViewTest, BrowserViewLayout) { // Bookmark bar is parented back to top container on normal page. NavigateAndCommitActiveTabWithTitle(browser, GURL("about:blank"), - string16()); + base::string16()); EXPECT_FALSE(bookmark_bar->visible()); EXPECT_FALSE(bookmark_bar->IsDetached()); EXPECT_EQ(top_container, bookmark_bar->parent()); diff --git a/chrome/browser/ui/views/frame/browser_window_property_manager_win.cc b/chrome/browser/ui/views/frame/browser_window_property_manager_win.cc index 7ce3bef..87cee29 100644 --- a/chrome/browser/ui/views/frame/browser_window_property_manager_win.cc +++ b/chrome/browser/ui/views/frame/browser_window_property_manager_win.cc @@ -42,13 +42,13 @@ void BrowserWindowPropertyManager::UpdateWindowProperties(HWND hwnd) { // Set the app user model id for this application to that of the application // name. See http://crbug.com/7028. - string16 app_id = browser->is_app() ? + base::string16 app_id = browser->is_app() ? ShellIntegration::GetAppModelIdForProfile(UTF8ToWide(browser->app_name()), profile->GetPath()) : ShellIntegration::GetChromiumModelIdForProfile(profile->GetPath()); - string16 icon_path_string; - string16 command_line_string; - string16 pinned_name; + base::string16 icon_path_string; + base::string16 command_line_string; + base::string16 pinned_name; ProfileManager* profile_manager = g_browser_process->profile_manager(); ProfileShortcutManager* shortcut_manager = NULL; diff --git a/chrome/browser/ui/views/frame/global_menu_bar_x11.cc b/chrome/browser/ui/views/frame/global_menu_bar_x11.cc index fcecb76..5b91665 100644 --- a/chrome/browser/ui/views/frame/global_menu_bar_x11.cc +++ b/chrome/browser/ui/views/frame/global_menu_bar_x11.cc @@ -290,7 +290,7 @@ struct GlobalMenuBarX11::HistoryItem { HistoryItem() : session_id(0) {} // The title for the menu item. - string16 title; + base::string16 title; // The URL that will be navigated to if the user selects this item. GURL url; @@ -525,7 +525,7 @@ void GlobalMenuBarX11::AddHistoryItemToMenu(HistoryItem* item, DbusmenuMenuitem* menu, int tag, int index) { - string16 title = item->title; + base::string16 title = item->title; std::string url_string = item->url.possibly_invalid_spec(); if (title.empty()) diff --git a/chrome/browser/ui/views/frame/opaque_browser_frame_view.h b/chrome/browser/ui/views/frame/opaque_browser_frame_view.h index 34ecde5..667d844 100644 --- a/chrome/browser/ui/views/frame/opaque_browser_frame_view.h +++ b/chrome/browser/ui/views/frame/opaque_browser_frame_view.h @@ -76,7 +76,7 @@ class OpaqueBrowserFrameView : public BrowserNonClientFrameView, // OpaqueBrowserFrameViewLayoutDelegate implementation: virtual bool ShouldShowWindowIcon() const OVERRIDE; virtual bool ShouldShowWindowTitle() const OVERRIDE; - virtual string16 GetWindowTitle() const OVERRIDE; + virtual base::string16 GetWindowTitle() const OVERRIDE; virtual int GetIconSize() const OVERRIDE; virtual bool ShouldLeaveOffsetNearTopBorder() const OVERRIDE; virtual gfx::Size GetBrowserViewMinimumSize() const OVERRIDE; diff --git a/chrome/browser/ui/views/frame/opaque_browser_frame_view_layout_delegate.h b/chrome/browser/ui/views/frame/opaque_browser_frame_view_layout_delegate.h index a0be77a..7c0e61a 100644 --- a/chrome/browser/ui/views/frame/opaque_browser_frame_view_layout_delegate.h +++ b/chrome/browser/ui/views/frame/opaque_browser_frame_view_layout_delegate.h @@ -17,7 +17,7 @@ class OpaqueBrowserFrameViewLayoutDelegate { // mode. virtual bool ShouldShowWindowIcon() const = 0; virtual bool ShouldShowWindowTitle() const = 0; - virtual string16 GetWindowTitle() const = 0; + virtual base::string16 GetWindowTitle() const = 0; // Returns the size of the window icon. This can be platform dependent // because of differences in fonts, so its part of the interface. diff --git a/chrome/browser/ui/views/frame/opaque_browser_frame_view_layout_unittest.cc b/chrome/browser/ui/views/frame/opaque_browser_frame_view_layout_unittest.cc index 6c841700..c4ebbc7 100644 --- a/chrome/browser/ui/views/frame/opaque_browser_frame_view_layout_unittest.cc +++ b/chrome/browser/ui/views/frame/opaque_browser_frame_view_layout_unittest.cc @@ -224,7 +224,7 @@ class OpaqueBrowserFrameViewLayoutTest : public views::ViewsTestBase { } void AddAvatarLabel() { - avatar_label_ = new views::MenuButton(NULL, string16(), NULL, false); + avatar_label_ = new views::MenuButton(NULL, base::string16(), NULL, false); avatar_label_->set_id(VIEW_ID_AVATAR_LABEL); root_view_->AddChildView(avatar_label_); @@ -233,7 +233,8 @@ class OpaqueBrowserFrameViewLayoutTest : public views::ViewsTestBase { } void AddNewAvatarButton() { - new_avatar_button_ = new views::MenuButton(NULL, string16(), NULL, false); + new_avatar_button_ = + new views::MenuButton(NULL, base::string16(), NULL, false); new_avatar_button_->set_id(VIEW_ID_NEW_AVATAR_BUTTON); root_view_->AddChildView(new_avatar_button_); } diff --git a/chrome/browser/ui/views/frame/system_menu_model_delegate.h b/chrome/browser/ui/views/frame/system_menu_model_delegate.h index e2c5ba0..15b8bb6 100644 --- a/chrome/browser/ui/views/frame/system_menu_model_delegate.h +++ b/chrome/browser/ui/views/frame/system_menu_model_delegate.h @@ -26,7 +26,7 @@ class SystemMenuModelDelegate : public ui::SimpleMenuModel::Delegate { int command_id, ui::Accelerator* accelerator) OVERRIDE; virtual bool IsItemForCommandIdDynamic(int command_id) const OVERRIDE; - virtual string16 GetLabelForCommandId(int command_id) const OVERRIDE; + virtual base::string16 GetLabelForCommandId(int command_id) const OVERRIDE; virtual void ExecuteCommand(int command_id, int event_flags) OVERRIDE; private: diff --git a/chrome/browser/ui/views/hung_renderer_view.cc b/chrome/browser/ui/views/hung_renderer_view.cc index bba8065..5986aa6 100644 --- a/chrome/browser/ui/views/hung_renderer_view.cc +++ b/chrome/browser/ui/views/hung_renderer_view.cc @@ -124,7 +124,7 @@ int HungPagesTableModel::RowCount() { string16 HungPagesTableModel::GetText(int row, int column_id) { DCHECK(row >= 0 && row < RowCount()); - string16 title = tab_observers_[row]->web_contents()->GetTitle(); + base::string16 title = tab_observers_[row]->web_contents()->GetTitle(); if (title.empty()) title = CoreTabHelper::GetDefaultTitle(); // TODO(xji): Consider adding a special case if the title text is a URL, diff --git a/chrome/browser/ui/views/hung_renderer_view.h b/chrome/browser/ui/views/hung_renderer_view.h index 8cd912d..2f4c945 100644 --- a/chrome/browser/ui/views/hung_renderer_view.h +++ b/chrome/browser/ui/views/hung_renderer_view.h @@ -49,7 +49,7 @@ class HungPagesTableModel : public ui::TableModel, public views::TableGrouper { // Overridden from ui::TableModel: virtual int RowCount() OVERRIDE; - virtual string16 GetText(int row, int column_id) OVERRIDE; + virtual base::string16 GetText(int row, int column_id) OVERRIDE; virtual gfx::ImageSkia GetIcon(int row) OVERRIDE; virtual void SetObserver(ui::TableModelObserver* observer) OVERRIDE; @@ -120,10 +120,11 @@ class HungRendererDialogView : public views::DialogDelegateView, virtual void EndForWebContents(content::WebContents* contents); // views::DialogDelegateView overrides: - virtual string16 GetWindowTitle() const OVERRIDE; + virtual base::string16 GetWindowTitle() const OVERRIDE; virtual void WindowClosing() OVERRIDE; virtual int GetDialogButtons() const OVERRIDE; - virtual string16 GetDialogButtonLabel(ui::DialogButton button) const OVERRIDE; + virtual base::string16 GetDialogButtonLabel( + ui::DialogButton button) const OVERRIDE; virtual views::View* CreateExtraView() OVERRIDE; virtual bool Accept(bool window_closing) OVERRIDE; virtual bool UseNewStyleForThisDialog() const OVERRIDE; diff --git a/chrome/browser/ui/views/location_bar/location_bar_view.cc b/chrome/browser/ui/views/location_bar/location_bar_view.cc index 9912ff1..fedebf5b 100644 --- a/chrome/browser/ui/views/location_bar/location_bar_view.cc +++ b/chrome/browser/ui/views/location_bar/location_bar_view.cc @@ -360,7 +360,7 @@ void LocationBarView::Init() { star_view_->SetVisible(false); AddChildView(star_view_); - search_button_ = new views::LabelButton(this, string16()); + search_button_ = new views::LabelButton(this, base::string16()); search_button_->set_triggerable_event_flags( ui::EF_LEFT_MOUSE_BUTTON | ui::EF_MIDDLE_MOUSE_BUTTON); search_button_->SetStyle(views::Button::STYLE_BUTTON); diff --git a/chrome/browser/ui/views/message_center/web_notification_tray.cc b/chrome/browser/ui/views/message_center/web_notification_tray.cc index 88124f3..7268b5d 100644 --- a/chrome/browser/ui/views/message_center/web_notification_tray.cc +++ b/chrome/browser/ui/views/message_center/web_notification_tray.cc @@ -237,9 +237,9 @@ void WebNotificationTray::UpdateStatusIcon() { int unread_notifications = message_center()->UnreadNotificationCount(); - string16 tool_tip; + base::string16 tool_tip; if (unread_notifications > 0) { - string16 str_unread_count = base::FormatNumber(unread_notifications); + base::string16 str_unread_count = base::FormatNumber(unread_notifications); tool_tip = l10n_util::GetStringFUTF16(IDS_MESSAGE_CENTER_TOOLTIP_UNREAD, str_unread_count); } else { @@ -320,7 +320,7 @@ MessageCenterTray* WebNotificationTray::GetMessageCenterTray() { } void WebNotificationTray::CreateStatusIcon(const gfx::ImageSkia& image, - const string16& tool_tip) { + const base::string16& tool_tip) { if (status_icon_) return; diff --git a/chrome/browser/ui/views/message_center/web_notification_tray.h b/chrome/browser/ui/views/message_center/web_notification_tray.h index 15fea40..b2df8dc 100644 --- a/chrome/browser/ui/views/message_center/web_notification_tray.h +++ b/chrome/browser/ui/views/message_center/web_notification_tray.h @@ -87,7 +87,8 @@ class WebNotificationTray : public message_center::MessageCenterTrayDelegate, PositionInfo GetPositionInfo(); - void CreateStatusIcon(const gfx::ImageSkia& image, const string16& tool_tip); + void CreateStatusIcon(const gfx::ImageSkia& image, + const base::string16& tool_tip); void DestroyStatusIcon(); void AddQuietModeMenu(StatusIcon* status_icon); MessageCenterWidgetDelegate* GetMessageCenterWidgetDelegateForTest(); diff --git a/chrome/browser/ui/views/message_center/web_notification_tray_browsertest.cc b/chrome/browser/ui/views/message_center/web_notification_tray_browsertest.cc index 0f413fa..d7c740c 100644 --- a/chrome/browser/ui/views/message_center/web_notification_tray_browsertest.cc +++ b/chrome/browser/ui/views/message_center/web_notification_tray_browsertest.cc @@ -67,7 +67,7 @@ class WebNotificationTrayTest : public InProcessBrowserTest { ASCIIToUTF16("Test Web Notification"), ASCIIToUTF16("Notification message body."), blink::WebTextDirectionDefault, - string16(), + base::string16(), ASCIIToUTF16(replace_id), new TestNotificationDelegate(id)); @@ -82,7 +82,7 @@ class WebNotificationTrayTest : public InProcessBrowserTest { ASCIIToUTF16("Updated Web Notification"), ASCIIToUTF16("Updated message body."), blink::WebTextDirectionDefault, - string16(), + base::string16(), ASCIIToUTF16(replace_id), new TestNotificationDelegate(new_id)); diff --git a/chrome/browser/ui/views/passwords/manage_password_item_view.cc b/chrome/browser/ui/views/passwords/manage_password_item_view.cc index e1e7aba..3779b75 100644 --- a/chrome/browser/ui/views/passwords/manage_password_item_view.cc +++ b/chrome/browser/ui/views/passwords/manage_password_item_view.cc @@ -69,7 +69,7 @@ ManagePasswordItemView::ManagePasswordItemView( label_2_->SetEnabled(false); label_2_->SetUnderline(false); - delete_button_ = new views::LabelButton(this, string16()); + delete_button_ = new views::LabelButton(this, base::string16()); delete_button_->SetStyle(views::Button::STYLE_TEXTBUTTON); delete_button_->SetImage(views::Button::STATE_NORMAL, *rb->GetImageSkiaNamed(IDR_CLOSE_2)); @@ -92,10 +92,10 @@ ManagePasswordItemView::ManagePasswordItemView( // static string16 ManagePasswordItemView::GetPasswordDisplayString( - const string16& password) { + const base::string16& password) { const wchar_t kPasswordBullet = 0x2022; const size_t kMaxPasswordChar = 22; - return string16(std::min(password.length(), kMaxPasswordChar), + return base::string16(std::min(password.length(), kMaxPasswordChar), kPasswordBullet); } diff --git a/chrome/browser/ui/views/passwords/manage_password_item_view.h b/chrome/browser/ui/views/passwords/manage_password_item_view.h index 75139e0..d53c486 100644 --- a/chrome/browser/ui/views/passwords/manage_password_item_view.h +++ b/chrome/browser/ui/views/passwords/manage_password_item_view.h @@ -25,7 +25,8 @@ class ManagePasswordItemView : public views::View, int field_1_width, int field_2_width); - static string16 GetPasswordDisplayString(const string16& password); + static base::string16 GetPasswordDisplayString( + const base::string16& password); private: virtual ~ManagePasswordItemView(); diff --git a/chrome/browser/ui/views/passwords/manage_passwords_bubble_view.cc b/chrome/browser/ui/views/passwords/manage_passwords_bubble_view.cc index 159d3ff..4a38203c 100644 --- a/chrome/browser/ui/views/passwords/manage_passwords_bubble_view.cc +++ b/chrome/browser/ui/views/passwords/manage_passwords_bubble_view.cc @@ -35,7 +35,7 @@ void UpdateBiggestWidth(const autofill::PasswordForm& password_form, int* biggest_width) { ui::ResourceBundle* rb = &ui::ResourceBundle::GetSharedInstance(); gfx::FontList font_list(rb->GetFontList(ui::ResourceBundle::BaseFont)); - string16 display_string(username ? + base::string16 display_string(username ? password_form.username_value : ManagePasswordItemView::GetPasswordDisplayString( password_form.password_value)); diff --git a/chrome/browser/ui/views/passwords/manage_passwords_icon_view.cc b/chrome/browser/ui/views/passwords/manage_passwords_icon_view.cc index b58e683..e1ad5e7 100644 --- a/chrome/browser/ui/views/passwords/manage_passwords_icon_view.cc +++ b/chrome/browser/ui/views/passwords/manage_passwords_icon_view.cc @@ -57,7 +57,7 @@ void ManagePasswordsIconView::SetTooltip(bool password_to_be_saved) { } bool ManagePasswordsIconView::GetTooltipText(const gfx::Point& p, - string16* tooltip) const { + base::string16* tooltip) const { // Don't show tooltip if the password bubble is displayed. return !ManagePasswordsBubbleView::IsShowing() && ImageView::GetTooltipText(p, tooltip); diff --git a/chrome/browser/ui/views/passwords/manage_passwords_icon_view.h b/chrome/browser/ui/views/passwords/manage_passwords_icon_view.h index 44147d2..a215a73 100644 --- a/chrome/browser/ui/views/passwords/manage_passwords_icon_view.h +++ b/chrome/browser/ui/views/passwords/manage_passwords_icon_view.h @@ -37,7 +37,7 @@ class ManagePasswordsIconView : public views::ImageView { private: // views::ImageView: virtual bool GetTooltipText(const gfx::Point& p, - string16* tooltip) const OVERRIDE; + base::string16* tooltip) const OVERRIDE; virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE; virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE; virtual void OnMouseReleased(const ui::MouseEvent& event) OVERRIDE; diff --git a/chrome/browser/ui/views/ssl_client_certificate_selector.h b/chrome/browser/ui/views/ssl_client_certificate_selector.h index 17f35e5..2056b52 100644 --- a/chrome/browser/ui/views/ssl_client_certificate_selector.h +++ b/chrome/browser/ui/views/ssl_client_certificate_selector.h @@ -56,7 +56,7 @@ class SSLClientCertificateSelector : public SSLClientAuthObserver, // DialogDelegateView: virtual bool CanResize() const OVERRIDE; - virtual string16 GetWindowTitle() const OVERRIDE; + virtual base::string16 GetWindowTitle() const OVERRIDE; virtual void DeleteDelegate() OVERRIDE; virtual bool IsDialogButtonEnabled(ui::DialogButton button) const OVERRIDE; virtual bool Cancel() OVERRIDE; diff --git a/chrome/browser/ui/views/status_bubble_views.h b/chrome/browser/ui/views/status_bubble_views.h index c1bdc13..c0f66a2 100644 --- a/chrome/browser/ui/views/status_bubble_views.h +++ b/chrome/browser/ui/views/status_bubble_views.h @@ -54,7 +54,7 @@ class StatusBubbleViews : public StatusBubble { void SetBubbleWidth(int width); // Overridden from StatusBubble: - virtual void SetStatus(const string16& status) OVERRIDE; + virtual void SetStatus(const base::string16& status) OVERRIDE; virtual void SetURL(const GURL& url, const std::string& languages) OVERRIDE; virtual void Hide() OVERRIDE; virtual void MouseMoved(const gfx::Point& location, @@ -94,10 +94,10 @@ class StatusBubbleViews : public StatusBubble { int GetMaxStatusBubbleWidth(); // The status text we want to display when there are no URLs to display. - string16 status_text_; + base::string16 status_text_; // The url we want to display when there is no status text to display. - string16 url_text_; + base::string16 url_text_; // The original, non-elided URL. GURL url_; diff --git a/chrome/browser/ui/views/tab_modal_confirm_dialog_views.h b/chrome/browser/ui/views/tab_modal_confirm_dialog_views.h index 06f0610..100a474 100644 --- a/chrome/browser/ui/views/tab_modal_confirm_dialog_views.h +++ b/chrome/browser/ui/views/tab_modal_confirm_dialog_views.h @@ -35,8 +35,9 @@ class TabModalConfirmDialogViews : public TabModalConfirmDialog, content::WebContents* web_contents); // views::DialogDelegate: - virtual string16 GetWindowTitle() const OVERRIDE; - virtual string16 GetDialogButtonLabel(ui::DialogButton button) const OVERRIDE; + virtual base::string16 GetWindowTitle() const OVERRIDE; + virtual base::string16 GetDialogButtonLabel( + ui::DialogButton button) const OVERRIDE; virtual bool Cancel() OVERRIDE; virtual bool Accept() OVERRIDE; virtual bool Close() OVERRIDE; diff --git a/chrome/browser/ui/views/website_settings/permission_selector_view.cc b/chrome/browser/ui/views/website_settings/permission_selector_view.cc index 0436925..2e25363 100644 --- a/chrome/browser/ui/views/website_settings/permission_selector_view.cc +++ b/chrome/browser/ui/views/website_settings/permission_selector_view.cc @@ -54,7 +54,7 @@ class PermissionMenuButton : public views::MenuButton, // |PermissionMenuButton|. If the |show_menu_marker| flag is true, then a // small icon is be displayed next to the button |text|, indicating that the // button opens a drop down menu. - PermissionMenuButton(const string16& text, + PermissionMenuButton(const base::string16& text, PermissionMenuModel* model, bool show_menu_marker); virtual ~PermissionMenuButton(); @@ -63,7 +63,7 @@ class PermissionMenuButton : public views::MenuButton, virtual gfx::Size GetPreferredSize() OVERRIDE; // Overridden from views::TextButton. - virtual void SetText(const string16& text) OVERRIDE; + virtual void SetText(const base::string16& text) OVERRIDE; // Overridden from views::View. virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE; @@ -83,7 +83,7 @@ class PermissionMenuButton : public views::MenuButton, // PermissionMenuButton /////////////////////////////////////////////////////////////////////////////// -PermissionMenuButton::PermissionMenuButton(const string16& text, +PermissionMenuButton::PermissionMenuButton(const base::string16& text, PermissionMenuModel* model, bool show_menu_marker) : MenuButton(NULL, text, this, show_menu_marker), @@ -115,7 +115,7 @@ gfx::Size PermissionMenuButton::GetPreferredSize() { return prefsize; } -void PermissionMenuButton::SetText(const string16& text) { +void PermissionMenuButton::SetText(const base::string16& text) { MenuButton::SetText(text); SizeToPreferredSize(); } diff --git a/chrome/browser/ui/views/website_settings/website_settings_popup_view.cc b/chrome/browser/ui/views/website_settings/website_settings_popup_view.cc index 085063d..c6afe7d 100644 --- a/chrome/browser/ui/views/website_settings/website_settings_popup_view.cc +++ b/chrome/browser/ui/views/website_settings/website_settings_popup_view.cc @@ -116,11 +116,11 @@ class PopupHeaderView : public views::View { virtual ~PopupHeaderView(); // Sets the name of the site's identity. - void SetIdentityName(const string16& name); + void SetIdentityName(const base::string16& name); // Sets the |status_text| for the identity check of this site and the // |text_color|. - void SetIdentityStatus(const string16& status_text, SkColor text_color); + void SetIdentityStatus(const base::string16& status_text, SkColor text_color); private: // The label that displays the name of the site's identity. @@ -173,7 +173,7 @@ PopupHeaderView::PopupHeaderView(views::ButtonListener* close_button_listener) layout->AddPaddingRow(0, kHeaderPaddingTop); layout->StartRow(0, label_column); - name_ = new views::Label(string16()); + name_ = new views::Label(base::string16()); gfx::Font headline_font(name_->font().GetFontName(), kIdentityNameFontSize); name_->SetFont(headline_font.DeriveFont(0, gfx::Font::BOLD)); layout->AddView(name_, 1, 1, views::GridLayout::LEADING, @@ -193,7 +193,7 @@ PopupHeaderView::PopupHeaderView(views::ButtonListener* close_button_listener) layout->AddPaddingRow(0, kHeaderRowSpacing); layout->StartRow(0, label_column); - status_ = new views::Label(string16()); + status_ = new views::Label(base::string16()); layout->AddView(status_, 1, 1, @@ -206,11 +206,11 @@ PopupHeaderView::PopupHeaderView(views::ButtonListener* close_button_listener) PopupHeaderView::~PopupHeaderView() { } -void PopupHeaderView::SetIdentityName(const string16& name) { +void PopupHeaderView::SetIdentityName(const base::string16& name) { name_->SetText(name); } -void PopupHeaderView::SetIdentityStatus(const string16& status, +void PopupHeaderView::SetIdentityStatus(const base::string16& status, SkColor text_color) { status_->SetText(status); status_->SetEnabledColor(text_color); @@ -428,7 +428,7 @@ void WebsiteSettingsPopupView::SetCookieInfo( for (CookieInfoList::const_iterator i(cookie_info_list.begin()); i != cookie_info_list.end(); ++i) { - string16 label_text = l10n_util::GetStringFUTF16( + base::string16 label_text = l10n_util::GetStringFUTF16( IDS_WEBSITE_SETTINGS_SITE_DATA_STATS_LINE, UTF8ToUTF16(i->cookie_source), base::IntToString16(i->allowed), @@ -492,7 +492,7 @@ void WebsiteSettingsPopupView::SetPermissionInfo( void WebsiteSettingsPopupView::SetIdentityInfo( const IdentityInfo& identity_info) { - string16 identity_status_text; + base::string16 identity_status_text; SkColor text_color = SK_ColorBLACK; switch (identity_info.identity_status) { case WebsiteSettings::SITE_IDENTITY_STATUS_CERT: @@ -518,7 +518,7 @@ void WebsiteSettingsPopupView::SetIdentityInfo( // site's identity was verified, then the headline contains the organization // name from the provided certificate. If the organization name is not // available than the hostname of the site is used instead. - string16 headline; + base::string16 headline; if (identity_info.cert_id) { cert_id_ = identity_info.cert_id; certificate_dialog_link_ = new views::Link( @@ -529,14 +529,14 @@ void WebsiteSettingsPopupView::SetIdentityInfo( ResetConnectionSection( identity_info_content_, WebsiteSettingsUI::GetIdentityIcon(identity_info.identity_status), - string16(), // The identity section has no headline. + base::string16(), // The identity section has no headline. UTF8ToUTF16(identity_info.identity_status_description), certificate_dialog_link_); ResetConnectionSection( connection_info_content_, WebsiteSettingsUI::GetConnectionIcon(identity_info.connection_status), - string16(), // The connection section has no headline. + base::string16(), // The connection section has no headline. UTF8ToUTF16(identity_info.connection_status_description), NULL); @@ -545,7 +545,8 @@ void WebsiteSettingsPopupView::SetIdentityInfo( SizeToContents(); } -void WebsiteSettingsPopupView::SetFirstVisit(const string16& first_visit) { +void WebsiteSettingsPopupView::SetFirstVisit( + const base::string16& first_visit) { ResetConnectionSection( page_info_content_, WebsiteSettingsUI::GetFirstVisitIcon(first_visit), @@ -623,7 +624,7 @@ views::View* WebsiteSettingsPopupView::CreateConnectionTab() { } views::View* WebsiteSettingsPopupView::CreateSection( - const string16& headline_text, + const base::string16& headline_text, views::View* content, views::Link* link) { views::View* container = new views::View(); @@ -665,8 +666,8 @@ views::View* WebsiteSettingsPopupView::CreateSection( void WebsiteSettingsPopupView::ResetConnectionSection( views::View* section_container, const gfx::Image& icon, - const string16& headline, - const string16& text, + const base::string16& headline, + const base::string16& text, views::Link* link) { section_container->RemoveAllChildViews(true); diff --git a/chrome/browser/ui/views/website_settings/website_settings_popup_view.h b/chrome/browser/ui/views/website_settings/website_settings_popup_view.h index 15d0a42..c3a4e9b 100644 --- a/chrome/browser/ui/views/website_settings/website_settings_popup_view.h +++ b/chrome/browser/ui/views/website_settings/website_settings_popup_view.h @@ -85,7 +85,7 @@ class WebsiteSettingsPopupView virtual void SetPermissionInfo( const PermissionInfoList& permission_info_list) OVERRIDE; virtual void SetIdentityInfo(const IdentityInfo& identity_info) OVERRIDE; - virtual void SetFirstVisit(const string16& first_visit) OVERRIDE; + virtual void SetFirstVisit(const base::string16& first_visit) OVERRIDE; virtual void SetSelectedTab(TabId tab_id) OVERRIDE; // Creates the contents of the "Permissions" tab. The ownership of the @@ -100,7 +100,7 @@ class WebsiteSettingsPopupView // section |contents| and an optional |link|. This method creates a section // for the given |headline|, |contents| and |link|. |link| can be NULL if the // section should not contain a link. - views::View* CreateSection(const string16& headline, + views::View* CreateSection(const base::string16& headline, views::View* contents, views::Link* link) WARN_UNUSED_RESULT; @@ -112,8 +112,8 @@ class WebsiteSettingsPopupView // the views hierarchy. If the |link| is NULL then no link is be displayed. void ResetConnectionSection(views::View* section_container, const gfx::Image& icon, - const string16& headline, - const string16& text, + const base::string16& headline, + const base::string16& text, views::Link* link); // Handles LinkClicked asynchronously. void HandleLinkClickedAsync(views::Link* source); 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()); |