summaryrefslogtreecommitdiffstats
path: root/ui/app_list
diff options
context:
space:
mode:
authoravi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-25 20:09:36 +0000
committeravi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-25 20:09:36 +0000
commitdd2cc808be553ce11d1ac3a1b7e8382ffca65293 (patch)
tree097cc69a05043c74ad3793f9f26e263df0b7a6f9 /ui/app_list
parentb6775d788c0bcc4bc879731478a2eadc522dc767 (diff)
downloadchromium_src-dd2cc808be553ce11d1ac3a1b7e8382ffca65293.zip
chromium_src-dd2cc808be553ce11d1ac3a1b7e8382ffca65293.tar.gz
chromium_src-dd2cc808be553ce11d1ac3a1b7e8382ffca65293.tar.bz2
Update uses of UTF conversions in ui/ to use the base:: namespace.
BUG=330556 TEST=no change TBR=ben@chromium.org Review URL: https://codereview.chromium.org/106383004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@242504 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/app_list')
-rw-r--r--ui/app_list/cocoa/app_list_window_controller_unittest.mm2
-rw-r--r--ui/app_list/cocoa/apps_grid_controller_unittest.mm2
-rw-r--r--ui/app_list/cocoa/apps_search_box_controller_unittest.mm2
-rw-r--r--ui/app_list/cocoa/apps_search_results_controller_unittest.mm8
-rw-r--r--ui/app_list/cocoa/signin_view_controller_unittest.mm2
-rw-r--r--ui/app_list/views/app_list_item_view.cc6
-rw-r--r--ui/app_list/views/apps_grid_view_unittest.cc6
-rw-r--r--ui/app_list/views/folder_header_view.cc4
8 files changed, 17 insertions, 15 deletions
diff --git a/ui/app_list/cocoa/app_list_window_controller_unittest.mm b/ui/app_list/cocoa/app_list_window_controller_unittest.mm
index 0f76691..672363b 100644
--- a/ui/app_list/cocoa/app_list_window_controller_unittest.mm
+++ b/ui/app_list/cocoa/app_list_window_controller_unittest.mm
@@ -81,7 +81,7 @@ TEST_F(AppListWindowControllerTest, CloseClearsSearch) {
EXPECT_FALSE([view_controller showingSearchResults]);
- const base::string16 search_text(ASCIIToUTF16("test"));
+ const base::string16 search_text(base::ASCIIToUTF16("test"));
model->SetText(search_text);
EXPECT_TRUE([view_controller showingSearchResults]);
diff --git a/ui/app_list/cocoa/apps_grid_controller_unittest.mm b/ui/app_list/cocoa/apps_grid_controller_unittest.mm
index 5969b20..da0b37d 100644
--- a/ui/app_list/cocoa/apps_grid_controller_unittest.mm
+++ b/ui/app_list/cocoa/apps_grid_controller_unittest.mm
@@ -138,7 +138,7 @@ class AppListItemWithMenu : public AppListItemModel {
menu_model_(NULL),
menu_ready_(true) {
SetTitleAndFullName(title, title);
- menu_model_.AddItem(0, UTF8ToUTF16("Menu For: " + title));
+ menu_model_.AddItem(0, base::UTF8ToUTF16("Menu For: " + title));
}
void SetMenuReadyForTesting(bool ready) {
diff --git a/ui/app_list/cocoa/apps_search_box_controller_unittest.mm b/ui/app_list/cocoa/apps_search_box_controller_unittest.mm
index bbe7ce6..82d4358 100644
--- a/ui/app_list/cocoa/apps_search_box_controller_unittest.mm
+++ b/ui/app_list/cocoa/apps_search_box_controller_unittest.mm
@@ -16,6 +16,8 @@
#import "ui/base/cocoa/menu_controller.h"
#import "ui/base/test/ui_cocoa_test_helper.h"
+using base::ASCIIToUTF16;
+
@interface TestAppsSearchBoxDelegate : NSObject<AppsSearchBoxDelegate> {
@private
app_list::SearchBoxModel searchBoxModel_;
diff --git a/ui/app_list/cocoa/apps_search_results_controller_unittest.mm b/ui/app_list/cocoa/apps_search_results_controller_unittest.mm
index 27e04e9..dec1b1f 100644
--- a/ui/app_list/cocoa/apps_search_results_controller_unittest.mm
+++ b/ui/app_list/cocoa/apps_search_results_controller_unittest.mm
@@ -65,9 +65,9 @@ class SearchResultWithMenu : public SearchResult {
SearchResultWithMenu(const std::string& title, const std::string& details)
: menu_model_(NULL),
menu_ready_(true) {
- set_title(ASCIIToUTF16(title));
- set_details(ASCIIToUTF16(details));
- menu_model_.AddItem(0, UTF8ToUTF16("Menu For: " + title));
+ set_title(base::ASCIIToUTF16(title));
+ set_details(base::ASCIIToUTF16(details));
+ menu_model_.AddItem(0, base::UTF8ToUTF16("Menu For: " + title));
}
void SetMenuReadyForTesting(bool ready) {
@@ -146,7 +146,7 @@ void AppsSearchResultsControllerTest::ExpectConsistent() {
SearchResult* result = ModelResultAt(i);
base::string16 string_in_model = result->title();
if (!result->details().empty())
- string_in_model += ASCIIToUTF16("\n") + result->details();
+ string_in_model += base::ASCIIToUTF16("\n") + result->details();
EXPECT_NSEQ(base::SysUTF16ToNSString(string_in_model),
[[ViewResultAt(i) attributedStringValue] string]);
}
diff --git a/ui/app_list/cocoa/signin_view_controller_unittest.mm b/ui/app_list/cocoa/signin_view_controller_unittest.mm
index 70845df..f230ceb 100644
--- a/ui/app_list/cocoa/signin_view_controller_unittest.mm
+++ b/ui/app_list/cocoa/signin_view_controller_unittest.mm
@@ -37,7 +37,7 @@ class SigninViewControllerTest : public ui::CocoaTest,
public SigninDelegate {
public:
SigninViewControllerTest()
- : test_text_(ASCIIToUTF16("Sign in")),
+ : test_text_(base::ASCIIToUTF16("Sign in")),
needs_signin_(true),
show_signin_count_(0),
open_learn_more_count_(0),
diff --git a/ui/app_list/views/app_list_item_view.cc b/ui/app_list/views/app_list_item_view.cc
index ba9a294..1e70e42 100644
--- a/ui/app_list/views/app_list_item_view.cc
+++ b/ui/app_list/views/app_list_item_view.cc
@@ -134,7 +134,7 @@ void AppListItemView::UpdateIcon() {
void AppListItemView::UpdateTooltip() {
title_->SetTooltipText(model_->title() == model_->full_name() ?
- base::string16() : UTF8ToUTF16(model_->full_name()));
+ base::string16() : base::UTF8ToUTF16(model_->full_name()));
}
void AppListItemView::SetUIState(UIState state) {
@@ -226,7 +226,7 @@ void AppListItemView::ItemIconChanged() {
}
void AppListItemView::ItemTitleChanged() {
- title_->SetText(UTF8ToUTF16(model_->title()));
+ title_->SetText(base::UTF8ToUTF16(model_->title()));
title_->Invalidate();
UpdateTooltip();
Layout();
@@ -317,7 +317,7 @@ void AppListItemView::OnPaint(gfx::Canvas* canvas) {
void AppListItemView::GetAccessibleState(ui::AccessibleViewState* state) {
state->role = ui::AccessibilityTypes::ROLE_PUSHBUTTON;
- state->name = UTF8ToUTF16(model_->title());
+ state->name = base::UTF8ToUTF16(model_->title());
}
void AppListItemView::ShowContextMenuForView(views::View* source,
diff --git a/ui/app_list/views/apps_grid_view_unittest.cc b/ui/app_list/views/apps_grid_view_unittest.cc
index f2e9450..47cdb89 100644
--- a/ui/app_list/views/apps_grid_view_unittest.cc
+++ b/ui/app_list/views/apps_grid_view_unittest.cc
@@ -441,8 +441,8 @@ TEST_F(AppsGridViewTest, ItemLabelShortNameOverride) {
const views::Label* title_label = item_view->title();
EXPECT_TRUE(title_label->GetTooltipText(
title_label->bounds().CenterPoint(), &actual_tooltip));
- EXPECT_EQ(expected_tooltip, UTF16ToUTF8(actual_tooltip));
- EXPECT_EQ(expected_text, UTF16ToUTF8(title_label->text()));
+ EXPECT_EQ(expected_tooltip, base::UTF16ToUTF8(actual_tooltip));
+ EXPECT_EQ(expected_text, base::UTF16ToUTF8(title_label->text()));
}
TEST_F(AppsGridViewTest, ItemLabelNoShortName) {
@@ -457,7 +457,7 @@ TEST_F(AppsGridViewTest, ItemLabelNoShortName) {
const views::Label* title_label = item_view->title();
EXPECT_FALSE(title_label->GetTooltipText(
title_label->bounds().CenterPoint(), &actual_tooltip));
- EXPECT_EQ(title, UTF16ToUTF8(title_label->text()));
+ EXPECT_EQ(title, base::UTF16ToUTF8(title_label->text()));
}
} // namespace test
diff --git a/ui/app_list/views/folder_header_view.cc b/ui/app_list/views/folder_header_view.cc
index 9699e8f..302514d 100644
--- a/ui/app_list/views/folder_header_view.cc
+++ b/ui/app_list/views/folder_header_view.cc
@@ -99,7 +99,7 @@ void FolderHeaderView::Update() {
if (!folder_item_)
return;
- folder_name_view_->SetText(UTF8ToUTF16(folder_item_->title()));
+ folder_name_view_->SetText(base::UTF8ToUTF16(folder_item_->title()));
}
gfx::Size FolderHeaderView::GetPreferredSize() {
@@ -146,7 +146,7 @@ void FolderHeaderView::ContentsChanged(views::Textfield* sender,
return;
folder_item_->RemoveObserver(this);
- std::string name = UTF16ToUTF8(folder_name_view_->text());
+ std::string name = base::UTF16ToUTF8(folder_name_view_->text());
folder_item_->SetTitleAndFullName(name, name);
folder_item_->AddObserver(this);
}