diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-11 04:03:32 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-11 04:03:32 +0000 |
commit | ed95e02da69e469de255362cdb4114fe8e4c0c64 (patch) | |
tree | 5bb68bc6517f35f14ca98498cbc4f52f8b3dcfff /ash | |
parent | 603af7ca8d0238e9b1a12b14a67655b831b047b7 (diff) | |
download | chromium_src-ed95e02da69e469de255362cdb4114fe8e4c0c64.zip chromium_src-ed95e02da69e469de255362cdb4114fe8e4c0c64.tar.gz chromium_src-ed95e02da69e469de255362cdb4114fe8e4c0c64.tar.bz2 |
Update src/ash/ for renames and moves in base
Renames string16 -> base::string16 and
base/string_number_conversions.h -> base/strings/string_number_conversions.h
BUG=
Review URL: https://codereview.chromium.org/13856005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@193561 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash')
99 files changed, 308 insertions, 291 deletions
diff --git a/ash/display/display_error_dialog_unittest.cc b/ash/display/display_error_dialog_unittest.cc index 196506a..9c5a891 100644 --- a/ash/display/display_error_dialog_unittest.cc +++ b/ash/display/display_error_dialog_unittest.cc @@ -42,7 +42,7 @@ class DisplayErrorDialogTest : public test::AshTestBase { DisplayErrorObserver* observer() { return observer_.get(); } - const string16& GetMessageContents(const DisplayErrorDialog* dialog) { + const base::string16& GetMessageContents(const DisplayErrorDialog* dialog) { const views::Label* label = static_cast<const views::Label*>( static_cast<const views::View*>(dialog)->child_at(0)); return label->text(); diff --git a/ash/display/display_info.cc b/ash/display/display_info.cc index 739be890..2b8fb54 100644 --- a/ash/display/display_info.cc +++ b/ash/display/display_info.cc @@ -8,9 +8,9 @@ #include "ash/display/display_info.h" #include "base/logging.h" -#include "base/string_number_conversions.h" #include "base/string_util.h" #include "base/stringprintf.h" +#include "base/strings/string_number_conversions.h" #include "ui/gfx/display.h" #include "ui/gfx/size_conversions.h" #include "ui/gfx/size_f.h" diff --git a/ash/display/display_manager.cc b/ash/display/display_manager.cc index 30dd4a3..3e38236 100644 --- a/ash/display/display_manager.cc +++ b/ash/display/display_manager.cc @@ -16,8 +16,8 @@ #include "base/command_line.h" #include "base/logging.h" #include "base/stl_util.h" -#include "base/string_number_conversions.h" #include "base/stringprintf.h" +#include "base/strings/string_number_conversions.h" #include "base/strings/string_split.h" #include "base/utf_string_conversions.h" #include "grit/ash_strings.h" diff --git a/ash/drag_drop/drag_drop_controller_unittest.cc b/ash/drag_drop/drag_drop_controller_unittest.cc index 2b0091f..df87dfc 100644 --- a/ash/drag_drop/drag_drop_controller_unittest.cc +++ b/ash/drag_drop/drag_drop_controller_unittest.cc @@ -207,7 +207,7 @@ class TestDragDropController : public internal::DragDropController { int num_drag_updates_; bool drop_received_; bool drag_canceled_; - string16 drag_string_; + base::string16 drag_string_; private: DISALLOW_COPY_AND_ASSIGN(TestDragDropController); diff --git a/ash/keyboard_overlay/keyboard_overlay_delegate.cc b/ash/keyboard_overlay/keyboard_overlay_delegate.cc index d6f7890..b3a925b 100644 --- a/ash/keyboard_overlay/keyboard_overlay_delegate.cc +++ b/ash/keyboard_overlay/keyboard_overlay_delegate.cc @@ -62,7 +62,7 @@ void PaintMessageHandler::DidPaint(const ListValue* args) { namespace ash { -KeyboardOverlayDelegate::KeyboardOverlayDelegate(const string16& title, +KeyboardOverlayDelegate::KeyboardOverlayDelegate(const base::string16& title, const GURL& url) : title_(title), url_(url), @@ -99,7 +99,7 @@ ui::ModalType KeyboardOverlayDelegate::GetDialogModalType() const { return ui::MODAL_TYPE_SYSTEM; } -string16 KeyboardOverlayDelegate::GetDialogTitle() const { +base::string16 KeyboardOverlayDelegate::GetDialogTitle() const { return title_; } diff --git a/ash/keyboard_overlay/keyboard_overlay_delegate.h b/ash/keyboard_overlay/keyboard_overlay_delegate.h index 57dc0d4..cf46aff 100644 --- a/ash/keyboard_overlay/keyboard_overlay_delegate.h +++ b/ash/keyboard_overlay/keyboard_overlay_delegate.h @@ -22,7 +22,7 @@ namespace ash { // Delegate to handle showing the keyboard overlay drawing. Exported for test. class ASH_EXPORT KeyboardOverlayDelegate : public ui::WebDialogDelegate { public: - KeyboardOverlayDelegate(const string16& title, const GURL& url); + KeyboardOverlayDelegate(const base::string16& title, const GURL& url); // Shows the keyboard overlay widget. Returns the widget for testing. views::Widget* Show(views::WebDialogView* view); @@ -37,7 +37,7 @@ class ASH_EXPORT KeyboardOverlayDelegate : public ui::WebDialogDelegate { // 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; @@ -50,7 +50,7 @@ class ASH_EXPORT KeyboardOverlayDelegate : public ui::WebDialogDelegate { const content::ContextMenuParams& params) OVERRIDE; // The dialog title. - string16 title_; + base::string16 title_; // The URL of the keyboard overlay. GURL url_; diff --git a/ash/launcher/launcher_button_host.h b/ash/launcher/launcher_button_host.h index 37ed07a..ecb76a3 100644 --- a/ash/launcher/launcher_button_host.h +++ b/ash/launcher/launcher_button_host.h @@ -54,7 +54,7 @@ class ASH_EXPORT LauncherButtonHost { virtual void MouseExitedButton(views::View* view) = 0; // Invoked to get the accessible name of the item. - virtual string16 GetAccessibleName(const views::View* view) = 0; + virtual base::string16 GetAccessibleName(const views::View* view) = 0; protected: virtual ~LauncherButtonHost() {} diff --git a/ash/launcher/launcher_delegate.h b/ash/launcher/launcher_delegate.h index bcde60f..88c08f7 100644 --- a/ash/launcher/launcher_delegate.h +++ b/ash/launcher/launcher_delegate.h @@ -58,7 +58,7 @@ class ASH_EXPORT LauncherDelegate { virtual int GetBrowserShortcutResourceId() = 0; // Returns the title to display for the specified launcher item. - virtual string16 GetTitle(const LauncherItem& item) = 0; + virtual base::string16 GetTitle(const LauncherItem& item) = 0; // Returns the context menumodel for the specified item on // |root_window|. Return NULL if there should be no context diff --git a/ash/launcher/launcher_tooltip_manager.cc b/ash/launcher/launcher_tooltip_manager.cc index 568ff56..ae32c26 100644 --- a/ash/launcher/launcher_tooltip_manager.cc +++ b/ash/launcher/launcher_tooltip_manager.cc @@ -53,7 +53,7 @@ class LauncherTooltipManager::LauncherTooltipBubble views::BubbleBorder::ArrowLocation arrow_location, LauncherTooltipManager* host); - void SetText(const string16& text); + void SetText(const base::string16& text); void Close(); private: @@ -109,7 +109,7 @@ LauncherTooltipManager::LauncherTooltipBubble::LauncherTooltipBubble( } void LauncherTooltipManager::LauncherTooltipBubble::SetText( - const string16& text) { + const base::string16& text) { label_->SetText(text); SizeToContents(); } @@ -160,7 +160,7 @@ LauncherTooltipManager::~LauncherTooltipManager() { } void LauncherTooltipManager::ShowDelayed(views::View* anchor, - const string16& text) { + const base::string16& text) { if (view_) { if (timer_.get() && timer_->IsRunning()) { return; @@ -178,7 +178,7 @@ void LauncherTooltipManager::ShowDelayed(views::View* anchor, } void LauncherTooltipManager::ShowImmediately(views::View* anchor, - const string16& text) { + const base::string16& text) { if (view_) { if (timer_.get() && timer_->IsRunning()) StopTimer(); @@ -345,7 +345,7 @@ void LauncherTooltipManager::ShowInternal() { } void LauncherTooltipManager::CreateBubble(views::View* anchor, - const string16& text) { + const base::string16& text) { DCHECK(!view_); anchor_ = anchor; diff --git a/ash/launcher/launcher_tooltip_manager.h b/ash/launcher/launcher_tooltip_manager.h index c2418f5..7ccc18a 100644 --- a/ash/launcher/launcher_tooltip_manager.h +++ b/ash/launcher/launcher_tooltip_manager.h @@ -50,10 +50,10 @@ class ASH_EXPORT LauncherTooltipManager : public ui::EventHandler, void OnBubbleClosed(views::BubbleDelegateView* view); // Shows the tooltip after a delay. It also has the appearing animation. - void ShowDelayed(views::View* anchor, const string16& text); + void ShowDelayed(views::View* anchor, const base::string16& text); // Shows the tooltip immediately. It omits the appearing animation. - void ShowImmediately(views::View* anchor, const string16& text); + void ShowImmediately(views::View* anchor, const base::string16& text); // Closes the tooltip. void Close(); @@ -93,12 +93,12 @@ protected: void CancelHidingAnimation(); void CloseSoon(); void ShowInternal(); - void CreateBubble(views::View* anchor, const string16& text); + void CreateBubble(views::View* anchor, const base::string16& text); LauncherTooltipBubble* view_; views::Widget* widget_; views::View* anchor_; - string16 text_; + base::string16 text_; scoped_ptr<base::Timer> timer_; ShelfLayoutManager* shelf_layout_manager_; diff --git a/ash/launcher/launcher_tooltip_manager_unittest.cc b/ash/launcher/launcher_tooltip_manager_unittest.cc index 0cdd3734..4ceef35 100644 --- a/ash/launcher/launcher_tooltip_manager_unittest.cc +++ b/ash/launcher/launcher_tooltip_manager_unittest.cc @@ -54,12 +54,12 @@ class LauncherTooltipManagerTest : public AshTestBase { void ShowDelayed() { CreateWidget(); - tooltip_manager_->ShowDelayed(dummy_anchor_.get(), string16()); + tooltip_manager_->ShowDelayed(dummy_anchor_.get(), base::string16()); } void ShowImmediately() { CreateWidget(); - tooltip_manager_->ShowImmediately(dummy_anchor_.get(), string16()); + tooltip_manager_->ShowImmediately(dummy_anchor_.get(), base::string16()); } bool TooltipIsVisible() { diff --git a/ash/launcher/launcher_view.cc b/ash/launcher/launcher_view.cc index 48cc005..03facbc 100644 --- a/ash/launcher/launcher_view.cc +++ b/ash/launcher/launcher_view.cc @@ -1284,11 +1284,11 @@ void LauncherView::MouseExitedButton(views::View* view) { tooltip_->StopTimer(); } -string16 LauncherView::GetAccessibleName(const views::View* view) { +base::string16 LauncherView::GetAccessibleName(const views::View* view) { int view_index = view_model_->GetIndexOfView(view); // May be -1 while in the process of animating closed. if (view_index == -1) - return string16(); + return base::string16(); switch (model_->items()[view_index].type) { case TYPE_TABBED: @@ -1306,7 +1306,7 @@ string16 LauncherView::GetAccessibleName(const views::View* view) { case TYPE_BROWSER_SHORTCUT: return Shell::GetInstance()->delegate()->GetProductName(); } - return string16(); + return base::string16(); } void LauncherView::ButtonPressed(views::Button* sender, diff --git a/ash/launcher/launcher_view.h b/ash/launcher/launcher_view.h index 8b2cd1f..3b1f0f3 100644 --- a/ash/launcher/launcher_view.h +++ b/ash/launcher/launcher_view.h @@ -205,7 +205,7 @@ class ASH_EXPORT LauncherView : public views::View, virtual void MouseMovedOverButton(views::View* view) OVERRIDE; virtual void MouseEnteredButton(views::View* view) OVERRIDE; virtual void MouseExitedButton(views::View* view) OVERRIDE; - virtual string16 GetAccessibleName(const views::View* view) OVERRIDE; + virtual base::string16 GetAccessibleName(const views::View* view) OVERRIDE; // Overridden from views::ButtonListener: virtual void ButtonPressed(views::Button* sender, diff --git a/ash/shell/app_list.cc b/ash/shell/app_list.cc index ebf2f87..d005f2d 100644 --- a/ash/shell/app_list.cc +++ b/ash/shell/app_list.cc @@ -146,11 +146,11 @@ class WindowTypeLauncherItem : public app_list::AppListItemModel { class ExampleSearchResult : public app_list::SearchResult { public: ExampleSearchResult(WindowTypeLauncherItem::Type type, - const string16& query) + const base::string16& query) : type_(type) { SetIcon(WindowTypeLauncherItem::GetIcon(type_)); - string16 title = UTF8ToUTF16(WindowTypeLauncherItem::GetTitle(type_)); + base::string16 title = UTF8ToUTF16(WindowTypeLauncherItem::GetTitle(type_)); set_title(title); Tags title_tags; @@ -160,7 +160,7 @@ class ExampleSearchResult : public app_list::SearchResult { // Note the following is not a proper way to handle i18n string. title = base::i18n::ToLower(title); size_t match_start = title.find(query); - while (match_start != string16::npos) { + while (match_start != base::string16::npos) { title_tags.push_back(Tag(Tag::MATCH, match_start, match_start + match_len)); @@ -168,7 +168,8 @@ class ExampleSearchResult : public app_list::SearchResult { } set_title_tags(title_tags); - string16 details = UTF8ToUTF16(WindowTypeLauncherItem::GetDetails(type_)); + base::string16 details = + UTF8ToUTF16(WindowTypeLauncherItem::GetDetails(type_)); set_details(details); Tags details_tags; details_tags.push_back(Tag(Tag::DIM, 0, details.length())); @@ -199,7 +200,7 @@ class ExampleAppListViewDelegate : public app_list::AppListViewDelegate { } gfx::ImageSkia CreateSearchBoxIcon() { - const string16 icon_text = ASCIIToUTF16("ash"); + const base::string16 icon_text = ASCIIToUTF16("ash"); const gfx::Size icon_size(32, 32); gfx::Canvas canvas(icon_size, ui::SCALE_FACTOR_100P, @@ -249,7 +250,7 @@ class ExampleAppListViewDelegate : public app_list::AppListViewDelegate { } virtual void StartSearch() OVERRIDE { - string16 query; + base::string16 query; TrimWhitespace(model_->search_box()->text(), TRIM_ALL, &query); query = base::i18n::ToLower(query); @@ -263,7 +264,8 @@ class ExampleAppListViewDelegate : public app_list::AppListViewDelegate { WindowTypeLauncherItem::Type type = static_cast<WindowTypeLauncherItem::Type>(i); - string16 title = UTF8ToUTF16(WindowTypeLauncherItem::GetTitle(type)); + base::string16 title = + UTF8ToUTF16(WindowTypeLauncherItem::GetTitle(type)); if (base::i18n::StringSearchIgnoringCaseAndAccents( query, title, NULL, NULL)) { model_->results()->Add(new ExampleSearchResult(type, query)); @@ -293,12 +295,12 @@ class ExampleAppListViewDelegate : public app_list::AppListViewDelegate { return gfx::ImageSkia(); } - virtual string16 GetCurrentUserName() { - return string16(); + virtual base::string16 GetCurrentUserName() { + return base::string16(); } - virtual string16 GetCurrentUserEmail() { - return string16(); + virtual base::string16 GetCurrentUserEmail() { + return base::string16(); } virtual void OpenSettings() { diff --git a/ash/shell/bubble.cc b/ash/shell/bubble.cc index 649202d..fa2583e 100644 --- a/ash/shell/bubble.cc +++ b/ash/shell/bubble.cc @@ -13,7 +13,7 @@ namespace ash { namespace shell { struct BubbleConfig { - string16 label; + base::string16 label; views::View* anchor_view; views::BubbleBorder::ArrowLocation arrow; }; @@ -31,7 +31,7 @@ class ExampleBubbleDelegateView : public views::BubbleDelegateView { } private: - string16 label_; + base::string16 label_; }; void CreatePointyBubble(views::View* anchor_view) { diff --git a/ash/shell/content_client/shell_browser_main_parts.cc b/ash/shell/content_client/shell_browser_main_parts.cc index f413bae..53c35b69 100644 --- a/ash/shell/content_client/shell_browser_main_parts.cc +++ b/ash/shell/content_client/shell_browser_main_parts.cc @@ -12,7 +12,7 @@ #include "base/command_line.h" #include "base/i18n/icu_util.h" #include "base/message_loop.h" -#include "base/string_number_conversions.h" +#include "base/strings/string_number_conversions.h" #include "base/threading/thread.h" #include "base/threading/thread_restrictions.h" #include "content/public/common/content_switches.h" diff --git a/ash/shell/launcher_delegate_impl.cc b/ash/shell/launcher_delegate_impl.cc index 4e54600..d5bc0a2 100644 --- a/ash/shell/launcher_delegate_impl.cc +++ b/ash/shell/launcher_delegate_impl.cc @@ -42,7 +42,7 @@ int LauncherDelegateImpl::GetBrowserShortcutResourceId() { return IDR_AURA_LAUNCHER_BROWSER_SHORTCUT; } -string16 LauncherDelegateImpl::GetTitle(const ash::LauncherItem& item) { +base::string16 LauncherDelegateImpl::GetTitle(const ash::LauncherItem& item) { return watcher_->GetWindowByID(item.id)->title(); } diff --git a/ash/shell/launcher_delegate_impl.h b/ash/shell/launcher_delegate_impl.h index 79c6f59..4d7017f 100644 --- a/ash/shell/launcher_delegate_impl.h +++ b/ash/shell/launcher_delegate_impl.h @@ -29,7 +29,7 @@ class LauncherDelegateImpl : public ash::LauncherDelegate { virtual void ItemClicked(const ash::LauncherItem& item, const ui::Event& event) OVERRIDE; virtual int GetBrowserShortcutResourceId() OVERRIDE; - virtual string16 GetTitle(const ash::LauncherItem& item) OVERRIDE; + virtual base::string16 GetTitle(const ash::LauncherItem& item) OVERRIDE; virtual ui::MenuModel* CreateContextMenu( const ash::LauncherItem& item, aura::RootWindow* root) OVERRIDE; diff --git a/ash/shell/lock_view.cc b/ash/shell/lock_view.cc index 5390ea7..d60eba2b 100644 --- a/ash/shell/lock_view.cc +++ b/ash/shell/lock_view.cc @@ -41,7 +41,7 @@ class LockView : public views::WidgetDelegateView, // Overridden from views::View: virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE { canvas->FillRect(GetLocalBounds(), SK_ColorYELLOW); - string16 text = ASCIIToUTF16("LOCKED!"); + base::string16 text = ASCIIToUTF16("LOCKED!"); int string_width = font_.GetStringWidth(text); canvas->DrawStringInt(text, font_, SK_ColorRED, (width() - string_width)/ 2, (height() - font_.GetHeight()) / 2, diff --git a/ash/shell/panel_window.cc b/ash/shell/panel_window.cc index 80acf7d..0517b2d 100644 --- a/ash/shell/panel_window.cc +++ b/ash/shell/panel_window.cc @@ -65,7 +65,7 @@ void PanelWindow::OnPaint(gfx::Canvas* canvas) { canvas->FillRect(GetLocalBounds(), SK_ColorGREEN); } -string16 PanelWindow::GetWindowTitle() const { +base::string16 PanelWindow::GetWindowTitle() const { return ASCIIToUTF16(name_); } diff --git a/ash/shell/panel_window.h b/ash/shell/panel_window.h index 2ac5d68..eefe5e3 100644 --- a/ash/shell/panel_window.h +++ b/ash/shell/panel_window.h @@ -37,7 +37,7 @@ class PanelWindow : public views::WidgetDelegateView { virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; // Overridden from views::WidgetDelegate: - virtual string16 GetWindowTitle() const OVERRIDE; + virtual base::string16 GetWindowTitle() const OVERRIDE; virtual View* GetContentsView() OVERRIDE; virtual bool CanResize() const OVERRIDE; virtual bool CanMaximize() const OVERRIDE; diff --git a/ash/shell/shell_delegate_impl.cc b/ash/shell/shell_delegate_impl.cc index 260cf06..330ab4d 100644 --- a/ash/shell/shell_delegate_impl.cc +++ b/ash/shell/shell_delegate_impl.cc @@ -213,12 +213,14 @@ void ShellDelegateImpl::HandleMediaPlayPause() { void ShellDelegateImpl::HandleMediaPrevTrack() { } -string16 ShellDelegateImpl::GetTimeRemainingString(base::TimeDelta delta) { - return string16(); +base::string16 ShellDelegateImpl::GetTimeRemainingString( + base::TimeDelta delta) { + return base::string16(); } -string16 ShellDelegateImpl::GetTimeDurationLongString(base::TimeDelta delta) { - return string16(); +base::string16 ShellDelegateImpl::GetTimeDurationLongString( + base::TimeDelta delta) { + return base::string16(); } void ShellDelegateImpl::SaveScreenMagnifierScale(double scale) { @@ -236,8 +238,8 @@ RootWindowHostFactory* ShellDelegateImpl::CreateRootWindowHostFactory() { return RootWindowHostFactory::Create(); } -string16 ShellDelegateImpl::GetProductName() const { - return string16(); +base::string16 ShellDelegateImpl::GetProductName() const { + return base::string16(); } } // namespace shell diff --git a/ash/shell/shell_delegate_impl.h b/ash/shell/shell_delegate_impl.h index 51077db..b001038 100644 --- a/ash/shell/shell_delegate_impl.h +++ b/ash/shell/shell_delegate_impl.h @@ -74,14 +74,15 @@ class ShellDelegateImpl : public ash::ShellDelegate { virtual void HandleMediaNextTrack() OVERRIDE; virtual void HandleMediaPlayPause() OVERRIDE; virtual void HandleMediaPrevTrack() OVERRIDE; - virtual string16 GetTimeRemainingString(base::TimeDelta delta) OVERRIDE; - virtual string16 GetTimeDurationLongString(base::TimeDelta delta) OVERRIDE; + virtual base::string16 GetTimeRemainingString(base::TimeDelta delta) OVERRIDE; + virtual base::string16 GetTimeDurationLongString( + base::TimeDelta delta) OVERRIDE; virtual void SaveScreenMagnifierScale(double scale) OVERRIDE; virtual double GetSavedScreenMagnifierScale() OVERRIDE; virtual ui::MenuModel* CreateContextMenu( aura::RootWindow* root_window) OVERRIDE; virtual RootWindowHostFactory* CreateRootWindowHostFactory() OVERRIDE; - virtual string16 GetProductName() const OVERRIDE; + virtual base::string16 GetProductName() const OVERRIDE; private: // Used to update Launcher. Owned by main. diff --git a/ash/shell/toplevel_window.cc b/ash/shell/toplevel_window.cc index 2a104bb..af18151 100644 --- a/ash/shell/toplevel_window.cc +++ b/ash/shell/toplevel_window.cc @@ -55,7 +55,7 @@ void ToplevelWindow::OnPaint(gfx::Canvas* canvas) { canvas->FillRect(GetLocalBounds(), SK_ColorDKGRAY); } -string16 ToplevelWindow::GetWindowTitle() const { +base::string16 ToplevelWindow::GetWindowTitle() const { return params_.persist_across_all_workspaces ? ASCIIToUTF16("Examples: Toplevel Window (P)") : ASCIIToUTF16("Examples: Toplevel Window"); diff --git a/ash/shell/toplevel_window.h b/ash/shell/toplevel_window.h index ec398c2..22c23d0 100644 --- a/ash/shell/toplevel_window.h +++ b/ash/shell/toplevel_window.h @@ -29,7 +29,7 @@ class ToplevelWindow : public views::WidgetDelegateView { virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; // Overridden from views::WidgetDelegate: - virtual string16 GetWindowTitle() const OVERRIDE; + virtual base::string16 GetWindowTitle() const OVERRIDE; virtual View* GetContentsView() OVERRIDE; virtual bool CanResize() const OVERRIDE; virtual bool CanMaximize() const OVERRIDE; diff --git a/ash/shell/widgets.cc b/ash/shell/widgets.cc index 234e5e3..9790a02 100644 --- a/ash/shell/widgets.cc +++ b/ash/shell/widgets.cc @@ -36,7 +36,7 @@ class WidgetsWindow : public views::WidgetDelegateView { // Overridden from views::WidgetDelegate: virtual views::View* GetContentsView() OVERRIDE; - virtual string16 GetWindowTitle() const OVERRIDE; + virtual base::string16 GetWindowTitle() const OVERRIDE; virtual bool CanResize() const OVERRIDE; private: @@ -119,7 +119,7 @@ views::View* WidgetsWindow::GetContentsView() { return this; } -string16 WidgetsWindow::GetWindowTitle() const { +base::string16 WidgetsWindow::GetWindowTitle() const { return ASCIIToUTF16("Examples: Widgets"); } diff --git a/ash/shell/window_type_launcher.cc b/ash/shell/window_type_launcher.cc index 7b710bd..9ac50e2 100644 --- a/ash/shell/window_type_launcher.cc +++ b/ash/shell/window_type_launcher.cc @@ -92,7 +92,7 @@ class ModalWindow : public views::WidgetDelegateView, virtual bool CanResize() const OVERRIDE { return true; } - virtual string16 GetWindowTitle() const OVERRIDE { + virtual base::string16 GetWindowTitle() const OVERRIDE { return ASCIIToUTF16("Modal Window"); } virtual ui::ModalType GetModalType() const OVERRIDE { @@ -157,7 +157,7 @@ class NonModalTransient : public views::WidgetDelegateView { virtual bool CanResize() const OVERRIDE { return true; } - virtual string16 GetWindowTitle() const OVERRIDE { + virtual base::string16 GetWindowTitle() const OVERRIDE { return ASCIIToUTF16("Non-Modal Transient"); } virtual void DeleteDelegate() OVERRIDE { @@ -307,7 +307,7 @@ bool WindowTypeLauncher::CanResize() const { return true; } -string16 WindowTypeLauncher::GetWindowTitle() const { +base::string16 WindowTypeLauncher::GetWindowTitle() const { return ASCIIToUTF16("Examples: Window Builder"); } diff --git a/ash/shell/window_type_launcher.h b/ash/shell/window_type_launcher.h index 51376e8..de2159e 100644 --- a/ash/shell/window_type_launcher.h +++ b/ash/shell/window_type_launcher.h @@ -48,7 +48,7 @@ class WindowTypeLauncher : public views::WidgetDelegateView, // Overridden from views::WidgetDelegate: virtual views::View* GetContentsView() OVERRIDE; virtual bool CanResize() const OVERRIDE; - virtual string16 GetWindowTitle() const OVERRIDE; + virtual base::string16 GetWindowTitle() const OVERRIDE; virtual bool CanMaximize() const OVERRIDE; // Overridden from views::ButtonListener: diff --git a/ash/shell_delegate.h b/ash/shell_delegate.h index 97c0952..e57eebd 100644 --- a/ash/shell_delegate.h +++ b/ash/shell_delegate.h @@ -236,10 +236,10 @@ class ASH_EXPORT ShellDelegate { // Produces l10n-ed text of remaining time, e.g.: "13 minutes left" or // "13 Minuten übrig". // Used, for example, to display the remaining battery life. - virtual string16 GetTimeRemainingString(base::TimeDelta delta) = 0; + virtual base::string16 GetTimeRemainingString(base::TimeDelta delta) = 0; // Produces l10n-ed text for time duration, e.g.: "13 minutes" or "2 hours". - virtual string16 GetTimeDurationLongString(base::TimeDelta delta) = 0; + virtual base::string16 GetTimeDurationLongString(base::TimeDelta delta) = 0; // Saves the zoom scale of the full screen magnifier. virtual void SaveScreenMagnifierScale(double scale) = 0; @@ -256,7 +256,7 @@ class ASH_EXPORT ShellDelegate { virtual RootWindowHostFactory* CreateRootWindowHostFactory() = 0; // Get the product name. - virtual string16 GetProductName() const = 0; + virtual base::string16 GetProductName() const = 0; }; } // namespace ash diff --git a/ash/shell_unittest.cc b/ash/shell_unittest.cc index 25df2bf..039354f 100644 --- a/ash/shell_unittest.cc +++ b/ash/shell_unittest.cc @@ -89,7 +89,7 @@ class ModalWindow : public views::WidgetDelegateView { virtual bool CanResize() const OVERRIDE { return true; } - virtual string16 GetWindowTitle() const OVERRIDE { + virtual base::string16 GetWindowTitle() const OVERRIDE { return ASCIIToUTF16("Modal Window"); } virtual ui::ModalType GetModalType() const OVERRIDE { diff --git a/ash/system/bluetooth/tray_bluetooth.cc b/ash/system/bluetooth/tray_bluetooth.cc index 143be89..2569c91 100644 --- a/ash/system/bluetooth/tray_bluetooth.cc +++ b/ash/system/bluetooth/tray_bluetooth.cc @@ -49,7 +49,7 @@ class BluetoothDefaultView : public TrayItemMore { ash::Shell::GetInstance()->system_tray_delegate(); if (delegate->GetBluetoothAvailable()) { ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); - const string16 label = + const base::string16 label = rb.GetLocalizedString(delegate->GetBluetoothEnabled() ? IDS_ASH_STATUS_TRAY_BLUETOOTH_ENABLED : IDS_ASH_STATUS_TRAY_BLUETOOTH_DISABLED); @@ -232,7 +232,7 @@ class BluetoothDetailedView : public TrayDetailsView, } } - HoverHighlightView* AddScrollListItem(const string16& text, + HoverHighlightView* AddScrollListItem(const base::string16& text, gfx::Font::FontStyle style, bool checked, bool enabled) { @@ -267,7 +267,7 @@ class BluetoothDetailedView : public TrayDetailsView, // and the display_name of the device will be returned in |display_name|. bool FoundDevice(const std::string& device_id, const BluetoothDeviceList& device_list, - string16* display_name) { + base::string16* display_name) { for (size_t i = 0; i < device_list.size(); ++i) { if (device_list[i].address == device_id) { *display_name = device_list[i].display_name; @@ -280,7 +280,7 @@ class BluetoothDetailedView : public TrayDetailsView, // Updates UI of the clicked bluetooth device to show it is being connected // or disconnected if such an operation is going to be performed underway. void UpdateClickedDevice(std::string device_id, views::View* item_container) { - string16 display_name; + base::string16 display_name; if (FoundDevice(device_id, connected_devices_, &display_name)) { display_name = l10n_util::GetStringFUTF16( IDS_ASH_STATUS_TRAY_BLUETOOTH_DISCONNECTING, display_name); diff --git a/ash/system/chromeos/enterprise/tray_enterprise.cc b/ash/system/chromeos/enterprise/tray_enterprise.cc index fd293c5..b316738 100644 --- a/ash/system/chromeos/enterprise/tray_enterprise.cc +++ b/ash/system/chromeos/enterprise/tray_enterprise.cc @@ -23,12 +23,12 @@ class EnterpriseDefaultView : public views::View { public: explicit EnterpriseDefaultView(ViewClickListener* click_listener); virtual ~EnterpriseDefaultView(); - void SetMessage(const string16& message); + void SetMessage(const base::string16& message); private: - views::View* CreateChildView(const string16& message) const; + views::View* CreateChildView(const base::string16& message) const; ViewClickListener* click_listener_; - string16 message_; + base::string16 message_; DISALLOW_COPY_AND_ASSIGN(EnterpriseDefaultView); }; @@ -43,7 +43,7 @@ EnterpriseDefaultView::EnterpriseDefaultView( EnterpriseDefaultView::~EnterpriseDefaultView() { } -void EnterpriseDefaultView::SetMessage(const string16& message) { +void EnterpriseDefaultView::SetMessage(const base::string16& message) { if (message_ == message) return; @@ -58,7 +58,7 @@ void EnterpriseDefaultView::SetMessage(const string16& message) { } views::View* EnterpriseDefaultView::CreateChildView( - const string16& message) const { + const base::string16& message) const { ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); const gfx::ImageSkia* icon = rb.GetImageSkiaNamed(IDR_AURA_UBER_TRAY_ENTERPRISE_DARK); @@ -86,7 +86,7 @@ TrayEnterprise::~TrayEnterprise() { } void TrayEnterprise::UpdateEnterpriseMessage() { - string16 message = Shell::GetInstance()->system_tray_delegate()-> + base::string16 message = Shell::GetInstance()->system_tray_delegate()-> GetEnterpriseMessage(); if (default_view_) default_view_->SetMessage(message); diff --git a/ash/system/chromeos/network/network_icon.cc b/ash/system/chromeos/network/network_icon.cc index f241eb1..452b671 100644 --- a/ash/system/chromeos/network/network_icon.cc +++ b/ash/system/chromeos/network/network_icon.cc @@ -643,8 +643,8 @@ gfx::ImageSkia GetImageForDisconnectedNetwork(IconType icon_type, return GetDisconnectedImage(network_type, icon_type); } -string16 GetLabelForNetwork(const chromeos::NetworkState* network, - IconType icon_type) { +base::string16 GetLabelForNetwork(const chromeos::NetworkState* network, + IconType icon_type) { DCHECK(network); std::string activation_state = network->activation_state(); if (icon_type == ICON_TYPE_LIST) { diff --git a/ash/system/chromeos/network/network_icon.h b/ash/system/chromeos/network/network_icon.h index 9ea5b7f..bc265d5 100644 --- a/ash/system/chromeos/network/network_icon.h +++ b/ash/system/chromeos/network/network_icon.h @@ -41,8 +41,8 @@ gfx::ImageSkia GetImageForDisconnectedNetwork(IconType icon_type, const std::string& network_type); // Returns the label for |network| based on |icon_type|. |network| can be NULL. -string16 GetLabelForNetwork(const chromeos::NetworkState* network, - IconType icon_type); +base::string16 GetLabelForNetwork(const chromeos::NetworkState* network, + IconType icon_type); // Updates and returns the appropriate message id if the cellular network // is uninitialized. diff --git a/ash/system/chromeos/network/network_list_detailed_view.cc b/ash/system/chromeos/network/network_list_detailed_view.cc index 85ad8a6..68bcc3e 100644 --- a/ash/system/chromeos/network/network_list_detailed_view.cc +++ b/ash/system/chromeos/network/network_list_detailed_view.cc @@ -234,7 +234,7 @@ bool NetworkListDetailedView::UpdateNetworkListEntries( else if (!have_cellular_network && delegate->GetMobileEnabled()) status_message_id = IDS_ASH_STATUS_TRAY_NO_CELLULAR_NETWORKS; if (status_message_id) { - string16 text = rb.GetLocalizedString(status_message_id); + base::string16 text = rb.GetLocalizedString(status_message_id); if (CreateOrUpdateInfoLabel(index++, text, &no_cellular_networks_view_)) needs_relayout = true; } else if (no_cellular_networks_view_) { @@ -248,7 +248,7 @@ bool NetworkListDetailedView::UpdateNetworkListEntries( int message_id = delegate->GetWifiEnabled() ? IDS_ASH_STATUS_TRAY_NETWORK_WIFI_ENABLED : IDS_ASH_STATUS_TRAY_NETWORK_WIFI_DISABLED; - string16 text = rb.GetLocalizedString(message_id); + base::string16 text = rb.GetLocalizedString(message_id); if (CreateOrUpdateInfoLabel(index++, text, &no_wifi_networks_view_)) needs_relayout = true; } else if (no_wifi_networks_view_) { @@ -259,7 +259,7 @@ bool NetworkListDetailedView::UpdateNetworkListEntries( // "Wifi Scanning" if (delegate->GetWifiScanning()) { - string16 text = + base::string16 text = rb.GetLocalizedString(IDS_ASH_STATUS_TRAY_WIFI_SCANNING_MESSAGE); if (CreateOrUpdateInfoLabel(index++, text, &scanning_view_)) needs_relayout = true; diff --git a/ash/system/chromeos/network/network_list_detailed_view_base.cc b/ash/system/chromeos/network/network_list_detailed_view_base.cc index 067761f..787da1f 100644 --- a/ash/system/chromeos/network/network_list_detailed_view_base.cc +++ b/ash/system/chromeos/network/network_list_detailed_view_base.cc @@ -29,7 +29,7 @@ namespace { // Create a label with the font size and color used in the network info bubble. -views::Label* CreateInfoBubbleLabel(const string16& text) { +views::Label* CreateInfoBubbleLabel(const base::string16& text) { views::Label* label = new views::Label(text); ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); label->SetFont(rb.GetFont(ui::ResourceBundle::SmallFont)); @@ -38,7 +38,7 @@ views::Label* CreateInfoBubbleLabel(const string16& text) { } // Create a label formatted for info items in the menu -views::Label* CreateMenuInfoLabel(const string16& text) { +views::Label* CreateMenuInfoLabel(const base::string16& text) { views::Label* label = new views::Label(text); label->set_border(views::Border::CreateEmptyBorder( ash::kTrayPopupPaddingBetweenItems, @@ -50,7 +50,7 @@ views::Label* CreateMenuInfoLabel(const string16& text) { } // Create a row of labels for the network info bubble. -views::View* CreateInfoBubbleLine(const string16& text_label, +views::View* CreateInfoBubbleLine(const base::string16& text_label, const std::string& text_string) { views::View* view = new views::View; view->SetLayoutManager( @@ -214,7 +214,7 @@ void NetworkListDetailedViewBase::UpdateAvailableNetworkList() { } bool NetworkListDetailedViewBase::CreateOrUpdateInfoLabel( - int index, const string16& text, views::Label** label) { + int index, const base::string16& text, views::Label** label) { if (*label == NULL) { *label = CreateMenuInfoLabel(text); scroll_content()->AddChildViewAt(*label, index); @@ -233,7 +233,8 @@ bool NetworkListDetailedViewBase::UpdateNetworkChild( service_path_map_.find(info->service_path); gfx::Font::FontStyle font = info->highlight() ? gfx::Font::BOLD : gfx::Font::NORMAL; - string16 desc = info->description.empty() ? info->name : info->description; + base::string16 desc = info->description.empty() ? info->name + : info->description; if (found == service_path_map_.end()) { container = new HoverHighlightView(this); container->AddIconAndLabel(info->image, desc, font); diff --git a/ash/system/chromeos/network/network_list_detailed_view_base.h b/ash/system/chromeos/network/network_list_detailed_view_base.h index 1d1c648..cfea043 100644 --- a/ash/system/chromeos/network/network_list_detailed_view_base.h +++ b/ash/system/chromeos/network/network_list_detailed_view_base.h @@ -50,7 +50,7 @@ class NetworkListDetailedViewBase : public NetworkDetailedView, user::LoginStatus login() const { return login_; } bool IsNetworkListEmpty() const; bool CreateOrUpdateInfoLabel( - int index, const string16& text, views::Label** label); + int index, const base::string16& text, views::Label** label); bool UpdateNetworkChild(int index, const NetworkIconInfo* info); const std::vector<NetworkIconInfo>& network_list() const { diff --git a/ash/system/chromeos/network/network_observer.h b/ash/system/chromeos/network/network_observer.h index b5dbc29..45011c2 100644 --- a/ash/system/chromeos/network/network_observer.h +++ b/ash/system/chromeos/network/network_observer.h @@ -45,9 +45,9 @@ class NetworkObserver { virtual void SetNetworkMessage(NetworkTrayDelegate* delegate, MessageType message_type, NetworkType network_type, - const string16& title, - const string16& message, - const std::vector<string16>& links) = 0; + const base::string16& title, + const base::string16& message, + const std::vector<base::string16>& links) = 0; // Clears the message notification for |message_type|. virtual void ClearNetworkMessage(MessageType message_type) = 0; diff --git a/ash/system/chromeos/network/network_state_list_detailed_view.cc b/ash/system/chromeos/network/network_state_list_detailed_view.cc index ab36622..b127de1 100644 --- a/ash/system/chromeos/network/network_state_list_detailed_view.cc +++ b/ash/system/chromeos/network/network_state_list_detailed_view.cc @@ -55,7 +55,7 @@ const int kNetworkListHeight = 203; const int kRequestScanDelaySeconds = 10; // Create a label with the font size and color used in the network info bubble. -views::Label* CreateInfoBubbleLabel(const string16& text) { +views::Label* CreateInfoBubbleLabel(const base::string16& text) { views::Label* label = new views::Label(text); ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); label->SetFont(rb.GetFont(ui::ResourceBundle::SmallFont)); @@ -64,7 +64,7 @@ views::Label* CreateInfoBubbleLabel(const string16& text) { } // Create a label formatted for info items in the menu -views::Label* CreateMenuInfoLabel(const string16& text) { +views::Label* CreateMenuInfoLabel(const base::string16& text) { views::Label* label = new views::Label(text); label->set_border(views::Border::CreateEmptyBorder( ash::kTrayPopupPaddingBetweenItems, @@ -76,7 +76,7 @@ views::Label* CreateMenuInfoLabel(const string16& text) { } // Create a row of labels for the network info bubble. -views::View* CreateInfoBubbleLine(const string16& text_label, +views::View* CreateInfoBubbleLine(const base::string16& text_label, const std::string& text_string) { views::View* view = new views::View; view->SetLayoutManager( @@ -121,7 +121,7 @@ struct NetworkInfo { } std::string service_path; - string16 label; + base::string16 label; gfx::ImageSkia image; bool disable; bool highlight; @@ -492,7 +492,7 @@ void NetworkStateListDetailedView::UpdateNetworkList() { } bool NetworkStateListDetailedView::CreateOrUpdateInfoLabel( - int index, const string16& text, views::Label** label) { + int index, const base::string16& text, views::Label** label) { if (*label == NULL) { *label = CreateMenuInfoLabel(text); scroll_content()->AddChildViewAt(*label, index); @@ -569,7 +569,7 @@ bool NetworkStateListDetailedView::UpdateNetworkListEntries( status_message_id = IDS_ASH_STATUS_TRAY_NO_CELLULAR_NETWORKS; } if (status_message_id) { - string16 text = rb.GetLocalizedString(status_message_id); + base::string16 text = rb.GetLocalizedString(status_message_id); if (CreateOrUpdateInfoLabel(index++, text, &no_cellular_networks_view_)) needs_relayout = true; } else if (no_cellular_networks_view_) { @@ -583,7 +583,7 @@ bool NetworkStateListDetailedView::UpdateNetworkListEntries( int message_id = handler->TechnologyEnabled(flimflam::kTypeWifi) ? IDS_ASH_STATUS_TRAY_NETWORK_WIFI_ENABLED : IDS_ASH_STATUS_TRAY_NETWORK_WIFI_DISABLED; - string16 text = rb.GetLocalizedString(message_id); + base::string16 text = rb.GetLocalizedString(message_id); if (CreateOrUpdateInfoLabel(index++, text, &no_wifi_networks_view_)) needs_relayout = true; } else if (no_wifi_networks_view_) { @@ -594,7 +594,7 @@ bool NetworkStateListDetailedView::UpdateNetworkListEntries( // "Wifi Scanning" if (handler->GetScanningByType(flimflam::kTypeWifi)) { - string16 text = + base::string16 text = rb.GetLocalizedString(IDS_ASH_STATUS_TRAY_WIFI_SCANNING_MESSAGE); if (CreateOrUpdateInfoLabel(index++, text, &scanning_view_)) needs_relayout = true; @@ -617,7 +617,7 @@ bool NetworkStateListDetailedView::UpdateNetworkListEntries( // No networks or other messages (fallback) if (index == 0) { - string16 text; + base::string16 text; if (list_type_ == LIST_TYPE_VPN) text = rb.GetLocalizedString(IDS_ASH_STATUS_TRAY_NETWORK_NO_VPN); else diff --git a/ash/system/chromeos/network/network_state_list_detailed_view.h b/ash/system/chromeos/network/network_state_list_detailed_view.h index 0061f4f3..b5daf79 100644 --- a/ash/system/chromeos/network/network_state_list_detailed_view.h +++ b/ash/system/chromeos/network/network_state_list_detailed_view.h @@ -91,7 +91,7 @@ class NetworkStateListDetailedView void UpdateNetworks(const NetworkStateList& networks); void UpdateNetworkList(); bool CreateOrUpdateInfoLabel( - int index, const string16& text, views::Label** label); + int index, const base::string16& text, views::Label** label); bool UpdateNetworkChild(int index, const NetworkInfo* info); bool OrderChild(views::View* view, int index); bool UpdateNetworkListEntries(std::set<std::string>* new_service_paths); diff --git a/ash/system/chromeos/network/tray_network.cc b/ash/system/chromeos/network/tray_network.cc index 81152ad..5507178 100644 --- a/ash/system/chromeos/network/tray_network.cc +++ b/ash/system/chromeos/network/tray_network.cc @@ -80,9 +80,9 @@ class NetworkMessages { Message() : delegate(NULL) {} Message(NetworkTrayDelegate* in_delegate, NetworkObserver::NetworkType network_type, - const string16& in_title, - const string16& in_message, - const std::vector<string16>& in_links) : + const base::string16& in_title, + const base::string16& in_message, + const std::vector<base::string16>& in_links) : delegate(in_delegate), network_type_(network_type), title(in_title), @@ -90,9 +90,9 @@ class NetworkMessages { links(in_links) {} NetworkTrayDelegate* delegate; NetworkObserver::NetworkType network_type_; - string16 title; - string16 message; - std::vector<string16> links; + base::string16 title; + base::string16 message; + std::vector<base::string16> links; }; typedef std::map<NetworkObserver::MessageType, Message> MessageMap; @@ -142,7 +142,7 @@ class NetworkTrayView : public TrayItemView, DCHECK(UseNewNetworkHandlers()); NetworkStateHandler* handler = NetworkStateHandler::Get(); gfx::ImageSkia image; - string16 name; + base::string16 name; network_tray_->GetNetworkStateHandlerImageAndLabel( network_icon::ICON_TYPE_TRAY, &image, &name); bool show_in_tray = !image.isNull(); @@ -152,7 +152,7 @@ class NetworkTrayView : public TrayItemView, if (connected_network) UpdateConnectionStatus(UTF8ToUTF16(connected_network->name()), true); else - UpdateConnectionStatus(string16(), false); + UpdateConnectionStatus(base::string16(), false); } // views::View override. @@ -169,8 +169,9 @@ class NetworkTrayView : public TrayItemView, private: // Updates connection status and notifies accessibility event when necessary. - void UpdateConnectionStatus(const string16& network_name, bool connected) { - string16 new_connection_status_string; + void UpdateConnectionStatus(const base::string16& network_name, + bool connected) { + base::string16 new_connection_status_string; if (connected) { new_connection_status_string = l10n_util::GetStringFUTF16( IDS_ASH_STATUS_TRAY_NETWORK_CONNECTED, network_name); @@ -190,7 +191,7 @@ class NetworkTrayView : public TrayItemView, TrayNetwork* network_tray_; views::ImageView* image_view_; - string16 connection_status_string_; + base::string16 connection_status_string_; DISALLOW_COPY_AND_ASSIGN(NetworkTrayView); }; @@ -214,7 +215,7 @@ class NetworkDefaultView : public TrayItemMore, void Update() { if (UseNewNetworkHandlers()) { gfx::ImageSkia image; - string16 label; + base::string16 label; network_tray_->GetNetworkStateHandlerImageAndLabel( network_icon::ICON_TYPE_DEFAULT_VIEW, &image, &label); SetImage(&image); @@ -500,9 +501,9 @@ void TrayNetwork::OnNetworkRefresh(const NetworkIconInfo& info) { void TrayNetwork::SetNetworkMessage(NetworkTrayDelegate* delegate, MessageType message_type, NetworkType network_type, - const string16& title, - const string16& message, - const std::vector<string16>& links) { + const base::string16& title, + const base::string16& message, + const std::vector<base::string16>& links) { messages_->messages()[message_type] = tray::NetworkMessages::Message( delegate, network_type, title, message, links); if (!Shell::GetInstance()->system_tray_delegate()->IsOobeCompleted()) @@ -555,7 +556,7 @@ void TrayNetwork::NetworkServiceChanged(const chromeos::NetworkState* network) { void TrayNetwork::GetNetworkStateHandlerImageAndLabel( network_icon::IconType icon_type, gfx::ImageSkia* image, - string16* label) { + base::string16* label) { NetworkStateHandler* handler = NetworkStateHandler::Get(); const NetworkState* connected_network = handler->ConnectedNetworkByType( NetworkStateHandler::kMatchTypeNonVirtual); diff --git a/ash/system/chromeos/network/tray_network.h b/ash/system/chromeos/network/tray_network.h index 241154e..c4ff928 100644 --- a/ash/system/chromeos/network/tray_network.h +++ b/ash/system/chromeos/network/tray_network.h @@ -59,12 +59,13 @@ class TrayNetwork : public SystemTrayItem, // NetworkObserver virtual void OnNetworkRefresh(const NetworkIconInfo& info) OVERRIDE; - virtual void SetNetworkMessage(NetworkTrayDelegate* delegate, - MessageType message_type, - NetworkType network_type, - const string16& title, - const string16& message, - const std::vector<string16>& links) OVERRIDE; + virtual void SetNetworkMessage( + NetworkTrayDelegate* delegate, + MessageType message_type, + NetworkType network_type, + const base::string16& title, + const base::string16& message, + const std::vector<base::string16>& links) OVERRIDE; virtual void ClearNetworkMessage(MessageType message_type) OVERRIDE; virtual void OnWillToggleWifi() OVERRIDE; @@ -76,7 +77,7 @@ class TrayNetwork : public SystemTrayItem, // Gets the correct icon and label for |icon_type|. void GetNetworkStateHandlerImageAndLabel(network_icon::IconType icon_type, gfx::ImageSkia* image, - string16* label); + base::string16* label); private: friend class tray::NetworkMessageView; diff --git a/ash/system/chromeos/network/tray_sms.cc b/ash/system/chromeos/network/tray_sms.cc index 57d9ce6..2eabe71 100644 --- a/ash/system/chromeos/network/tray_sms.cc +++ b/ash/system/chromeos/network/tray_sms.cc @@ -16,7 +16,7 @@ #include "ash/system/tray/tray_item_view.h" #include "ash/system/tray/tray_notification_view.h" #include "base/command_line.h" -#include "base/string_number_conversions.h" +#include "base/strings/string_number_conversions.h" #include "base/utf_string_conversions.h" #include "grit/ash_resources.h" #include "grit/ash_strings.h" @@ -65,7 +65,7 @@ class TraySms::SmsDefaultView : public TrayItemMore { void Update() { int message_count = static_cast<TraySms*>(owner())->messages().GetSize(); - string16 label = l10n_util::GetStringFUTF16( + base::string16 label = l10n_util::GetStringFUTF16( IDS_ASH_STATUS_TRAY_SMS_MESSAGES, base::IntToString16(message_count)); SetLabel(label); SetAccessibleName(label); diff --git a/ash/system/chromeos/network/tray_vpn.cc b/ash/system/chromeos/network/tray_vpn.cc index 7bd3197..3ed9307 100644 --- a/ash/system/chromeos/network/tray_vpn.cc +++ b/ash/system/chromeos/network/tray_vpn.cc @@ -73,7 +73,7 @@ class VpnDefaultView : public TrayItemMore, void Update() { if (UseNewNetworkHandlers()) { gfx::ImageSkia image; - string16 label; + base::string16 label; GetNetworkStateHandlerImageAndLabel(&image, &label); SetImage(&image); SetLabel(label); @@ -95,7 +95,7 @@ class VpnDefaultView : public TrayItemMore, private: void GetNetworkStateHandlerImageAndLabel(gfx::ImageSkia* image, - string16* label) { + base::string16* label) { NetworkStateHandler* handler = NetworkStateHandler::Get(); const NetworkState* vpn = handler->FirstNetworkByType( flimflam::kTypeVPN); @@ -304,9 +304,9 @@ void TrayVPN::OnNetworkRefresh(const NetworkIconInfo& info) { void TrayVPN::SetNetworkMessage(NetworkTrayDelegate* delegate, MessageType message_type, NetworkType network_type, - const string16& title, - const string16& message, - const std::vector<string16>& links) { + const base::string16& title, + const base::string16& message, + const std::vector<base::string16>& links) { } void TrayVPN::ClearNetworkMessage(MessageType message_type) { diff --git a/ash/system/chromeos/network/tray_vpn.h b/ash/system/chromeos/network/tray_vpn.h index 446f693..052c52e 100644 --- a/ash/system/chromeos/network/tray_vpn.h +++ b/ash/system/chromeos/network/tray_vpn.h @@ -44,12 +44,13 @@ class TrayVPN : public SystemTrayItem, // NetworkObserver virtual void OnNetworkRefresh(const NetworkIconInfo& info) OVERRIDE; - virtual void SetNetworkMessage(NetworkTrayDelegate* delegate, - MessageType message_type, - NetworkType network_type, - const string16& title, - const string16& message, - const std::vector<string16>& links) OVERRIDE; + virtual void SetNetworkMessage( + NetworkTrayDelegate* delegate, + MessageType message_type, + NetworkType network_type, + const base::string16& title, + const base::string16& message, + const std::vector<base::string16>& links) OVERRIDE; virtual void ClearNetworkMessage(MessageType message_type) OVERRIDE; virtual void OnWillToggleWifi() OVERRIDE; diff --git a/ash/system/chromeos/screen_capture/screen_capture_observer.h b/ash/system/chromeos/screen_capture/screen_capture_observer.h index 2b22d64..9d1efd3 100644 --- a/ash/system/chromeos/screen_capture/screen_capture_observer.h +++ b/ash/system/chromeos/screen_capture/screen_capture_observer.h @@ -13,8 +13,9 @@ namespace ash { class ScreenCaptureObserver { public: // Called when screen capture is started. - virtual void OnScreenCaptureStart(const base::Closure& stop_callback, - const string16& screen_capture_status) = 0; + virtual void OnScreenCaptureStart( + const base::Closure& stop_callback, + const base::string16& screen_capture_status) = 0; // Called when screen capture is stopped. virtual void OnScreenCaptureStop() = 0; diff --git a/ash/system/chromeos/screen_capture/tray_screen_capture.cc b/ash/system/chromeos/screen_capture/tray_screen_capture.cc index 5c1136d..660199c 100644 --- a/ash/system/chromeos/screen_capture/tray_screen_capture.cc +++ b/ash/system/chromeos/screen_capture/tray_screen_capture.cc @@ -250,7 +250,7 @@ void TrayScreenCapture::DestroyNotificationView() { void TrayScreenCapture::OnScreenCaptureStart( const base::Closure& stop_callback, - const string16& screen_capture_status) { + const base::string16& screen_capture_status) { stop_callback_ = stop_callback; screen_capture_status_ = screen_capture_status; set_screen_capture_on(true); diff --git a/ash/system/chromeos/screen_capture/tray_screen_capture.h b/ash/system/chromeos/screen_capture/tray_screen_capture.h index cb5b91f..3fc0b2f2 100644 --- a/ash/system/chromeos/screen_capture/tray_screen_capture.h +++ b/ash/system/chromeos/screen_capture/tray_screen_capture.h @@ -30,7 +30,7 @@ class TrayScreenCapture : public SystemTrayItem, void Update(); bool screen_capture_on() const { return screen_capture_on_; } void set_screen_capture_on(bool value) { screen_capture_on_ = value; } - const string16& screen_capture_status() const { + const base::string16& screen_capture_status() const { return screen_capture_status_; } void StopScreenCapture(); @@ -48,13 +48,13 @@ class TrayScreenCapture : public SystemTrayItem, // Overridden from ScreenCaptureObserver. virtual void OnScreenCaptureStart( const base::Closure& stop_callback, - const string16& screen_capture_status) OVERRIDE; + const base::string16& screen_capture_status) OVERRIDE; virtual void OnScreenCaptureStop() OVERRIDE; tray::ScreenCaptureTrayView* tray_; tray::ScreenCaptureStatusView* default_; tray::ScreenCaptureNotificationView* notification_; - string16 screen_capture_status_; + base::string16 screen_capture_status_; bool screen_capture_on_; base::Closure stop_callback_; diff --git a/ash/system/chromeos/tray_display.cc b/ash/system/chromeos/tray_display.cc index 6a026a9..1d315bb 100644 --- a/ash/system/chromeos/tray_display.cc +++ b/ash/system/chromeos/tray_display.cc @@ -89,7 +89,7 @@ class DisplayView : public ash::internal::ActionableView { private: // Returns the name of the currently connected external display. - string16 GetExternalDisplayName() const { + base::string16 GetExternalDisplayName() const { DisplayManager* display_manager = Shell::GetInstance()->display_manager(); int64 external_id = display_manager->mirrored_display_id(); diff --git a/ash/system/date/date_view.cc b/ash/system/date/date_view.cc index 8de730c..9354cd4 100644 --- a/ash/system/date/date_view.cc +++ b/ash/system/date/date_view.cc @@ -34,16 +34,16 @@ const int kTimerSlopSeconds = 1; // Top number text color of vertical clock. const SkColor kVerticalClockHourColor = SkColorSetRGB(0xBA, 0xBA, 0xBA); -string16 FormatDate(const base::Time& time) { +base::string16 FormatDate(const base::Time& time) { icu::UnicodeString date_string; scoped_ptr<icu::DateFormat> formatter( icu::DateFormat::createDateInstance(icu::DateFormat::kMedium)); formatter->format(static_cast<UDate>(time.ToDoubleT() * 1000), date_string); - return string16(date_string.getBuffer(), + return base::string16(date_string.getBuffer(), static_cast<size_t>(date_string.length())); } -string16 FormatDayOfWeek(const base::Time& time) { +base::string16 FormatDayOfWeek(const base::Time& time) { UErrorCode status = U_ZERO_ERROR; scoped_ptr<icu::DateTimePatternGenerator> generator( icu::DateTimePatternGenerator::createInstance(status)); @@ -58,7 +58,7 @@ string16 FormatDayOfWeek(const base::Time& time) { simple_formatter.format( static_cast<UDate>(time.ToDoubleT() * 1000), date_string, status); DCHECK(U_SUCCESS(status)); - return string16( + return base::string16( date_string.getBuffer(), static_cast<size_t>(date_string.length())); } @@ -196,15 +196,15 @@ void TimeView::UpdateTextInternal(const base::Time& now) { return; } - string16 current_time = base::TimeFormatTimeOfDayWithHourClockType( + base::string16 current_time = base::TimeFormatTimeOfDayWithHourClockType( now, hour_type_, base::kDropAmPm); label_->SetText(current_time); label_->SetTooltipText(base::TimeFormatFriendlyDate(now)); // Calculate vertical clock layout labels. size_t colon_pos = current_time.find(ASCIIToUTF16(":")); - string16 hour = current_time.substr(0, colon_pos); - string16 minute = current_time.substr(colon_pos + 1); + base::string16 hour = current_time.substr(0, colon_pos); + base::string16 minute = current_time.substr(colon_pos + 1); label_hour_left_->SetText(hour.substr(0, 1)); label_hour_right_->SetText(hour.length() == 2 ? hour.substr(1,1) : ASCIIToUTF16(":")); diff --git a/ash/system/drive/tray_drive.cc b/ash/system/drive/tray_drive.cc index f1d06c7..f046453 100644 --- a/ash/system/drive/tray_drive.cc +++ b/ash/system/drive/tray_drive.cc @@ -18,7 +18,7 @@ #include "ash/system/tray/tray_item_view.h" #include "base/logging.h" #include "base/stl_util.h" -#include "base/string_number_conversions.h" +#include "base/strings/string_number_conversions.h" #include "base/utf_string_conversions.h" #include "grit/ash_resources.h" #include "grit/ash_strings.h" @@ -49,7 +49,7 @@ const int kProgressBarWidth = 100; const int kProgressBarHeight = 11; const int64 kHideDelayInMs = 1000; -string16 GetTrayLabel(const ash::DriveOperationStatusList& list) { +base::string16 GetTrayLabel(const ash::DriveOperationStatusList& list) { return l10n_util::GetStringFUTF16(IDS_ASH_STATUS_TRAY_DRIVE_SYNCING, base::IntToString16(static_cast<int>(list.size()))); } @@ -81,7 +81,7 @@ class DriveDefaultView : public TrayItemMore { void Update(const DriveOperationStatusList* list) { DCHECK(list); - string16 label = GetTrayLabel(*list); + base::string16 label = GetTrayLabel(*list); SetLabel(label); SetAccessibleName(label); } @@ -159,11 +159,9 @@ class DriveDetailedView : public TrayDetailsView, label_container_->SetLayoutManager(new views::BoxLayout( views::BoxLayout::kVertical, 0, 0, kVerticalPadding)); #if defined(OS_POSIX) - string16 file_label = - UTF8ToUTF16(file_path.BaseName().value()); + base::string16 file_label = UTF8ToUTF16(file_path.BaseName().value()); #elif defined(OS_WIN) - string16 file_label = - WideToUTF16(file_path.BaseName().value()); + base::string16 file_label = WideToUTF16(file_path.BaseName().value()); #endif views::Label* label = new views::Label(file_label); label->SetHorizontalAlignment(gfx::ALIGN_LEFT); diff --git a/ash/system/locale/tray_locale.cc b/ash/system/locale/tray_locale.cc index 0e25216..2dffe1d 100644 --- a/ash/system/locale/tray_locale.cc +++ b/ash/system/locale/tray_locale.cc @@ -36,9 +36,9 @@ class LocaleMessageView : public views::View, SetLayoutManager( new views::BoxLayout(views::BoxLayout::kVertical, 0, 0, 1)); - string16 from = l10n_util::GetDisplayNameForLocale( + base::string16 from = l10n_util::GetDisplayNameForLocale( from_locale, cur_locale, true); - string16 to = l10n_util::GetDisplayNameForLocale( + base::string16 to = l10n_util::GetDisplayNameForLocale( to_locale, cur_locale, true); views::Label* message = new views::Label( diff --git a/ash/system/logout_button/tray_logout_button.cc b/ash/system/logout_button/tray_logout_button.cc index bd15712..f7c6d1d 100644 --- a/ash/system/logout_button/tray_logout_button.cc +++ b/ash/system/logout_button/tray_logout_button.cc @@ -79,7 +79,7 @@ class LogoutButton : public views::View, set_border(views::Border::CreateEmptyBorder( 0, kTrayLabelItemHorizontalPaddingBottomAlignment, 0, 0)); - button_ = new views::LabelButton(this, string16()); + button_ = new views::LabelButton(this, base::string16()); for (size_t state = 0; state < views::Button::STATE_COUNT; ++state) { button_->SetTextColor( static_cast<views::Button::ButtonState>(state), SK_ColorWHITE); @@ -100,8 +100,8 @@ class LogoutButton : public views::View, void OnLoginStatusChanged(user::LoginStatus status) { login_status_ = status; - const string16 title = GetLocalizedSignOutStringForStatus(login_status_, - false); + const base::string16 title = GetLocalizedSignOutStringForStatus( + login_status_, false); button_->SetText(title); button_->SetAccessibleName(title); UpdateVisibility(); diff --git a/ash/system/monitor/tray_monitor.cc b/ash/system/monitor/tray_monitor.cc index e34ffb5..b785c42 100644 --- a/ash/system/monitor/tray_monitor.cc +++ b/ash/system/monitor/tray_monitor.cc @@ -63,11 +63,11 @@ void TrayMonitor::OnGotHandles(const std::list<base::ProcessHandle>& handles) { base::SystemMemoryInfoKB mem_info; base::GetSystemMemoryInfo(&mem_info); std::string output; - string16 free_bytes = + base::string16 free_bytes = ui::FormatBytes(static_cast<int64>(mem_info.free) * 1024); output = base::StringPrintf("free: %s", UTF16ToUTF8(free_bytes).c_str()); if (mem_info.gem_size != -1) { - string16 gem_size = ui::FormatBytes(mem_info.gem_size); + base::string16 gem_size = ui::FormatBytes(mem_info.gem_size); output += base::StringPrintf(" gmem: %s", UTF16ToUTF8(gem_size).c_str()); if (mem_info.gem_objects != -1) output += base::StringPrintf(" gobjects: %d", mem_info.gem_objects); @@ -82,8 +82,8 @@ void TrayMonitor::OnGotHandles(const std::list<base::ProcessHandle>& handles) { total_shared_bytes += shared_bytes; delete pm; } - string16 private_size = ui::FormatBytes(total_private_bytes); - string16 shared_size = ui::FormatBytes(total_shared_bytes); + base::string16 private_size = ui::FormatBytes(total_private_bytes); + base::string16 shared_size = ui::FormatBytes(total_shared_bytes); output += base::StringPrintf("\nGPU private: %s shared: %s", UTF16ToUTF8(private_size).c_str(), diff --git a/ash/system/power/power_status_view.cc b/ash/system/power/power_status_view.cc index a268d3a..4cba587 100644 --- a/ash/system/power/power_status_view.cc +++ b/ash/system/power/power_status_view.cc @@ -10,7 +10,7 @@ #include "ash/system/tray/fixed_sized_image_view.h" #include "ash/system/tray/tray_constants.h" #include "ash/system/tray/tray_views.h" -#include "base/string_number_conversions.h" +#include "base/strings/string_number_conversions.h" #include "base/utf_string_conversions.h" #include "grit/ash_strings.h" #include "ui/base/l10n/l10n_util.h" @@ -112,8 +112,8 @@ void PowerStatusView::UpdateText() { void PowerStatusView::UpdateTextForDefaultView() { ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); - string16 battery_percentage = string16(); - string16 battery_time_status = string16(); + base::string16 battery_percentage = base::string16(); + base::string16 battery_time_status = base::string16(); if (supply_status_.line_power_on && supply_status_.battery_is_full) { battery_time_status = rb.GetLocalizedString(IDS_ASH_STATUS_TRAY_BATTERY_FULL); @@ -128,12 +128,12 @@ void PowerStatusView::UpdateTextForDefaultView() { battery_percentage = l10n_util::GetStringFUTF16( IDS_ASH_STATUS_TRAY_BATTERY_PERCENT_ONLY, base::IntToString16(GetRoundedBatteryPercentage())); - string16 battery_percentage_accessbile = l10n_util::GetStringFUTF16( + base::string16 battery_percentage_accessbile = l10n_util::GetStringFUTF16( supply_status_.line_power_on ? IDS_ASH_STATUS_TRAY_BATTERY_PERCENT_CHARGING_ACCESSIBLE: IDS_ASH_STATUS_TRAY_BATTERY_PERCENT_ACCESSIBLE , base::IntToString16(GetRoundedBatteryPercentage())); - string16 battery_time_accessible = string16(); + base::string16 battery_time_accessible = base::string16(); int hour = 0; int min = 0; if (supply_status_.is_calculating_battery_time) { @@ -149,7 +149,7 @@ void PowerStatusView::UpdateTextForDefaultView() { hour = time.InHours(); min = (time - base::TimeDelta::FromHours(hour)).InMinutes(); if (hour || min) { - string16 minute = min < 10 ? + base::string16 minute = min < 10 ? ASCIIToUTF16("0") + base::IntToString16(min) : base::IntToString16(min); battery_time_status = @@ -229,11 +229,11 @@ void PowerStatusView::UpdateTextForNotificationView() { time_label_->SetText(delegate->GetTimeRemainingString( base::TimeDelta::FromMinutes(min))); } else { - time_label_->SetText(string16()); + time_label_->SetText(base::string16()); } } } else { - time_label_->SetText(string16()); + time_label_->SetText(base::string16()); } } @@ -243,7 +243,7 @@ int PowerStatusView::GetRoundedBatteryPercentage() const { static_cast<int>(supply_status_.battery_percentage)); } -string16 PowerStatusView::GetBatteryTimeAccessibilityString( +base::string16 PowerStatusView::GetBatteryTimeAccessibilityString( int hour, int min) { DCHECK(hour || min); if (hour && !min) { diff --git a/ash/system/power/power_status_view.h b/ash/system/power/power_status_view.h index f394b06..d7a49c4 100644 --- a/ash/system/power/power_status_view.h +++ b/ash/system/power/power_status_view.h @@ -27,7 +27,7 @@ class PowerStatusView : public views::View { virtual ~PowerStatusView() {} void UpdatePowerStatus(const PowerSupplyStatus& status); - const string16& accessible_name() const { return accessible_name_; } + const base::string16& accessible_name() const { return accessible_name_; } // Overridden from views::View. virtual gfx::Size GetPreferredSize() OVERRIDE; @@ -42,7 +42,7 @@ class PowerStatusView : public views::View { void UpdateTextForDefaultView(); void UpdateTextForNotificationView(); int GetRoundedBatteryPercentage() const; - string16 GetBatteryTimeAccessibilityString(int hour, int min); + base::string16 GetBatteryTimeAccessibilityString(int hour, int min); // Overridden from views::View. virtual void ChildPreferredSizeChanged(views::View* child) OVERRIDE; @@ -69,7 +69,7 @@ class PowerStatusView : public views::View { PowerSupplyStatus supply_status_; - string16 accessible_name_; + base::string16 accessible_name_; DISALLOW_COPY_AND_ASSIGN(PowerStatusView); }; diff --git a/ash/system/power/tray_power.cc b/ash/system/power/tray_power.cc index 024ccef..f8bd0cd 100644 --- a/ash/system/power/tray_power.cc +++ b/ash/system/power/tray_power.cc @@ -15,8 +15,8 @@ #include "ash/system/tray/tray_notification_view.h" #include "ash/system/tray/tray_views.h" #include "base/command_line.h" -#include "base/string_number_conversions.h" #include "base/stringprintf.h" +#include "base/strings/string_number_conversions.h" #include "base/utf_string_conversions.h" #include "grit/ash_resources.h" #include "grit/ash_strings.h" diff --git a/ash/system/session_length_limit/tray_session_length_limit.cc b/ash/system/session_length_limit/tray_session_length_limit.cc index 4982658..19e9be8 100644 --- a/ash/system/session_length_limit/tray_session_length_limit.cc +++ b/ash/system/session_length_limit/tray_session_length_limit.cc @@ -17,7 +17,7 @@ #include "base/location.h" #include "base/logging.h" #include "base/string16.h" -#include "base/string_number_conversions.h" +#include "base/strings/string_number_conversions.h" #include "base/utf_string_conversions.h" #include "grit/ash_resources.h" #include "grit/ash_strings.h" @@ -54,7 +54,7 @@ views::Label* CreateAndSetupLabel() { return label; } -string16 IntToTwoDigitString(int value) { +base::string16 IntToTwoDigitString(int value) { DCHECK_GE(value, 0); DCHECK_LE(value, 99); if (value < 10) @@ -62,7 +62,7 @@ string16 IntToTwoDigitString(int value) { return base::IntToString16(value); } -string16 FormatRemainingSessionTimeNotification( +base::string16 FormatRemainingSessionTimeNotification( const base::TimeDelta& remaining_session_time) { return l10n_util::GetStringFUTF16( IDS_ASH_STATUS_TRAY_REMAINING_SESSION_TIME_NOTIFICATION, @@ -234,9 +234,9 @@ void RemainingSessionTimeTrayView::Update() { const int hours = minutes / 60; minutes %= 60; - const string16 hours_str = IntToTwoDigitString(hours); - const string16 minutes_str = IntToTwoDigitString(minutes); - const string16 seconds_str = IntToTwoDigitString(seconds); + const base::string16 hours_str = IntToTwoDigitString(hours); + const base::string16 minutes_str = IntToTwoDigitString(minutes); + const base::string16 seconds_str = IntToTwoDigitString(seconds); const SkColor color = limit_state == TraySessionLengthLimit::LIMIT_EXPIRING_SOON ? kRemainingTimeExpiringSoonColor : kRemainingTimeColor; diff --git a/ash/system/settings/tray_settings.cc b/ash/system/settings/tray_settings.cc index 2580f24..a142ae0 100644 --- a/ash/system/settings/tray_settings.cc +++ b/ash/system/settings/tray_settings.cc @@ -50,7 +50,7 @@ class SettingsDefaultView : public ActionableView { rb.GetImageNamed(IDR_AURA_UBER_TRAY_SETTINGS).ToImageSkia()); AddChildView(icon); - string16 text = rb.GetLocalizedString(IDS_ASH_STATUS_TRAY_SETTINGS); + base::string16 text = rb.GetLocalizedString(IDS_ASH_STATUS_TRAY_SETTINGS); label_ = new views::Label(text); AddChildView(label_); SetAccessibleName(text); @@ -74,7 +74,7 @@ class SettingsDefaultView : public ActionableView { if (!power_status_view_) return; power_status_view_->UpdatePowerStatus(status); - string16 accessible_name = label_ ? + base::string16 accessible_name = label_ ? label_->text() + ASCIIToUTF16(", ") + power_status_view_->accessible_name() : power_status_view_->accessible_name(); diff --git a/ash/system/tray/actionable_view.cc b/ash/system/tray/actionable_view.cc index b879881..2fbd09c 100644 --- a/ash/system/tray/actionable_view.cc +++ b/ash/system/tray/actionable_view.cc @@ -48,7 +48,7 @@ void ActionableView::OnMouseCaptureLost() { has_capture_ = false; } -void ActionableView::SetAccessibleName(const string16& name) { +void ActionableView::SetAccessibleName(const base::string16& name) { accessible_name_ = name; } diff --git a/ash/system/tray/actionable_view.h b/ash/system/tray/actionable_view.h index 74f516c..1ffbfe8 100644 --- a/ash/system/tray/actionable_view.h +++ b/ash/system/tray/actionable_view.h @@ -25,8 +25,8 @@ class ASH_EXPORT ActionableView : public views::View { virtual ~ActionableView(); - void SetAccessibleName(const string16& name); - const string16& accessible_name() const { return accessible_name_; } + void SetAccessibleName(const base::string16& name); + const base::string16& accessible_name() const { return accessible_name_; } protected: void DrawBorder(gfx::Canvas* canvas, const gfx::Rect& bounds); @@ -48,7 +48,7 @@ class ASH_EXPORT ActionableView : public views::View { virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE; private: - string16 accessible_name_; + base::string16 accessible_name_; bool has_capture_; DISALLOW_COPY_AND_ASSIGN(ActionableView); diff --git a/ash/system/tray/hover_highlight_view.cc b/ash/system/tray/hover_highlight_view.cc index e826ef6..278ad66 100644 --- a/ash/system/tray/hover_highlight_view.cc +++ b/ash/system/tray/hover_highlight_view.cc @@ -42,7 +42,7 @@ HoverHighlightView::~HoverHighlightView() { } void HoverHighlightView::AddIconAndLabel(const gfx::ImageSkia& image, - const string16& text, + const base::string16& text, gfx::Font::FontStyle style) { SetLayoutManager(new views::BoxLayout( views::BoxLayout::kHorizontal, 0, 3, kTrayPopupPaddingBetweenItems)); @@ -61,7 +61,7 @@ void HoverHighlightView::AddIconAndLabel(const gfx::ImageSkia& image, SetAccessibleName(text); } -views::Label* HoverHighlightView::AddLabel(const string16& text, +views::Label* HoverHighlightView::AddLabel(const base::string16& text, gfx::Font::FontStyle style) { SetLayoutManager(new views::FillLayout()); text_label_ = new views::Label(text); @@ -87,7 +87,7 @@ views::Label* HoverHighlightView::AddLabel(const string16& text, return text_label_; } -views::Label* HoverHighlightView::AddCheckableLabel(const string16& text, +views::Label* HoverHighlightView::AddCheckableLabel(const base::string16& text, gfx::Font::FontStyle style, bool checked) { if (checked) { diff --git a/ash/system/tray/hover_highlight_view.h b/ash/system/tray/hover_highlight_view.h index 75a63d5..982ccd8 100644 --- a/ash/system/tray/hover_highlight_view.h +++ b/ash/system/tray/hover_highlight_view.h @@ -30,18 +30,19 @@ class HoverHighlightView : public ActionableView { // Convenience function for adding an icon and a label. This also sets the // accessible name. void AddIconAndLabel(const gfx::ImageSkia& image, - const string16& text, + const base::string16& text, gfx::Font::FontStyle style); // Convenience function for adding a label with padding on the left for a // blank icon. This also sets the accessible name. // Returns label after parenting it. - views::Label* AddLabel(const string16& text, gfx::Font::FontStyle style); + views::Label* AddLabel(const base::string16& text, + gfx::Font::FontStyle style); // Convenience function for adding an optional check and a label. In the // absence of a check, padding is added to align with checked items. // Returns label after parenting it. - views::Label* AddCheckableLabel(const string16& text, + views::Label* AddCheckableLabel(const base::string16& text, gfx::Font::FontStyle style, bool checked); diff --git a/ash/system/tray/system_tray.cc b/ash/system/tray/system_tray.cc index e64ec2e66..cfe3730 100644 --- a/ash/system/tray/system_tray.cc +++ b/ash/system/tray/system_tray.cc @@ -493,7 +493,7 @@ void SystemTray::AnchorUpdated() { } } -string16 SystemTray::GetAccessibleNameForTray() { +base::string16 SystemTray::GetAccessibleNameForTray() { return l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_ACCESSIBLE_NAME); } @@ -532,7 +532,7 @@ void SystemTray::OnMouseExitedView() { system_bubble_->bubble()->RestartAutoCloseTimer(); } -string16 SystemTray::GetAccessibleNameForBubble() { +base::string16 SystemTray::GetAccessibleNameForBubble() { return GetAccessibleNameForTray(); } diff --git a/ash/system/tray/system_tray.h b/ash/system/tray/system_tray.h index 0988524..698e406 100644 --- a/ash/system/tray/system_tray.h +++ b/ash/system/tray/system_tray.h @@ -136,7 +136,7 @@ class ASH_EXPORT SystemTray : public internal::TrayBackgroundView, // Overridden from TrayBackgroundView. virtual void SetShelfAlignment(ShelfAlignment alignment) OVERRIDE; virtual void AnchorUpdated() OVERRIDE; - virtual string16 GetAccessibleNameForTray() OVERRIDE; + virtual base::string16 GetAccessibleNameForTray() OVERRIDE; virtual void HideBubbleWithView( const views::TrayBubbleView* bubble_view) OVERRIDE; virtual bool ClickedOutsideBubble() OVERRIDE; @@ -145,7 +145,7 @@ class ASH_EXPORT SystemTray : public internal::TrayBackgroundView, virtual void BubbleViewDestroyed() OVERRIDE; virtual void OnMouseEnteredView() OVERRIDE; virtual void OnMouseExitedView() OVERRIDE; - virtual string16 GetAccessibleNameForBubble() OVERRIDE; + virtual base::string16 GetAccessibleNameForBubble() OVERRIDE; virtual gfx::Rect GetAnchorRect(views::Widget* anchor_widget, AnchorType anchor_type, AnchorAlignment anchor_alignment) OVERRIDE; diff --git a/ash/system/tray/system_tray_delegate.h b/ash/system/tray/system_tray_delegate.h index 8ffa8ec..ba6a24f 100644 --- a/ash/system/tray/system_tray_delegate.h +++ b/ash/system/tray/system_tray_delegate.h @@ -34,8 +34,8 @@ struct ASH_EXPORT NetworkIconInfo { bool connected; bool tray_icon_visible; gfx::ImageSkia image; - string16 name; - string16 description; + base::string16 name; + base::string16 description; std::string service_path; bool is_cellular; }; @@ -45,7 +45,7 @@ struct ASH_EXPORT BluetoothDeviceInfo { ~BluetoothDeviceInfo(); std::string address; - string16 display_name; + base::string16 display_name; bool connected; bool paired; }; @@ -89,7 +89,7 @@ struct ASH_EXPORT IMEPropertyInfo { bool selected; std::string key; - string16 name; + base::string16 name; }; typedef std::vector<IMEPropertyInfo> IMEPropertyInfoList; @@ -101,9 +101,9 @@ struct ASH_EXPORT IMEInfo { bool selected; bool third_party; std::string id; - string16 name; - string16 medium_name; - string16 short_name; + base::string16 name; + base::string16 medium_name; + base::string16 short_name; }; typedef std::vector<IMEInfo> IMEInfoList; @@ -124,7 +124,7 @@ class SystemTrayDelegate { virtual bool GetTrayVisibilityOnStartup() = 0; // Gets information about the logged in user. - virtual const string16 GetUserDisplayName() const = 0; + virtual const base::string16 GetUserDisplayName() const = 0; virtual const std::string GetUserEmail() const = 0; virtual const gfx::ImageSkia& GetUserImage() const = 0; virtual user::LoginStatus GetUserLoginStatus() const = 0; @@ -137,7 +137,7 @@ class SystemTrayDelegate { virtual const std::string GetEnterpriseDomain() const = 0; // Returns notification for enterprise enrolled devices. - virtual const string16 GetEnterpriseMessage() const = 0; + virtual const base::string16 GetEnterpriseMessage() const = 0; // Returns whether a system upgrade is available. virtual bool SystemShouldUpgrade() const = 0; @@ -345,7 +345,8 @@ class SystemTrayDelegate { // Returns the duration formatted as a localized string. // TODO(stevenjb): Move TimeFormat from src/chrome to src/ui so that it can be // accessed without going through the delegate. crbug.com/222697 - virtual string16 FormatTimeDuration(const base::TimeDelta& delta) const = 0; + virtual base::string16 FormatTimeDuration( + const base::TimeDelta& delta) const = 0; // Speaks the given text if spoken feedback is enabled. virtual void MaybeSpeak(const std::string& utterance) const = 0; diff --git a/ash/system/tray/system_tray_notifier.cc b/ash/system/tray/system_tray_notifier.cc index 070f8f3..ae653a2 100644 --- a/ash/system/tray/system_tray_notifier.cc +++ b/ash/system/tray/system_tray_notifier.cc @@ -317,9 +317,9 @@ void SystemTrayNotifier::NotifySetNetworkMessage( NetworkTrayDelegate* delegate, NetworkObserver::MessageType message_type, NetworkObserver::NetworkType network_type, - const string16& title, - const string16& message, - const std::vector<string16>& links) { + const base::string16& title, + const base::string16& message, + const std::vector<base::string16>& links) { FOR_EACH_OBSERVER(NetworkObserver, network_observers_, SetNetworkMessage( @@ -362,7 +362,7 @@ void SystemTrayNotifier::NotifyEnterpriseDomainChanged() { void SystemTrayNotifier::NotifyScreenCaptureStart( const base::Closure& stop_callback, - const string16& sharing_app_name) { + const base::string16& sharing_app_name) { FOR_EACH_OBSERVER(ScreenCaptureObserver, screen_capture_observers_, OnScreenCaptureStart(stop_callback, sharing_app_name)); } diff --git a/ash/system/tray/system_tray_notifier.h b/ash/system/tray/system_tray_notifier.h index efc0251..58939eb7 100644 --- a/ash/system/tray/system_tray_notifier.h +++ b/ash/system/tray/system_tray_notifier.h @@ -128,16 +128,16 @@ public: void NotifySetNetworkMessage(NetworkTrayDelegate* delegate, NetworkObserver::MessageType message_type, NetworkObserver::NetworkType network_type, - const string16& title, - const string16& message, - const std::vector<string16>& links); + const base::string16& title, + const base::string16& message, + const std::vector<base::string16>& links); void NotifyClearNetworkMessage(NetworkObserver::MessageType message_type); void NotifyVpnRefreshNetwork(const NetworkIconInfo &info); void NotifyWillToggleWifi(); void NotifyAddSmsMessage(const base::DictionaryValue& message); void NotifyEnterpriseDomainChanged(); void NotifyScreenCaptureStart(const base::Closure& stop_callback, - const string16& sharing_app_name); + const base::string16& sharing_app_name); void NotifyScreenCaptureStop(); #endif diff --git a/ash/system/tray/test_system_tray_delegate.cc b/ash/system/tray/test_system_tray_delegate.cc index beef4344..54dd036 100644 --- a/ash/system/tray/test_system_tray_delegate.cc +++ b/ash/system/tray/test_system_tray_delegate.cc @@ -75,7 +75,7 @@ bool TestSystemTrayDelegate::GetTrayVisibilityOnStartup() { } // Overridden from SystemTrayDelegate: -const string16 TestSystemTrayDelegate::GetUserDisplayName() const { +const base::string16 TestSystemTrayDelegate::GetUserDisplayName() const { return UTF8ToUTF16("Über tray Über tray Über tray Über tray"); } @@ -110,7 +110,7 @@ const std::string TestSystemTrayDelegate::GetEnterpriseDomain() const { return std::string(); } -const string16 TestSystemTrayDelegate::GetEnterpriseMessage() const { +const base::string16 TestSystemTrayDelegate::GetEnterpriseMessage() const { return string16(); } @@ -351,9 +351,9 @@ int TestSystemTrayDelegate::GetSystemTrayMenuWidth() { return 300; } -string16 TestSystemTrayDelegate::FormatTimeDuration( +base::string16 TestSystemTrayDelegate::FormatTimeDuration( const base::TimeDelta& delta) const { - return string16(); + return base::string16(); } void TestSystemTrayDelegate::MaybeSpeak(const std::string& utterance) const { diff --git a/ash/system/tray/test_system_tray_delegate.h b/ash/system/tray/test_system_tray_delegate.h index 8fd5405..80f9fce 100644 --- a/ash/system/tray/test_system_tray_delegate.h +++ b/ash/system/tray/test_system_tray_delegate.h @@ -26,14 +26,14 @@ class TestSystemTrayDelegate : public SystemTrayDelegate { virtual bool GetTrayVisibilityOnStartup() OVERRIDE; // Overridden from SystemTrayDelegate: - virtual const string16 GetUserDisplayName() const OVERRIDE; + virtual const base::string16 GetUserDisplayName() const OVERRIDE; virtual const std::string GetUserEmail() const OVERRIDE; virtual const gfx::ImageSkia& GetUserImage() const OVERRIDE; virtual user::LoginStatus GetUserLoginStatus() const OVERRIDE; virtual bool IsOobeCompleted() const OVERRIDE; virtual void ChangeProfilePicture() OVERRIDE; virtual const std::string GetEnterpriseDomain() const OVERRIDE; - virtual const string16 GetEnterpriseMessage() const OVERRIDE; + virtual const base::string16 GetEnterpriseMessage() const OVERRIDE; virtual bool SystemShouldUpgrade() const OVERRIDE; virtual base::HourClockType GetHourClockType() const OVERRIDE; virtual PowerSupplyStatus GetPowerSupplyStatus() const OVERRIDE; @@ -108,7 +108,7 @@ class TestSystemTrayDelegate : public SystemTrayDelegate { virtual bool GetSessionLengthLimit( base::TimeDelta* session_length_limit) OVERRIDE; virtual int GetSystemTrayMenuWidth() OVERRIDE; - virtual string16 FormatTimeDuration( + virtual base::string16 FormatTimeDuration( const base::TimeDelta& delta) const OVERRIDE; virtual void MaybeSpeak(const std::string& utterance) const OVERRIDE; diff --git a/ash/system/tray/throbber_view.cc b/ash/system/tray/throbber_view.cc index 89d4ed4..2c2cc20 100644 --- a/ash/system/tray/throbber_view.cc +++ b/ash/system/tray/throbber_view.cc @@ -30,12 +30,12 @@ SystemTrayThrobber::SystemTrayThrobber(int frame_delay_ms) SystemTrayThrobber::~SystemTrayThrobber() { } -void SystemTrayThrobber::SetTooltipText(const string16& tooltip_text) { +void SystemTrayThrobber::SetTooltipText(const base::string16& tooltip_text) { tooltip_text_ = tooltip_text; } bool SystemTrayThrobber::GetTooltipText(const gfx::Point& p, - string16* tooltip) const { + base::string16* tooltip) const { if (tooltip_text_.empty()) return false; @@ -72,7 +72,7 @@ void ThrobberView::Layout() { } bool ThrobberView::GetTooltipText(const gfx::Point& p, - string16* tooltip) const { + base::string16* tooltip) const { if (tooltip_text_.empty()) return false; @@ -90,7 +90,7 @@ void ThrobberView::Stop() { throbber_->Stop(); } -void ThrobberView::SetTooltipText(const string16& tooltip_text) { +void ThrobberView::SetTooltipText(const base::string16& tooltip_text) { tooltip_text_ = tooltip_text; throbber_->SetTooltipText(tooltip_text); } diff --git a/ash/system/tray/throbber_view.h b/ash/system/tray/throbber_view.h index 4297df4..0f26632 100644 --- a/ash/system/tray/throbber_view.h +++ b/ash/system/tray/throbber_view.h @@ -18,15 +18,15 @@ class SystemTrayThrobber : public views::SmoothedThrobber { SystemTrayThrobber(int frame_delay_ms); virtual ~SystemTrayThrobber(); - void SetTooltipText(const string16& tooltip_text); + void SetTooltipText(const base::string16& tooltip_text); // Overriden from views::View. virtual bool GetTooltipText( - const gfx::Point& p, string16* tooltip) const OVERRIDE; + const gfx::Point& p, base::string16* tooltip) const OVERRIDE; private: // The current tooltip text. - string16 tooltip_text_; + base::string16 tooltip_text_; DISALLOW_COPY_AND_ASSIGN(SystemTrayThrobber); }; @@ -39,13 +39,13 @@ class ThrobberView : public views::View { void Start(); void Stop(); - void SetTooltipText(const string16& tooltip_text); + void SetTooltipText(const base::string16& tooltip_text); // Overriden from views::View. virtual gfx::Size GetPreferredSize() OVERRIDE; virtual void Layout() OVERRIDE; virtual bool GetTooltipText( - const gfx::Point& p, string16* tooltip) const OVERRIDE; + const gfx::Point& p, base::string16* tooltip) const OVERRIDE; private: // Schedules animation for starting/stopping throbber. @@ -54,7 +54,7 @@ class ThrobberView : public views::View { SystemTrayThrobber* throbber_; // The current tooltip text. - string16 tooltip_text_; + base::string16 tooltip_text_; DISALLOW_COPY_AND_ASSIGN(ThrobberView); }; diff --git a/ash/system/tray/tray_background_view.h b/ash/system/tray/tray_background_view.h index 39f2a4c..d2bb706a 100644 --- a/ash/system/tray/tray_background_view.h +++ b/ash/system/tray/tray_background_view.h @@ -84,7 +84,7 @@ class ASH_EXPORT TrayBackgroundView : public ActionableView, virtual void AnchorUpdated() {} // Called from GetAccessibleState, must return a valid accessible name. - virtual string16 GetAccessibleNameForTray() = 0; + virtual base::string16 GetAccessibleNameForTray() = 0; // Hides the bubble associated with |bubble_view|. Called when the widget // is closed. diff --git a/ash/system/tray/tray_bar_button_with_title.cc b/ash/system/tray/tray_bar_button_with_title.cc index d8b6895..0fd94d84 100644 --- a/ash/system/tray/tray_bar_button_with_title.cc +++ b/ash/system/tray/tray_bar_button_with_title.cc @@ -71,7 +71,7 @@ TrayBarButtonWithTitle::TrayBarButtonWithTitle(views::ButtonListener* listener, if (title_id != -1) { title_ = new views::Label; ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); - string16 text = rb.GetLocalizedString(title_id); + base::string16 text = rb.GetLocalizedString(title_id); title_->SetText(text); AddChildView(title_); } diff --git a/ash/system/tray/tray_item_more.cc b/ash/system/tray/tray_item_more.cc index f13b2f1..7ccb007 100644 --- a/ash/system/tray/tray_item_more.cc +++ b/ash/system/tray/tray_item_more.cc @@ -47,7 +47,7 @@ TrayItemMore::TrayItemMore(SystemTrayItem* owner, bool show_more) TrayItemMore::~TrayItemMore() { } -void TrayItemMore::SetLabel(const string16& label) { +void TrayItemMore::SetLabel(const base::string16& label) { label_->SetText(label); Layout(); SchedulePaint(); @@ -58,7 +58,7 @@ void TrayItemMore::SetImage(const gfx::ImageSkia* image_skia) { SchedulePaint(); } -void TrayItemMore::SetAccessibleName(const string16& name) { +void TrayItemMore::SetAccessibleName(const base::string16& name) { accessible_name_ = name; } diff --git a/ash/system/tray/tray_item_more.h b/ash/system/tray/tray_item_more.h index 85839ad..4928724 100644 --- a/ash/system/tray/tray_item_more.h +++ b/ash/system/tray/tray_item_more.h @@ -29,9 +29,9 @@ class TrayItemMore : public ActionableView { SystemTrayItem* owner() const { return owner_; } - void SetLabel(const string16& label); + void SetLabel(const base::string16& label); void SetImage(const gfx::ImageSkia* image_skia); - void SetAccessibleName(const string16& name); + void SetAccessibleName(const base::string16& name); protected: // Replaces the default icon (on the left of the label), and allows a custom @@ -53,7 +53,7 @@ class TrayItemMore : public ActionableView { views::ImageView* icon_; views::Label* label_; views::ImageView* more_; - string16 accessible_name_; + base::string16 accessible_name_; DISALLOW_COPY_AND_ASSIGN(TrayItemMore); }; diff --git a/ash/system/tray/tray_popup_label_button.cc b/ash/system/tray/tray_popup_label_button.cc index 7222310..c8e7a6a 100644 --- a/ash/system/tray/tray_popup_label_button.cc +++ b/ash/system/tray/tray_popup_label_button.cc @@ -13,7 +13,7 @@ namespace ash { namespace internal { TrayPopupLabelButton::TrayPopupLabelButton(views::ButtonListener* listener, - const string16& text) + const base::string16& text) : views::LabelButton(listener, text) { set_border(new TrayPopupLabelButtonBorder); set_focusable(true); diff --git a/ash/system/tray/tray_popup_label_button.h b/ash/system/tray/tray_popup_label_button.h index 8f421ad..9f4d262 100644 --- a/ash/system/tray/tray_popup_label_button.h +++ b/ash/system/tray/tray_popup_label_button.h @@ -16,7 +16,8 @@ namespace internal { // A label button with custom alignment, border and focus border. class TrayPopupLabelButton : public views::LabelButton { public: - TrayPopupLabelButton(views::ButtonListener* listener, const string16& text); + TrayPopupLabelButton(views::ButtonListener* listener, + const base::string16& text); virtual ~TrayPopupLabelButton(); private: diff --git a/ash/system/tray_accessibility.cc b/ash/system/tray_accessibility.cc index 60a6251..44fdc8e 100644 --- a/ash/system/tray_accessibility.cc +++ b/ash/system/tray_accessibility.cc @@ -65,7 +65,7 @@ class DefaultAccessibilityView : public TrayItemMore { ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance(); SetImage(bundle.GetImageNamed(IDR_AURA_UBER_TRAY_ACCESSIBILITY_DARK). ToImageSkia()); - string16 label = bundle.GetLocalizedString( + base::string16 label = bundle.GetLocalizedString( IDS_ASH_STATUS_TRAY_ACCESSIBILITY); SetLabel(label); SetAccessibleName(label); @@ -179,7 +179,7 @@ void AccessibilityDetailedView::AppendHelpEntries() { } HoverHighlightView* AccessibilityDetailedView::AddScrollListItem( - const string16& text, + const base::string16& text, gfx::Font::FontStyle style, bool checked) { HoverHighlightView* container = new HoverHighlightView(this); diff --git a/ash/system/tray_accessibility.h b/ash/system/tray_accessibility.h index 629cf51..cd2d729 100644 --- a/ash/system/tray_accessibility.h +++ b/ash/system/tray_accessibility.h @@ -61,7 +61,7 @@ class AccessibilityDetailedView : public TrayDetailsView, // Add help entries. void AppendHelpEntries(); - HoverHighlightView* AddScrollListItem(const string16& text, + HoverHighlightView* AddScrollListItem(const base::string16& text, gfx::Font::FontStyle style, bool checked); // Overridden from ViewClickListener. diff --git a/ash/system/user/login_status.cc b/ash/system/user/login_status.cc index fc02e38..77fc04a 100644 --- a/ash/system/user/login_status.cc +++ b/ash/system/user/login_status.cc @@ -12,8 +12,8 @@ namespace ash { namespace user { -string16 GetLocalizedSignOutStringForStatus(LoginStatus status, - bool multiline) { +base::string16 GetLocalizedSignOutStringForStatus(LoginStatus status, + bool multiline) { int message_id; switch (status) { case LOGGED_IN_GUEST: @@ -29,13 +29,13 @@ string16 GetLocalizedSignOutStringForStatus(LoginStatus status, message_id = IDS_ASH_STATUS_TRAY_SIGN_OUT; break; } - string16 message = + base::string16 message = ui::ResourceBundle::GetSharedInstance().GetLocalizedString(message_id); // Desirable line breaking points are marked using \n. As the resource // framework does not evaluate escape sequences, the \n need to be explicitly // handled. Depending on the value of |multiline|, actual line breaks or // spaces are substituted. - string16 newline = multiline ? ASCIIToUTF16("\n") : ASCIIToUTF16(" "); + base::string16 newline = multiline ? ASCIIToUTF16("\n") : ASCIIToUTF16(" "); ReplaceSubstringsAfterOffset(&message, 0, ASCIIToUTF16("\\n"), newline); return message; } diff --git a/ash/system/user/login_status.h b/ash/system/user/login_status.h index c1e54f8..71a678c 100644 --- a/ash/system/user/login_status.h +++ b/ash/system/user/login_status.h @@ -22,7 +22,8 @@ enum LoginStatus { LOGGED_IN_NONE, // Not logged in. }; -string16 GetLocalizedSignOutStringForStatus(LoginStatus status, bool multiline); +base::string16 GetLocalizedSignOutStringForStatus(LoginStatus status, + bool multiline); } // namespace user } // namespace ash diff --git a/ash/system/user/tray_user.cc b/ash/system/user/tray_user.cc index 084ed06..03e8457 100644 --- a/ash/system/user/tray_user.cc +++ b/ash/system/user/tray_user.cc @@ -154,7 +154,7 @@ class PublicAccountUserDetails : public views::View, // if possible. void CalculatePreferredSize(SystemTrayItem* owner, int used_width); - string16 text_; + base::string16 text_; views::Link* learn_more_; gfx::Size preferred_size_; ScopedVector<gfx::RenderText> lines_; @@ -252,11 +252,11 @@ PublicAccountUserDetails::PublicAccountUserDetails(SystemTrayItem* owner, ash::SystemTrayDelegate* delegate = ash::Shell::GetInstance()->system_tray_delegate(); // Retrieve the user's display name and wrap it with markers. - string16 display_name = delegate->GetUserDisplayName(); + base::string16 display_name = delegate->GetUserDisplayName(); RemoveChars(display_name, kDisplayNameMark, &display_name); display_name = kDisplayNameMark[0] + display_name + kDisplayNameMark[0]; // Retrieve the domain managing the device and wrap it with markers. - string16 domain = UTF8ToUTF16(delegate->GetEnterpriseDomain()); + base::string16 domain = UTF8ToUTF16(delegate->GetEnterpriseDomain()); RemoveChars(domain, kDisplayNameMark, &domain); base::i18n::WrapStringWithLTRFormatting(&domain); // Retrieve the label text, inserting the display name and domain. @@ -281,13 +281,13 @@ void PublicAccountUserDetails::Layout() { // Word-wrap the label text. const gfx::Font font; - std::vector<string16> lines; + std::vector<base::string16> lines; ui::ElideRectangleText(text_, font, contents_area.width(), contents_area.height(), ui::ELIDE_LONG_WORDS, &lines); // Loop through the lines, creating a renderer for each. gfx::Point position = contents_area.origin(); ui::Range display_name(ui::Range::InvalidRange()); - for (std::vector<string16>::const_iterator it = lines.begin(); + for (std::vector<base::string16>::const_iterator it = lines.begin(); it != lines.end(); ++it) { gfx::RenderText* line = gfx::RenderText::CreateInstance(); line->SetDirectionalityMode(gfx::DIRECTIONALITY_FROM_UI); @@ -376,7 +376,7 @@ void PublicAccountUserDetails::CalculatePreferredSize(SystemTrayItem* owner, // width and the width of the link (as no wrapping is permitted inside the // link). The upper bound is the maximum of the largest allowed bubble width // and the sum of the label text and link widths when put on a single line. - std::vector<string16> lines; + std::vector<base::string16> lines; while (min_width < max_width) { lines.clear(); const int width = (min_width + max_width) / 2; @@ -479,8 +479,8 @@ void UserView::AddLogoutButton(ash::user::LoginStatus login) { if (login == ash::user::LOGGED_IN_LOCKED) return; - const string16 title = ash::user::GetLocalizedSignOutStringForStatus(login, - true); + const base::string16 title = ash::user::GetLocalizedSignOutStringForStatus( + login, true); TrayPopupLabelButton* logout_button = new TrayPopupLabelButton(this, title); logout_button->SetAccessibleName(title); logout_button_ = logout_button; diff --git a/ash/system/web_notification/web_notification_tray.cc b/ash/system/web_notification/web_notification_tray.cc index d410dbe..ed479d3 100644 --- a/ash/system/web_notification/web_notification_tray.cc +++ b/ash/system/web_notification/web_notification_tray.cc @@ -313,7 +313,7 @@ void WebNotificationTray::AnchorUpdated() { } } -string16 WebNotificationTray::GetAccessibleNameForTray() { +base::string16 WebNotificationTray::GetAccessibleNameForTray() { return l10n_util::GetStringUTF16( IDS_MESSAGE_CENTER_ACCESSIBLE_NAME); } @@ -359,7 +359,7 @@ void WebNotificationTray::OnMouseExitedView() { popup_bubble()->bubble()->OnMouseExitedView(); } -string16 WebNotificationTray::GetAccessibleNameForBubble() { +base::string16 WebNotificationTray::GetAccessibleNameForBubble() { return GetAccessibleNameForTray(); } diff --git a/ash/system/web_notification/web_notification_tray.h b/ash/system/web_notification/web_notification_tray.h index ed3e45d..7c4f01f 100644 --- a/ash/system/web_notification/web_notification_tray.h +++ b/ash/system/web_notification/web_notification_tray.h @@ -74,7 +74,7 @@ class ASH_EXPORT WebNotificationTray // Overridden from TrayBackgroundView. virtual void SetShelfAlignment(ShelfAlignment alignment) OVERRIDE; virtual void AnchorUpdated() OVERRIDE; - virtual string16 GetAccessibleNameForTray() OVERRIDE; + virtual base::string16 GetAccessibleNameForTray() OVERRIDE; virtual void HideBubbleWithView( const views::TrayBubbleView* bubble_view) OVERRIDE; virtual bool ClickedOutsideBubble() OVERRIDE; @@ -86,7 +86,7 @@ class ASH_EXPORT WebNotificationTray virtual void BubbleViewDestroyed() OVERRIDE; virtual void OnMouseEnteredView() OVERRIDE; virtual void OnMouseExitedView() OVERRIDE; - virtual string16 GetAccessibleNameForBubble() OVERRIDE; + virtual base::string16 GetAccessibleNameForBubble() OVERRIDE; virtual gfx::Rect GetAnchorRect(views::Widget* anchor_widget, AnchorType anchor_type, AnchorAlignment anchor_alignment) OVERRIDE; diff --git a/ash/test/test_launcher_delegate.cc b/ash/test/test_launcher_delegate.cc index cc86459..9421e59 100644 --- a/ash/test/test_launcher_delegate.cc +++ b/ash/test/test_launcher_delegate.cc @@ -79,9 +79,9 @@ int TestLauncherDelegate::GetBrowserShortcutResourceId() { return IDR_AURA_LAUNCHER_BROWSER_SHORTCUT; } -string16 TestLauncherDelegate::GetTitle(const ash::LauncherItem& item) { +base::string16 TestLauncherDelegate::GetTitle(const ash::LauncherItem& item) { aura::Window* window = GetWindowByID(item.id); - return window ? window->title() : string16(); + return window ? window->title() : base::string16(); } ui::MenuModel* TestLauncherDelegate::CreateContextMenu( diff --git a/ash/test/test_launcher_delegate.h b/ash/test/test_launcher_delegate.h index ccbca32..ef90495 100644 --- a/ash/test/test_launcher_delegate.h +++ b/ash/test/test_launcher_delegate.h @@ -39,7 +39,7 @@ class TestLauncherDelegate : public LauncherDelegate, virtual void ItemClicked(const LauncherItem& item, const ui::Event& event) OVERRIDE; virtual int GetBrowserShortcutResourceId() OVERRIDE; - virtual string16 GetTitle(const LauncherItem& item) OVERRIDE; + virtual base::string16 GetTitle(const LauncherItem& item) OVERRIDE; virtual ui::MenuModel* CreateContextMenu(const LauncherItem& item, aura::RootWindow* root) OVERRIDE; virtual ash::LauncherMenuModel* CreateApplicationMenu( diff --git a/ash/test/test_metro_viewer_process_host.cc b/ash/test/test_metro_viewer_process_host.cc index 3d58f6f..270c233 100644 --- a/ash/test/test_metro_viewer_process_host.cc +++ b/ash/test/test_metro_viewer_process_host.cc @@ -62,7 +62,7 @@ void TestMetroViewerProcessHost::NotifyChannelConnected() { } bool TestMetroViewerProcessHost::LaunchViewerAndWaitForConnection( - const string16& app_user_model_id) { + const base::string16& app_user_model_id) { // Activate the viewer process. NOTE: This assumes that the viewer process is // registered as the default browser using the provided |app_user_model_id|. diff --git a/ash/test/test_metro_viewer_process_host.h b/ash/test/test_metro_viewer_process_host.h index de0969e..f52230b 100644 --- a/ash/test/test_metro_viewer_process_host.h +++ b/ash/test/test_metro_viewer_process_host.h @@ -32,7 +32,8 @@ class TestMetroViewerProcessHost : public IPC::Listener, // and blocks until that viewer process connects or until a timeout is // reached. Returns true if the viewer process connects before the timeout is // reached. - bool LaunchViewerAndWaitForConnection(const string16& app_user_model_id); + bool LaunchViewerAndWaitForConnection( + const base::string16& app_user_model_id); // IPC::Sender implementation: virtual bool Send(IPC::Message* msg) OVERRIDE; diff --git a/ash/test/test_shell_delegate.cc b/ash/test/test_shell_delegate.cc index feccd6b..6ec196d 100644 --- a/ash/test/test_shell_delegate.cc +++ b/ash/test/test_shell_delegate.cc @@ -200,12 +200,14 @@ void TestShellDelegate::HandleMediaPlayPause() { void TestShellDelegate::HandleMediaPrevTrack() { } -string16 TestShellDelegate::GetTimeRemainingString(base::TimeDelta delta) { - return string16(); +base::string16 TestShellDelegate::GetTimeRemainingString( + base::TimeDelta delta) { + return base::string16(); } -string16 TestShellDelegate::GetTimeDurationLongString(base::TimeDelta delta) { - return string16(); +base::string16 TestShellDelegate::GetTimeDurationLongString( + base::TimeDelta delta) { + return base::string16(); } void TestShellDelegate::SaveScreenMagnifierScale(double scale) { @@ -239,8 +241,8 @@ void TestShellDelegate::SetCanLockScreen(bool can_lock_screen) { can_lock_screen_ = can_lock_screen; } -string16 TestShellDelegate::GetProductName() const { - return string16(); +base::string16 TestShellDelegate::GetProductName() const { + return base::string16(); } diff --git a/ash/test/test_shell_delegate.h b/ash/test/test_shell_delegate.h index 98706bd..269d571 100644 --- a/ash/test/test_shell_delegate.h +++ b/ash/test/test_shell_delegate.h @@ -73,13 +73,14 @@ class TestShellDelegate : public ShellDelegate { virtual void HandleMediaNextTrack() OVERRIDE; virtual void HandleMediaPlayPause() OVERRIDE; virtual void HandleMediaPrevTrack() OVERRIDE; - virtual string16 GetTimeRemainingString(base::TimeDelta delta) OVERRIDE; - virtual string16 GetTimeDurationLongString(base::TimeDelta delta) OVERRIDE; + virtual base::string16 GetTimeRemainingString(base::TimeDelta delta) OVERRIDE; + virtual base::string16 GetTimeDurationLongString( + base::TimeDelta delta) OVERRIDE; virtual void SaveScreenMagnifierScale(double scale) OVERRIDE; virtual double GetSavedScreenMagnifierScale() OVERRIDE; virtual ui::MenuModel* CreateContextMenu(aura::RootWindow* root) OVERRIDE; virtual RootWindowHostFactory* CreateRootWindowHostFactory() OVERRIDE; - virtual string16 GetProductName() const OVERRIDE; + virtual base::string16 GetProductName() const OVERRIDE; int num_exit_requests() const { return num_exit_requests_; } diff --git a/ash/test/test_suite.cc b/ash/test/test_suite.cc index a42a685..458aaeb 100644 --- a/ash/test/test_suite.cc +++ b/ash/test/test_suite.cc @@ -47,7 +47,7 @@ void AuraShellTestSuite::Initialize() { ui::win::CreateATLModuleIfNeeded(); - std::vector<string16> choices; + std::vector<base::string16> choices; win8::OpenWithDialogController controller; controller.RunSynchronously(NULL, L"http", win8::test::kDefaultTestExeName, &choices); diff --git a/ash/tooltips/tooltip_controller_unittest.cc b/ash/tooltips/tooltip_controller_unittest.cc index 4cc07b8..18ceb17 100644 --- a/ash/tooltips/tooltip_controller_unittest.cc +++ b/ash/tooltips/tooltip_controller_unittest.cc @@ -99,7 +99,7 @@ class TooltipControllerTest : public AshTestBase { TEST_F(TooltipControllerTest, NonNullTooltipClient) { EXPECT_TRUE(aura::client::GetTooltipClient(Shell::GetPrimaryRootWindow()) != NULL); - EXPECT_EQ(string16(), helper_->GetTooltipText()); + EXPECT_EQ(base::string16(), helper_->GetTooltipText()); EXPECT_EQ(NULL, helper_->GetTooltipWindow()); EXPECT_FALSE(helper_->IsTooltipVisible()); } @@ -109,13 +109,13 @@ TEST_F(TooltipControllerTest, HideTooltipWhenCursorHidden) { TooltipTestView* view = new TooltipTestView; AddViewToWidgetAndResize(widget.get(), view); view->set_tooltip_text(ASCIIToUTF16("Tooltip Text")); - EXPECT_EQ(string16(), helper_->GetTooltipText()); + EXPECT_EQ(base::string16(), helper_->GetTooltipText()); EXPECT_EQ(NULL, helper_->GetTooltipWindow()); aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow()); generator.MoveMouseRelativeTo(widget->GetNativeView(), view->bounds().CenterPoint()); - string16 expected_tooltip = ASCIIToUTF16("Tooltip Text"); + base::string16 expected_tooltip = ASCIIToUTF16("Tooltip Text"); // Fire tooltip timer so tooltip becomes visible. helper_->FireTooltipTimer(); diff --git a/ash/wm/ash_native_cursor_manager.cc b/ash/wm/ash_native_cursor_manager.cc index 885f95b..be9c6b7 100644 --- a/ash/wm/ash_native_cursor_manager.cc +++ b/ash/wm/ash_native_cursor_manager.cc @@ -108,7 +108,7 @@ void AshNativeCursorManager::SetMouseEventsEnabled( } void AshNativeCursorManager::SetCursorResourceModule( - const string16& module_name) { + const base::string16& module_name) { image_cursors_->SetCursorResourceModule(module_name); } diff --git a/ash/wm/ash_native_cursor_manager.h b/ash/wm/ash_native_cursor_manager.h index 506d381..5df8062 100644 --- a/ash/wm/ash_native_cursor_manager.h +++ b/ash/wm/ash_native_cursor_manager.h @@ -49,7 +49,8 @@ class ASH_EXPORT AshNativeCursorManager virtual void SetMouseEventsEnabled( bool enabled, views::corewm::NativeCursorManagerDelegate* delegate) OVERRIDE; - virtual void SetCursorResourceModule(const string16& module_name) OVERRIDE; + virtual void SetCursorResourceModule( + const base::string16& module_name) OVERRIDE; // The cursor location where the cursor was disabled. gfx::Point disabled_cursor_location_; diff --git a/ash/wm/image_cursors.cc b/ash/wm/image_cursors.cc index 547c9b3..c1bd7e7 100644 --- a/ash/wm/image_cursors.cc +++ b/ash/wm/image_cursors.cc @@ -113,7 +113,7 @@ void ImageCursors::SetPlatformCursor(gfx::NativeCursor* cursor) { cursor_loader_->SetPlatformCursor(cursor); } -void ImageCursors::SetCursorResourceModule(const string16& module_name) { +void ImageCursors::SetCursorResourceModule(const base::string16& module_name) { cursor_loader_->SetCursorResourceModule(module_name); } diff --git a/ash/wm/image_cursors.h b/ash/wm/image_cursors.h index 3f1e609..f7bcfd6 100644 --- a/ash/wm/image_cursors.h +++ b/ash/wm/image_cursors.h @@ -41,7 +41,7 @@ class ASH_EXPORT ImageCursors { void SetPlatformCursor(gfx::NativeCursor* cursor); // Sets the cursor resource module name for non system cursors. - void SetCursorResourceModule(const string16& module_name); + void SetCursorResourceModule(const base::string16& module_name); private: scoped_ptr<ui::CursorLoader> cursor_loader_; diff --git a/ash/wm/workspace/workspace_manager_unittest.cc b/ash/wm/workspace/workspace_manager_unittest.cc index 2607251..823848d 100644 --- a/ash/wm/workspace/workspace_manager_unittest.cc +++ b/ash/wm/workspace/workspace_manager_unittest.cc @@ -23,7 +23,7 @@ #include "ash/wm/workspace/workspace.h" #include "ash/wm/workspace_controller_test_helper.h" #include "base/command_line.h" -#include "base/string_number_conversions.h" +#include "base/strings/string_number_conversions.h" #include "ui/aura/client/aura_constants.h" #include "ui/aura/root_window.h" #include "ui/aura/test/event_generator.h" diff --git a/ash/wm/workspace/workspace_window_resizer_unittest.cc b/ash/wm/workspace/workspace_window_resizer_unittest.cc index 20cee8e..fbab915 100644 --- a/ash/wm/workspace/workspace_window_resizer_unittest.cc +++ b/ash/wm/workspace/workspace_window_resizer_unittest.cc @@ -16,8 +16,8 @@ #include "ash/wm/workspace/phantom_window_controller.h" #include "ash/wm/workspace/snap_sizer.h" #include "ash/wm/workspace_controller.h" -#include "base/string_number_conversions.h" #include "base/stringprintf.h" +#include "base/strings/string_number_conversions.h" #include "ui/aura/client/aura_constants.h" #include "ui/aura/root_window.h" #include "ui/aura/test/test_window_delegate.h" |