summaryrefslogtreecommitdiffstats
path: root/chrome/browser/ui/cocoa
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/ui/cocoa')
-rw-r--r--chrome/browser/ui/cocoa/applescript/bookmark_folder_applescript.mm8
-rw-r--r--chrome/browser/ui/cocoa/applescript/tab_applescript.mm4
-rw-r--r--chrome/browser/ui/cocoa/autofill/autofill_dialog_cocoa.h7
-rw-r--r--chrome/browser/ui/cocoa/autofill/autofill_dialog_cocoa.mm12
-rw-r--r--chrome/browser/ui/cocoa/autofill/autofill_section_container.mm6
-rw-r--r--chrome/browser/ui/cocoa/browser/avatar_button_controller.mm2
-rw-r--r--chrome/browser/ui/cocoa/browser/edit_search_engine_cocoa_controller.mm10
-rw-r--r--chrome/browser/ui/cocoa/browser_window_cocoa.h4
-rw-r--r--chrome/browser/ui/cocoa/browser_window_cocoa.mm4
-rw-r--r--chrome/browser/ui/cocoa/browser_window_controller.mm2
-rw-r--r--chrome/browser/ui/cocoa/content_settings/collected_cookies_mac.mm6
-rw-r--r--chrome/browser/ui/cocoa/content_settings/cookie_details.h8
-rw-r--r--chrome/browser/ui/cocoa/content_settings/cookie_details.mm8
-rw-r--r--chrome/browser/ui/cocoa/content_settings/cookie_details_unittest.mm8
-rw-r--r--chrome/browser/ui/cocoa/content_settings/cookie_details_view_controller_unittest.mm4
-rw-r--r--chrome/browser/ui/cocoa/download/download_item_cell.mm2
-rw-r--r--chrome/browser/ui/cocoa/download/download_item_controller.mm2
-rw-r--r--chrome/browser/ui/cocoa/external_protocol_dialog.mm6
-rw-r--r--chrome/browser/ui/cocoa/global_error_bubble_controller.mm4
-rw-r--r--chrome/browser/ui/cocoa/history_menu_bridge.h2
-rw-r--r--chrome/browser/ui/cocoa/history_menu_bridge.mm4
-rw-r--r--chrome/browser/ui/cocoa/history_menu_bridge_unittest.mm6
-rw-r--r--chrome/browser/ui/cocoa/hung_renderer_controller.mm2
-rw-r--r--chrome/browser/ui/cocoa/infobars/alternate_nav_infobar_controller.mm6
-rw-r--r--chrome/browser/ui/cocoa/infobars/before_translate_infobar_controller.mm10
-rw-r--r--chrome/browser/ui/cocoa/infobars/confirm_infobar_controller.mm2
-rw-r--r--chrome/browser/ui/cocoa/infobars/mock_confirm_infobar_delegate.cc2
-rw-r--r--chrome/browser/ui/cocoa/infobars/mock_confirm_infobar_delegate.h6
-rw-r--r--chrome/browser/ui/cocoa/infobars/translate_message_infobar_controller.mm4
-rw-r--r--chrome/browser/ui/cocoa/keystone_infobar_delegate.mm4
-rw-r--r--chrome/browser/ui/cocoa/location_bar/keyword_hint_decoration.h2
-rw-r--r--chrome/browser/ui/cocoa/location_bar/keyword_hint_decoration.mm10
-rw-r--r--chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h2
-rw-r--r--chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm8
-rw-r--r--chrome/browser/ui/cocoa/location_bar/selected_keyword_decoration.h2
-rw-r--r--chrome/browser/ui/cocoa/location_bar/selected_keyword_decoration.mm5
-rw-r--r--chrome/browser/ui/cocoa/location_bar/selected_keyword_decoration_unittest.mm2
-rw-r--r--chrome/browser/ui/cocoa/location_bar/zoom_decoration.mm3
-rw-r--r--chrome/browser/ui/cocoa/login_prompt_cocoa.mm11
-rw-r--r--chrome/browser/ui/cocoa/media_picker/desktop_media_picker_cocoa.h2
-rw-r--r--chrome/browser/ui/cocoa/media_picker/desktop_media_picker_cocoa.mm2
-rw-r--r--chrome/browser/ui/cocoa/media_picker/desktop_media_picker_controller.h2
-rw-r--r--chrome/browser/ui/cocoa/media_picker/desktop_media_picker_controller.mm6
-rw-r--r--chrome/browser/ui/cocoa/notifications/balloon_controller_unittest.mm4
-rw-r--r--chrome/browser/ui/cocoa/notifications/message_center_tray_bridge.mm2
-rw-r--r--chrome/browser/ui/cocoa/notifications/message_center_tray_bridge_unittest.mm2
-rw-r--r--chrome/browser/ui/cocoa/omnibox/omnibox_popup_view_mac.h4
-rw-r--r--chrome/browser/ui/cocoa/omnibox/omnibox_popup_view_mac.mm6
-rw-r--r--chrome/browser/ui/cocoa/omnibox/omnibox_popup_view_mac_unittest.mm10
-rw-r--r--chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.h29
-rw-r--r--chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.mm42
-rw-r--r--chrome/browser/ui/cocoa/one_click_signin_dialog_controller.mm2
-rw-r--r--chrome/browser/ui/cocoa/one_click_signin_view_controller.h4
-rw-r--r--chrome/browser/ui/cocoa/one_click_signin_view_controller.mm2
-rw-r--r--chrome/browser/ui/cocoa/profile_signin_confirmation_view_controller.mm19
-rw-r--r--chrome/browser/ui/cocoa/profile_signin_confirmation_view_controller_browsertest.mm2
-rw-r--r--chrome/browser/ui/cocoa/screen_capture_notification_ui_cocoa.h6
-rw-r--r--chrome/browser/ui/cocoa/screen_capture_notification_ui_cocoa.mm12
-rw-r--r--chrome/browser/ui/cocoa/simple_message_box_mac.mm4
-rw-r--r--chrome/browser/ui/cocoa/speech_recognition_window_controller.h2
-rw-r--r--chrome/browser/ui/cocoa/speech_recognition_window_controller.mm2
-rw-r--r--chrome/browser/ui/cocoa/status_bubble_mac.h4
-rw-r--r--chrome/browser/ui/cocoa/status_bubble_mac.mm11
-rw-r--r--chrome/browser/ui/cocoa/status_icons/status_icon_mac.h6
-rw-r--r--chrome/browser/ui/cocoa/status_icons/status_icon_mac.mm6
-rw-r--r--chrome/browser/ui/cocoa/status_icons/status_tray_mac.h2
-rw-r--r--chrome/browser/ui/cocoa/status_icons/status_tray_mac.mm7
-rw-r--r--chrome/browser/ui/cocoa/tab_contents/render_view_context_menu_mac.h2
-rw-r--r--chrome/browser/ui/cocoa/tab_contents/render_view_context_menu_mac.mm2
-rw-r--r--chrome/browser/ui/cocoa/tab_contents/sad_tab_view.mm2
-rw-r--r--chrome/browser/ui/cocoa/tabpose_window.mm2
-rw-r--r--chrome/browser/ui/cocoa/task_manager_mac_unittest.mm13
-rw-r--r--chrome/browser/ui/cocoa/ui_localizer.mm6
-rw-r--r--chrome/browser/ui/cocoa/validation_message_bubble_controller.h8
-rw-r--r--chrome/browser/ui/cocoa/web_dialog_window_controller.mm4
-rw-r--r--chrome/browser/ui/cocoa/web_dialog_window_controller_unittest.mm4
-rw-r--r--chrome/browser/ui/cocoa/website_settings_bubble_controller.h2
-rw-r--r--chrome/browser/ui/cocoa/website_settings_bubble_controller.mm20
-rw-r--r--chrome/browser/ui/cocoa/wrench_menu/wrench_menu_controller.mm4
-rw-r--r--chrome/browser/ui/cocoa/wrench_menu/wrench_menu_controller_unittest.mm4
80 files changed, 246 insertions, 229 deletions
diff --git a/chrome/browser/ui/cocoa/applescript/bookmark_folder_applescript.mm b/chrome/browser/ui/cocoa/applescript/bookmark_folder_applescript.mm
index cc9ff82..e7008b7 100644
--- a/chrome/browser/ui/cocoa/applescript/bookmark_folder_applescript.mm
+++ b/chrome/browser/ui/cocoa/applescript/bookmark_folder_applescript.mm
@@ -45,7 +45,7 @@
const BookmarkNode* node = model->AddFolder(bookmarkNode_,
bookmarkNode_->child_count(),
- string16());
+ base::string16());
if (!node) {
AppleScript::SetError(AppleScript::errCreateBookmarkFolder);
return;
@@ -67,7 +67,7 @@
const BookmarkNode* node = model->AddFolder(bookmarkNode_,
position,
- string16());
+ base::string16());
if (!node) {
AppleScript::SetError(AppleScript::errCreateBookmarkFolder);
return;
@@ -123,7 +123,7 @@
const BookmarkNode* node = model->AddURL(bookmarkNode_,
bookmarkNode_->child_count(),
- string16(),
+ base::string16(),
url);
if (!node) {
AppleScript::SetError(AppleScript::errCreateBookmarkItem);
@@ -153,7 +153,7 @@
const BookmarkNode* node = model->AddURL(bookmarkNode_,
position,
- string16(),
+ base::string16(),
url);
if (!node) {
AppleScript::SetError(AppleScript::errCreateBookmarkItem);
diff --git a/chrome/browser/ui/cocoa/applescript/tab_applescript.mm b/chrome/browser/ui/cocoa/applescript/tab_applescript.mm
index a8afbb8..be4e1ffa 100644
--- a/chrome/browser/ui/cocoa/applescript/tab_applescript.mm
+++ b/chrome/browser/ui/cocoa/applescript/tab_applescript.mm
@@ -154,7 +154,7 @@ void ResumeAppleEventAndSendReply(NSAppleEventManagerSuspensionID suspension_id,
if (!entry)
return nil;
- string16 title = entry ? entry->GetTitle() : string16();
+ base::string16 title = entry ? entry->GetTitle() : base::string16();
return base::SysUTF16ToNSString(title);
}
@@ -327,7 +327,7 @@ void ResumeAppleEventAndSendReply(NSAppleEventManagerSuspensionID suspension_id,
content::RenderViewHost::JavascriptResultCallback callback =
base::Bind(&ResumeAppleEventAndSendReply, suspensionID);
- string16 script = base::SysNSStringToUTF16(
+ base::string16 script = base::SysNSStringToUTF16(
[[command evaluatedArguments] objectForKey:@"javascript"]);
view->ExecuteJavascriptInWebFrameCallbackResult(string16(), // frame_xpath
script,
diff --git a/chrome/browser/ui/cocoa/autofill/autofill_dialog_cocoa.h b/chrome/browser/ui/cocoa/autofill/autofill_dialog_cocoa.h
index 87374bf..6f1442e 100644
--- a/chrome/browser/ui/cocoa/autofill/autofill_dialog_cocoa.h
+++ b/chrome/browser/ui/cocoa/autofill/autofill_dialog_cocoa.h
@@ -50,7 +50,7 @@ class AutofillDialogCocoa : public AutofillDialogView,
const DetailInput& originating_input) OVERRIDE;
virtual void GetUserInput(DialogSection section,
FieldValueMap* output) OVERRIDE;
- virtual string16 GetCvc() OVERRIDE;
+ virtual base::string16 GetCvc() OVERRIDE;
virtual bool HitTestInput(const DetailInput& input,
const gfx::Point& screen_point) OVERRIDE;
virtual bool SaveDetailsLocally() OVERRIDE;
@@ -65,9 +65,10 @@ class AutofillDialogCocoa : public AutofillDialogView,
// http://crbug.com/256864
virtual void SubmitForTesting() OVERRIDE;
virtual void CancelForTesting() OVERRIDE;
- virtual string16 GetTextContentsOfInput(const DetailInput& input) OVERRIDE;
+ virtual base::string16 GetTextContentsOfInput(
+ const DetailInput& input) OVERRIDE;
virtual void SetTextContentsOfInput(const DetailInput& input,
- const string16& contents) OVERRIDE;
+ const base::string16& contents) OVERRIDE;
virtual void SetTextContentsOfSuggestionInput(
DialogSection section,
const base::string16& text) OVERRIDE;
diff --git a/chrome/browser/ui/cocoa/autofill/autofill_dialog_cocoa.mm b/chrome/browser/ui/cocoa/autofill/autofill_dialog_cocoa.mm
index 571c4ca..582c031 100644
--- a/chrome/browser/ui/cocoa/autofill/autofill_dialog_cocoa.mm
+++ b/chrome/browser/ui/cocoa/autofill/autofill_dialog_cocoa.mm
@@ -104,7 +104,7 @@ void AutofillDialogCocoa::GetUserInput(DialogSection section,
[sheet_delegate_ getInputs:output forSection:section];
}
-string16 AutofillDialogCocoa::GetCvc() {
+base::string16 AutofillDialogCocoa::GetCvc() {
return base::SysNSStringToUTF16([sheet_delegate_ getCvc]);
}
@@ -151,7 +151,8 @@ void AutofillDialogCocoa::CancelForTesting() {
[sheet_delegate_ cancel:nil];
}
-string16 AutofillDialogCocoa::GetTextContentsOfInput(const DetailInput& input) {
+base::string16 AutofillDialogCocoa::GetTextContentsOfInput(
+ const DetailInput& input) {
for (size_t i = SECTION_MIN; i <= SECTION_MAX; ++i) {
DialogSection section = static_cast<DialogSection>(i);
FieldValueMap contents;
@@ -162,11 +163,12 @@ string16 AutofillDialogCocoa::GetTextContentsOfInput(const DetailInput& input) {
}
NOTREACHED();
- return string16();
+ return base::string16();
}
-void AutofillDialogCocoa::SetTextContentsOfInput(const DetailInput& input,
- const string16& contents) {
+void AutofillDialogCocoa::SetTextContentsOfInput(
+ const DetailInput& input,
+ const base::string16& contents) {
[sheet_delegate_ setTextContents:base::SysUTF16ToNSString(contents)
forInput:input];
}
diff --git a/chrome/browser/ui/cocoa/autofill/autofill_section_container.mm b/chrome/browser/ui/cocoa/autofill/autofill_section_container.mm
index fd38bd5..d61330f 100644
--- a/chrome/browser/ui/cocoa/autofill/autofill_section_container.mm
+++ b/chrome/browser/ui/cocoa/autofill/autofill_section_container.mm
@@ -179,7 +179,7 @@ bool ShouldOverwriteComboboxes(autofill::DialogSection section,
}
inputs_.reset([[self makeInputControls] retain]);
- string16 labelText = delegate_->LabelForSection(section_);
+ base::string16 labelText = delegate_->LabelForSection(section_);
label_.reset(
[[self makeDetailSectionLabel:base::SysUTF16ToNSString(labelText)]
retain]);
@@ -405,7 +405,7 @@ bool ShouldOverwriteComboboxes(autofill::DialogSection section,
return;
autofill::ServerFieldType type = [self fieldTypeForControl:field];
- string16 fieldValue = base::SysNSStringToUTF16([textfield fieldValue]);
+ base::string16 fieldValue = base::SysNSStringToUTF16([textfield fieldValue]);
// Get the frame rectangle for the designated field, in screen coordinates.
NSRect textFrameInScreen = [field convertRect:[field bounds] toView:nil];
@@ -431,7 +431,7 @@ bool ShouldOverwriteComboboxes(autofill::DialogSection section,
// correcting a minor mistake (i.e. a wrong CC digit) should immediately
// result in validation - positive user feedback.
if ([textfield invalid] && edited) {
- string16 message = delegate_->InputValidityMessage(section_,
+ base::string16 message = delegate_->InputValidityMessage(section_,
type,
fieldValue);
[textfield setValidityMessage:base::SysUTF16ToNSString(message)];
diff --git a/chrome/browser/ui/cocoa/browser/avatar_button_controller.mm b/chrome/browser/ui/cocoa/browser/avatar_button_controller.mm
index cfff00c..7fba944 100644
--- a/chrome/browser/ui/cocoa/browser/avatar_button_controller.mm
+++ b/chrome/browser/ui/cocoa/browser/avatar_button_controller.mm
@@ -311,7 +311,7 @@ class Observer : public content::NotificationObserver {
profiles::kAvatarIconWidth, profiles::kAvatarIconHeight);
[self setImage:icon.ToNSImage()];
- const string16& name = cache.GetNameOfProfileAtIndex(index);
+ const base::string16& name = cache.GetNameOfProfileAtIndex(index);
NSString* nsName = base::SysUTF16ToNSString(name);
[button_ setToolTip:nsName];
[[button_ cell]
diff --git a/chrome/browser/ui/cocoa/browser/edit_search_engine_cocoa_controller.mm b/chrome/browser/ui/cocoa/browser/edit_search_engine_cocoa_controller.mm
index 6e1d05c..ae36e5c 100644
--- a/chrome/browser/ui/cocoa/browser/edit_search_engine_cocoa_controller.mm
+++ b/chrome/browser/ui/cocoa/browser/edit_search_engine_cocoa_controller.mm
@@ -120,8 +120,9 @@ void ShiftOriginY(NSView* view, CGFloat amount) {
- (IBAction)save:(id)sender {
DCHECK([self validateFields]);
- string16 title = base::SysNSStringToUTF16([nameField_ stringValue]);
- string16 keyword = base::SysNSStringToUTF16([keywordField_ stringValue]);
+ base::string16 title = base::SysNSStringToUTF16([nameField_ stringValue]);
+ base::string16 keyword =
+ base::SysNSStringToUTF16([keywordField_ stringValue]);
std::string url = base::SysNSStringToUTF8([urlField_ stringValue]);
controller_->AcceptAddOrEdit(title, keyword, url);
[self doClose];
@@ -159,14 +160,15 @@ void ShiftOriginY(NSView* view, CGFloat amount) {
// This sets the image state for all the controls and enables or disables the
// done button. Returns YES if all the fields are valid.
- (BOOL)validateFields {
- string16 title = base::SysNSStringToUTF16([nameField_ stringValue]);
+ base::string16 title = base::SysNSStringToUTF16([nameField_ stringValue]);
BOOL titleValid = controller_->IsTitleValid(title);
[self setIsValid:titleValid
toolTip:IDS_SEARCH_ENGINES_INVALID_TITLE_TT
forImageView:nameImage_
textField:nameField_];
- string16 keyword = base::SysNSStringToUTF16([keywordField_ stringValue]);
+ base::string16 keyword =
+ base::SysNSStringToUTF16([keywordField_ stringValue]);
BOOL keywordValid = controller_->IsKeywordValid(keyword);
[self setIsValid:keywordValid
toolTip:IDS_SEARCH_ENGINES_INVALID_KEYWORD_TT
diff --git a/chrome/browser/ui/cocoa/browser_window_cocoa.h b/chrome/browser/ui/cocoa/browser_window_cocoa.h
index 92f9e14..4091953 100644
--- a/chrome/browser/ui/cocoa/browser_window_cocoa.h
+++ b/chrome/browser/ui/cocoa/browser_window_cocoa.h
@@ -108,8 +108,8 @@ class BrowserWindowCocoa :
#if defined(ENABLE_ONE_CLICK_SIGNIN)
virtual void ShowOneClickSigninBubble(
OneClickSigninBubbleType type,
- const string16& email,
- const string16& error_message,
+ const base::string16& email,
+ const base::string16& error_message,
const StartSyncCallback& start_sync_callback) OVERRIDE;
#endif
virtual bool IsDownloadShelfVisible() const OVERRIDE;
diff --git a/chrome/browser/ui/cocoa/browser_window_cocoa.mm b/chrome/browser/ui/cocoa/browser_window_cocoa.mm
index 5072ecc..982d068 100644
--- a/chrome/browser/ui/cocoa/browser_window_cocoa.mm
+++ b/chrome/browser/ui/cocoa/browser_window_cocoa.mm
@@ -488,8 +488,8 @@ void BrowserWindowCocoa::ShowTranslateBubble(
#if defined(ENABLE_ONE_CLICK_SIGNIN)
void BrowserWindowCocoa::ShowOneClickSigninBubble(
OneClickSigninBubbleType type,
- const string16& email,
- const string16& error_message,
+ const base::string16& email,
+ const base::string16& error_message,
const StartSyncCallback& start_sync_callback) {
WebContents* web_contents =
browser_->tab_strip_model()->GetActiveWebContents();
diff --git a/chrome/browser/ui/cocoa/browser_window_controller.mm b/chrome/browser/ui/cocoa/browser_window_controller.mm
index d9916d6..783c113 100644
--- a/chrome/browser/ui/cocoa/browser_window_controller.mm
+++ b/chrome/browser/ui/cocoa/browser_window_controller.mm
@@ -234,7 +234,7 @@ enum {
}
}
- string16 label = signin_ui_util::GetSigninMenuLabel(profile);
+ base::string16 label = signin_ui_util::GetSigninMenuLabel(profile);
[signinMenuItem setTitle:l10n_util::FixUpWindowsStyleLabel(label)];
[signinMenuItem setHidden:!showSigninMenuItem];
[followingSeparator setHidden:!showSigninMenuItem];
diff --git a/chrome/browser/ui/cocoa/content_settings/collected_cookies_mac.mm b/chrome/browser/ui/cocoa/content_settings/collected_cookies_mac.mm
index 389ad2c..11b581f 100644
--- a/chrome/browser/ui/cocoa/content_settings/collected_cookies_mac.mm
+++ b/chrome/browser/ui/cocoa/content_settings/collected_cookies_mac.mm
@@ -111,7 +111,7 @@ void CollectedCookiesMac::OnConstrainedWindowClosed(
#pragma mark Window Controller
@interface CollectedCookiesWindowController(Private)
--(void)showInfoBarForDomain:(const string16&)domain
+-(void)showInfoBarForDomain:(const base::string16&)domain
setting:(ContentSetting)setting;
-(void)showInfoBarForMultipleDomainsAndSetting:(ContentSetting)setting;
-(void)animateInfoBar;
@@ -230,7 +230,7 @@ void CollectedCookiesMac::OnConstrainedWindowClosed(
forTreeController:(NSTreeController*)controller {
NSArray* nodes = [controller selectedNodes];
BOOL multipleDomainsChanged = NO;
- string16 lastDomain;
+ base::string16 lastDomain;
for (NSTreeNode* treeNode in nodes) {
CocoaCookieTreeNode* node = [treeNode representedObject];
CookieTreeNode* cookie = static_cast<CookieTreeNode*>([node treeNode]);
@@ -417,7 +417,7 @@ void CollectedCookiesMac::OnConstrainedWindowClosed(
[self animateInfoBar];
}
--(void)showInfoBarForDomain:(const string16&)domain
+-(void)showInfoBarForDomain:(const base::string16&)domain
setting:(ContentSetting)setting {
NSString* label;
switch (setting) {
diff --git a/chrome/browser/ui/cocoa/content_settings/cookie_details.h b/chrome/browser/ui/cocoa/content_settings/cookie_details.h
index c0c9c84..e76d0d1 100644
--- a/chrome/browser/ui/cocoa/content_settings/cookie_details.h
+++ b/chrome/browser/ui/cocoa/content_settings/cookie_details.h
@@ -177,8 +177,8 @@ enum CocoaCookieDetailsType {
// Used for database details in the cookie prompt dialog.
- (id)initWithDatabase:(const std::string&)domain
- databaseName:(const string16&)databaseName
- databaseDescription:(const string16&)databaseDescription
+ databaseName:(const base::string16&)databaseName
+ databaseDescription:(const base::string16&)databaseDescription
fileSize:(unsigned long)fileSize;
// -initWithAppCacheInfo: creates a cookie details with the manifest URL plus
@@ -188,8 +188,8 @@ enum CocoaCookieDetailsType {
// Used for local storage details in the cookie prompt dialog.
- (id)initWithLocalStorage:(const std::string&)domain
- key:(const string16&)key
- value:(const string16&)value;
+ key:(const base::string16&)key
+ value:(const base::string16&)value;
// -initWithAppCacheManifestURL: is called when the cookie prompt is displayed
// for an appcache, at that time only the manifest URL of the appcache is known.
diff --git a/chrome/browser/ui/cocoa/content_settings/cookie_details.mm b/chrome/browser/ui/cocoa/content_settings/cookie_details.mm
index 6cde051..02f6f57 100644
--- a/chrome/browser/ui/cocoa/content_settings/cookie_details.mm
+++ b/chrome/browser/ui/cocoa/content_settings/cookie_details.mm
@@ -201,8 +201,8 @@
}
- (id)initWithDatabase:(const std::string&)domain
- databaseName:(const string16&)databaseName
- databaseDescription:(const string16&)databaseDescription
+ databaseName:(const base::string16&)databaseName
+ databaseDescription:(const base::string16&)databaseDescription
fileSize:(unsigned long)fileSize {
if ((self = [super init])) {
type_ = kCocoaCookieDetailsTypePromptDatabase;
@@ -218,8 +218,8 @@
}
- (id)initWithLocalStorage:(const std::string&)domain
- key:(const string16&)key
- value:(const string16&)value {
+ key:(const base::string16&)key
+ value:(const base::string16&)value {
if ((self = [super init])) {
type_ = kCocoaCookieDetailsTypePromptLocalStorage;
canEditExpiration_ = NO;
diff --git a/chrome/browser/ui/cocoa/content_settings/cookie_details_unittest.mm b/chrome/browser/ui/cocoa/content_settings/cookie_details_unittest.mm
index a7761b1..3c9dc36 100644
--- a/chrome/browser/ui/cocoa/content_settings/cookie_details_unittest.mm
+++ b/chrome/browser/ui/cocoa/content_settings/cookie_details_unittest.mm
@@ -165,8 +165,8 @@ TEST_F(CookiesDetailsTest, CreateForTreeIndexedDB) {
TEST_F(CookiesDetailsTest, CreateForPromptDatabase) {
base::scoped_nsobject<CocoaCookieDetails> details;
std::string domain("chromium.org");
- string16 name(base::SysNSStringToUTF16(@"wicked_name"));
- string16 desc(base::SysNSStringToUTF16(@"desc"));
+ base::string16 name(base::SysNSStringToUTF16(@"wicked_name"));
+ base::string16 desc(base::SysNSStringToUTF16(@"desc"));
details.reset([[CocoaCookieDetails alloc] initWithDatabase:domain
databaseName:name
databaseDescription:desc
@@ -191,8 +191,8 @@ TEST_F(CookiesDetailsTest, CreateForPromptDatabase) {
TEST_F(CookiesDetailsTest, CreateForPromptLocalStorage) {
base::scoped_nsobject<CocoaCookieDetails> details;
std::string domain("chromium.org");
- string16 key(base::SysNSStringToUTF16(@"testKey"));
- string16 value(base::SysNSStringToUTF16(@"testValue"));
+ base::string16 key(base::SysNSStringToUTF16(@"testKey"));
+ base::string16 value(base::SysNSStringToUTF16(@"testValue"));
details.reset([[CocoaCookieDetails alloc] initWithLocalStorage:domain
key:key
value:value]);
diff --git a/chrome/browser/ui/cocoa/content_settings/cookie_details_view_controller_unittest.mm b/chrome/browser/ui/cocoa/content_settings/cookie_details_view_controller_unittest.mm
index c901c71..789e64f 100644
--- a/chrome/browser/ui/cocoa/content_settings/cookie_details_view_controller_unittest.mm
+++ b/chrome/browser/ui/cocoa/content_settings/cookie_details_view_controller_unittest.mm
@@ -35,8 +35,8 @@ static CookiePromptContentDetailsAdapter* CreateCookieTestContent(
static CocoaCookieDetails* CreateTestDatabaseDetails() {
std::string domain("chromium.org");
- string16 name(base::SysNSStringToUTF16(@"wicked_name"));
- string16 desc(base::SysNSStringToUTF16(@"wicked_desc"));
+ base::string16 name(base::SysNSStringToUTF16(@"wicked_name"));
+ base::string16 desc(base::SysNSStringToUTF16(@"wicked_desc"));
CocoaCookieDetails* details = [CocoaCookieDetails alloc];
[details initWithDatabase:domain
databaseName:name
diff --git a/chrome/browser/ui/cocoa/download/download_item_cell.mm b/chrome/browser/ui/cocoa/download/download_item_cell.mm
index bb18147..6f54fe0 100644
--- a/chrome/browser/ui/cocoa/download/download_item_cell.mm
+++ b/chrome/browser/ui/cocoa/download/download_item_cell.mm
@@ -185,7 +185,7 @@ using content::DownloadItem;
// Set the name of the download.
downloadPath_ = downloadModel->download()->GetFileNameToReportUser();
- string16 statusText = downloadModel->GetStatusText();
+ base::string16 statusText = downloadModel->GetStatusText();
if (statusText.empty()) {
// Remove the status text label.
[self hideSecondaryTitle];
diff --git a/chrome/browser/ui/cocoa/download/download_item_controller.mm b/chrome/browser/ui/cocoa/download/download_item_controller.mm
index f5e3cb5..5bc66cc 100644
--- a/chrome/browser/ui/cocoa/download/download_item_controller.mm
+++ b/chrome/browser/ui/cocoa/download/download_item_controller.mm
@@ -260,7 +260,7 @@ class DownloadShelfContextMenuMac : public DownloadShelfContextMenu {
}
- (void)updateToolTip {
- string16 tooltip_text =
+ base::string16 tooltip_text =
bridge_->download_model()->GetTooltipText(*font_list_, kToolTipMaxWidth);
[progressView_ setToolTip:base::SysUTF16ToNSString(tooltip_text)];
}
diff --git a/chrome/browser/ui/cocoa/external_protocol_dialog.mm b/chrome/browser/ui/cocoa/external_protocol_dialog.mm
index d4aacba..5525925 100644
--- a/chrome/browser/ui/cocoa/external_protocol_dialog.mm
+++ b/chrome/browser/ui/cocoa/external_protocol_dialog.mm
@@ -44,7 +44,7 @@ void ExternalProtocolHandler::RunExternalProtocolDialog(
url_ = *url;
creation_time_ = base::Time::Now();
- string16 appName = [self appNameForProtocol];
+ base::string16 appName = [self appNameForProtocol];
if (appName.length() == 0) {
// No registered apps for this protocol; give up and go home.
[self autorelease];
@@ -64,7 +64,7 @@ void ExternalProtocolHandler::RunExternalProtocolDialog(
IDS_EXTERNAL_PROTOCOL_CANCEL_BUTTON_TEXT)];
const int kMaxUrlWithoutSchemeSize = 256;
- string16 elided_url_without_scheme;
+ base::string16 elided_url_without_scheme;
gfx::ElideString(ASCIIToUTF16(url_.possibly_invalid_spec()),
kMaxUrlWithoutSchemeSize, &elided_url_without_scheme);
@@ -143,7 +143,7 @@ void ExternalProtocolHandler::RunExternalProtocolDialog(
&openingApp);
if (status != noErr) {
// likely kLSApplicationNotFoundErr
- return string16();
+ return base::string16();
}
NSString* appPath = [(NSURL*)openingApp path];
CFRelease(openingApp); // NOT A BUG; LSGetApplicationForURL retains for us
diff --git a/chrome/browser/ui/cocoa/global_error_bubble_controller.mm b/chrome/browser/ui/cocoa/global_error_bubble_controller.mm
index d053972..551abe9 100644
--- a/chrome/browser/ui/cocoa/global_error_bubble_controller.mm
+++ b/chrome/browser/ui/cocoa/global_error_bubble_controller.mm
@@ -88,7 +88,7 @@ class Bridge : public GlobalErrorBubbleViewBase {
[title_ setStringValue:SysUTF16ToNSString(error_->GetBubbleViewTitle())];
std::vector<string16> messages = error_->GetBubbleViewMessages();
- string16 message = JoinString(messages, '\n');
+ base::string16 message = JoinString(messages, '\n');
base::scoped_nsobject<NSMutableAttributedString> messageValue(
[[NSMutableAttributedString alloc]
@@ -104,7 +104,7 @@ class Bridge : public GlobalErrorBubbleViewBase {
[acceptButton_ setTitle:
SysUTF16ToNSString(error_->GetBubbleViewAcceptButtonLabel())];
- string16 cancelLabel = error_->GetBubbleViewCancelButtonLabel();
+ base::string16 cancelLabel = error_->GetBubbleViewCancelButtonLabel();
if (cancelLabel.empty())
[cancelButton_ setHidden:YES];
else
diff --git a/chrome/browser/ui/cocoa/history_menu_bridge.h b/chrome/browser/ui/cocoa/history_menu_bridge.h
index 2ab76ed1..91e79af 100644
--- a/chrome/browser/ui/cocoa/history_menu_bridge.h
+++ b/chrome/browser/ui/cocoa/history_menu_bridge.h
@@ -71,7 +71,7 @@ class HistoryMenuBridge : public content::NotificationObserver,
~HistoryItem();
// The title for the menu item.
- string16 title;
+ base::string16 title;
// The URL that will be navigated to if the user selects this item.
GURL url;
// Favicon for the URL.
diff --git a/chrome/browser/ui/cocoa/history_menu_bridge.mm b/chrome/browser/ui/cocoa/history_menu_bridge.mm
index d206e8e..1da19c9 100644
--- a/chrome/browser/ui/cocoa/history_menu_bridge.mm
+++ b/chrome/browser/ui/cocoa/history_menu_bridge.mm
@@ -349,7 +349,7 @@ NSMenuItem* HistoryMenuBridge::AddItemToMenu(HistoryItem* item,
title = base::SysUTF8ToNSString(url_string);
NSString* full_title = title;
if ([title length] > kMaximumMenuWidthInChars) {
- // TODO(rsesek): use app/text_elider.h once it uses string16 and can
+ // TODO(rsesek): use app/text_elider.h once it uses base::string16 and can
// take out the middle of strings.
title = [NSString stringWithFormat:@"%@…%@",
[title substringToIndex:kMenuTrimSizeInChars],
@@ -402,7 +402,7 @@ void HistoryMenuBridge::CreateMenu() {
options.SetRecentDayRange(kVisitedScope);
history_service_->QueryHistory(
- string16(),
+ base::string16(),
options,
&cancelable_request_consumer_,
base::Bind(&HistoryMenuBridge::OnVisitedHistoryResults,
diff --git a/chrome/browser/ui/cocoa/history_menu_bridge_unittest.mm b/chrome/browser/ui/cocoa/history_menu_bridge_unittest.mm
index 12920f7..e5779ee 100644
--- a/chrome/browser/ui/cocoa/history_menu_bridge_unittest.mm
+++ b/chrome/browser/ui/cocoa/history_menu_bridge_unittest.mm
@@ -85,7 +85,7 @@ class HistoryMenuBridgeTest : public CocoaProfileTest {
return item;
}
- HistoryMenuBridge::HistoryItem* CreateItem(const string16& title) {
+ HistoryMenuBridge::HistoryItem* CreateItem(const base::string16& title) {
HistoryMenuBridge::HistoryItem* item =
new HistoryMenuBridge::HistoryItem();
item->title = title;
@@ -175,8 +175,8 @@ TEST_F(HistoryMenuBridgeTest, ClearHistoryMenuEmpty) {
TEST_F(HistoryMenuBridgeTest, AddItemToMenu) {
NSMenu* menu = [[[NSMenu alloc] initWithTitle:@"history foo"] autorelease];
- const string16 short_url = ASCIIToUTF16("http://foo/");
- const string16 long_url = ASCIIToUTF16("http://super-duper-long-url--."
+ const base::string16 short_url = ASCIIToUTF16("http://foo/");
+ const base::string16 long_url = ASCIIToUTF16("http://super-duper-long-url--."
"that.cannot.possibly.fit.even-in-80-columns"
"or.be.reasonably-displayed-in-a-menu"
"without.looking-ridiculous.com/"); // 140 chars total
diff --git a/chrome/browser/ui/cocoa/hung_renderer_controller.mm b/chrome/browser/ui/cocoa/hung_renderer_controller.mm
index 01b1ef9..cf314dc 100644
--- a/chrome/browser/ui/cocoa/hung_renderer_controller.mm
+++ b/chrome/browser/ui/cocoa/hung_renderer_controller.mm
@@ -179,7 +179,7 @@ class WebContentsObserverBridge : public content::WebContentsObserver {
base::scoped_nsobject<NSMutableArray> favicons([[NSMutableArray alloc] init]);
for (TabContentsIterator it; !it.done(); it.Next()) {
if (it->GetRenderProcessHost() == hungContents_->GetRenderProcessHost()) {
- string16 title = it->GetTitle();
+ base::string16 title = it->GetTitle();
if (title.empty())
title = CoreTabHelper::GetDefaultTitle();
[titles addObject:base::SysUTF16ToNSString(title)];
diff --git a/chrome/browser/ui/cocoa/infobars/alternate_nav_infobar_controller.mm b/chrome/browser/ui/cocoa/infobars/alternate_nav_infobar_controller.mm
index 3d0be70..6a7585f 100644
--- a/chrome/browser/ui/cocoa/infobars/alternate_nav_infobar_controller.mm
+++ b/chrome/browser/ui/cocoa/infobars/alternate_nav_infobar_controller.mm
@@ -27,9 +27,9 @@
AlternateNavInfoBarDelegate* delegate =
static_cast<AlternateNavInfoBarDelegate*>([self delegate]);
DCHECK(delegate);
- size_t offset = string16::npos;
- string16 message = delegate->GetMessageTextWithOffset(&offset);
- string16 link = delegate->GetLinkText();
+ size_t offset = base::string16::npos;
+ base::string16 message = delegate->GetMessageTextWithOffset(&offset);
+ base::string16 link = delegate->GetLinkText();
NSFont* font = [NSFont labelFontOfSize:
[NSFont systemFontSizeForControlSize:NSRegularControlSize]];
HyperlinkTextView* view = (HyperlinkTextView*)label_.get();
diff --git a/chrome/browser/ui/cocoa/infobars/before_translate_infobar_controller.mm b/chrome/browser/ui/cocoa/infobars/before_translate_infobar_controller.mm
index fb1af15..cec81f5 100644
--- a/chrome/browser/ui/cocoa/infobars/before_translate_infobar_controller.mm
+++ b/chrome/browser/ui/cocoa/infobars/before_translate_infobar_controller.mm
@@ -15,8 +15,8 @@ using InfoBarUtilities::VerifyControlOrderAndSpacing;
namespace {
NSButton* CreateNSButtonWithResourceIDAndParameter(
- int resourceId, const string16& param) {
- string16 title = l10n_util::GetStringFUTF16(resourceId, param);
+ int resourceId, const base::string16& param) {
+ base::string16 title = l10n_util::GetStringFUTF16(resourceId, param);
NSButton* button = [[NSButton alloc] init];
[button setTitle:base::SysUTF16ToNSString(title)];
[button setBezelStyle:NSTexturedRoundedBezelStyle];
@@ -46,7 +46,7 @@ NSButton* CreateNSButtonWithResourceIDAndParameter(
- (void)initializeExtraControls {
TranslateInfoBarDelegate* delegate = [self delegate];
- const string16& language =
+ const base::string16& language =
delegate->language_name_at(delegate->original_language_index());
neverTranslateButton_.reset(
CreateNSButtonWithResourceIDAndParameter(
@@ -80,9 +80,9 @@ NSButton* CreateNSButtonWithResourceIDAndParameter(
- (void)loadLabelText {
size_t offset = 0;
- string16 text =
+ base::string16 text =
l10n_util::GetStringFUTF16(IDS_TRANSLATE_INFOBAR_BEFORE_MESSAGE,
- string16(), &offset);
+ base::string16(), &offset);
NSString* string1 = base::SysUTF16ToNSString(text.substr(0, offset));
NSString* string2 = base::SysUTF16ToNSString(text.substr(offset));
[label1_ setStringValue:string1];
diff --git a/chrome/browser/ui/cocoa/infobars/confirm_infobar_controller.mm b/chrome/browser/ui/cocoa/infobars/confirm_infobar_controller.mm
index 99c34bb..4a771ac 100644
--- a/chrome/browser/ui/cocoa/infobars/confirm_infobar_controller.mm
+++ b/chrome/browser/ui/cocoa/infobars/confirm_infobar_controller.mm
@@ -107,7 +107,7 @@
// Set the text and link.
NSString* message = base::SysUTF16ToNSString(delegate->GetMessageText());
- string16 link = delegate->GetLinkText();
+ base::string16 link = delegate->GetLinkText();
if (!link.empty()) {
// Add spacing between the label and the link.
message = [message stringByAppendingString:@" "];
diff --git a/chrome/browser/ui/cocoa/infobars/mock_confirm_infobar_delegate.cc b/chrome/browser/ui/cocoa/infobars/mock_confirm_infobar_delegate.cc
index f772168..7686a26 100644
--- a/chrome/browser/ui/cocoa/infobars/mock_confirm_infobar_delegate.cc
+++ b/chrome/browser/ui/cocoa/infobars/mock_confirm_infobar_delegate.cc
@@ -52,7 +52,7 @@ bool MockConfirmInfoBarDelegate::Cancel() {
string16 MockConfirmInfoBarDelegate::GetLinkText() const {
link_text_accessed_ = true;
- return string16();
+ return base::string16();
}
bool MockConfirmInfoBarDelegate::LinkClicked(
diff --git a/chrome/browser/ui/cocoa/infobars/mock_confirm_infobar_delegate.h b/chrome/browser/ui/cocoa/infobars/mock_confirm_infobar_delegate.h
index 4df1112..1051b1a 100644
--- a/chrome/browser/ui/cocoa/infobars/mock_confirm_infobar_delegate.h
+++ b/chrome/browser/ui/cocoa/infobars/mock_confirm_infobar_delegate.h
@@ -37,11 +37,11 @@ class MockConfirmInfoBarDelegate : public ConfirmInfoBarDelegate {
private:
// ConfirmInfoBarDelegate:
virtual int GetIconID() const OVERRIDE;
- virtual string16 GetMessageText() const OVERRIDE;
- virtual string16 GetButtonLabel(InfoBarButton button) const OVERRIDE;
+ virtual base::string16 GetMessageText() const OVERRIDE;
+ virtual base::string16 GetButtonLabel(InfoBarButton button) const OVERRIDE;
virtual bool Accept() OVERRIDE;
virtual bool Cancel() OVERRIDE;
- virtual string16 GetLinkText() const OVERRIDE;
+ virtual base::string16 GetLinkText() const OVERRIDE;
virtual bool LinkClicked(WindowOpenDisposition disposition) OVERRIDE;
Owner* owner_;
diff --git a/chrome/browser/ui/cocoa/infobars/translate_message_infobar_controller.mm b/chrome/browser/ui/cocoa/infobars/translate_message_infobar_controller.mm
index d210d21..53e0a61 100644
--- a/chrome/browser/ui/cocoa/infobars/translate_message_infobar_controller.mm
+++ b/chrome/browser/ui/cocoa/infobars/translate_message_infobar_controller.mm
@@ -17,7 +17,7 @@ using InfoBarUtilities::MoveControl;
label1_, translateMessageButton_, spaceBetweenControls_ * 2, true);
TranslateInfoBarDelegate* delegate = [self delegate];
if ([self delegate]->ShouldShowMessageInfoBarButton()) {
- string16 buttonText = delegate->GetMessageInfoBarButtonText();
+ base::string16 buttonText = delegate->GetMessageInfoBarButtonText();
[translateMessageButton_ setTitle:base::SysUTF16ToNSString(buttonText)];
[translateMessageButton_ sizeToFit];
}
@@ -37,7 +37,7 @@ using InfoBarUtilities::MoveControl;
- (void)loadLabelText {
TranslateInfoBarDelegate* delegate = [self delegate];
- string16 messageText = delegate->GetMessageInfoBarText();
+ base::string16 messageText = delegate->GetMessageInfoBarText();
NSString* string1 = base::SysUTF16ToNSString(messageText);
[label1_ setStringValue:string1];
}
diff --git a/chrome/browser/ui/cocoa/keystone_infobar_delegate.mm b/chrome/browser/ui/cocoa/keystone_infobar_delegate.mm
index b25ab67..8641d26 100644
--- a/chrome/browser/ui/cocoa/keystone_infobar_delegate.mm
+++ b/chrome/browser/ui/cocoa/keystone_infobar_delegate.mm
@@ -53,8 +53,8 @@ class KeystonePromotionInfoBarDelegate : public ConfirmInfoBarDelegate {
// ConfirmInfoBarDelegate
virtual int GetIconID() const OVERRIDE;
- virtual string16 GetMessageText() const OVERRIDE;
- virtual string16 GetButtonLabel(InfoBarButton button) const OVERRIDE;
+ virtual base::string16 GetMessageText() const OVERRIDE;
+ virtual base::string16 GetButtonLabel(InfoBarButton button) const OVERRIDE;
virtual bool Accept() OVERRIDE;
virtual bool Cancel() OVERRIDE;
virtual bool ShouldExpireInternal(
diff --git a/chrome/browser/ui/cocoa/location_bar/keyword_hint_decoration.h b/chrome/browser/ui/cocoa/location_bar/keyword_hint_decoration.h
index cd218e8..0342bc3 100644
--- a/chrome/browser/ui/cocoa/location_bar/keyword_hint_decoration.h
+++ b/chrome/browser/ui/cocoa/location_bar/keyword_hint_decoration.h
@@ -21,7 +21,7 @@ class KeywordHintDecoration : public LocationBarDecoration {
// Calculates the message to display and where to place the [tab]
// image.
- void SetKeyword(const string16& keyword, bool is_extension_keyword);
+ void SetKeyword(const base::string16& keyword, bool is_extension_keyword);
// Implement |LocationBarDecoration|.
virtual void DrawInFrame(NSRect frame, NSView* control_view) OVERRIDE;
diff --git a/chrome/browser/ui/cocoa/location_bar/keyword_hint_decoration.mm b/chrome/browser/ui/cocoa/location_bar/keyword_hint_decoration.mm
index 340f7e4..f8fb800 100644
--- a/chrome/browser/ui/cocoa/location_bar/keyword_hint_decoration.mm
+++ b/chrome/browser/ui/cocoa/location_bar/keyword_hint_decoration.mm
@@ -30,8 +30,8 @@ const CGFloat kHintAvailableRatio = 2.0 / 3.0;
// Helper to convert |s| to an |NSString|, trimming whitespace at
// ends.
-NSString* TrimAndConvert(const string16& s) {
- string16 output;
+NSString* TrimAndConvert(const base::string16& s) {
+ base::string16 output;
TrimWhitespace(s, TRIM_ALL, &output);
return base::SysUTF16ToNSString(output);
}
@@ -56,7 +56,7 @@ NSImage* KeywordHintDecoration::GetHintImage() {
return hint_image_;
}
-void KeywordHintDecoration::SetKeyword(const string16& short_name,
+void KeywordHintDecoration::SetKeyword(const base::string16& short_name,
bool is_extension_keyword) {
// KEYWORD_HINT is a message like "Press [tab] to search <site>".
// [tab] is a parameter to be replaced by an image. "<site>" is
@@ -64,9 +64,9 @@ void KeywordHintDecoration::SetKeyword(const string16& short_name,
std::vector<size_t> content_param_offsets;
int message_id = is_extension_keyword ?
IDS_OMNIBOX_EXTENSION_KEYWORD_HINT : IDS_OMNIBOX_KEYWORD_HINT;
- const string16 keyword_hint(
+ const base::string16 keyword_hint(
l10n_util::GetStringFUTF16(message_id,
- string16(), short_name,
+ base::string16(), short_name,
&content_param_offsets));
// Should always be 2 offsets, see the comment in
diff --git a/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h b/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h
index c856b5f..ba11001 100644
--- a/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h
+++ b/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h
@@ -143,7 +143,7 @@ class LocationBarViewMac : public LocationBar,
virtual ToolbarModel* GetToolbarModel() OVERRIDE;
virtual const ToolbarModel* GetToolbarModel() const OVERRIDE;
- NSImage* GetKeywordImage(const string16& keyword);
+ NSImage* GetKeywordImage(const base::string16& keyword);
AutocompleteTextField* GetAutocompleteTextField() { return field_; }
diff --git a/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm b/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm
index 4d2457a..e51ae5a 100644
--- a/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm
+++ b/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm
@@ -384,8 +384,8 @@ void LocationBarViewMac::Layout() {
keyword_hint_decoration_->SetVisible(false);
// Get the keyword to use for keyword-search and hinting.
- const string16 keyword = omnibox_view_->model()->keyword();
- string16 short_name;
+ const base::string16 keyword = omnibox_view_->model()->keyword();
+ base::string16 short_name;
bool is_extension_keyword = false;
if (!keyword.empty()) {
short_name = TemplateURLServiceFactory::GetForProfile(profile_)->
@@ -405,7 +405,7 @@ void LocationBarViewMac::Layout() {
location_icon_decoration_->SetVisible(false);
ev_bubble_decoration_->SetVisible(true);
- string16 label(GetToolbarModel()->GetEVCertName());
+ base::string16 label(GetToolbarModel()->GetEVCertName());
ev_bubble_decoration_->SetFullLabel(base::SysUTF16ToNSString(label));
} else if (!keyword.empty() && is_keyword_hint) {
keyword_hint_decoration_->SetKeyword(short_name,
@@ -544,7 +544,7 @@ const ToolbarModel* LocationBarViewMac::GetToolbarModel() const {
return browser_->toolbar_model();
}
-NSImage* LocationBarViewMac::GetKeywordImage(const string16& keyword) {
+NSImage* LocationBarViewMac::GetKeywordImage(const base::string16& keyword) {
const TemplateURL* template_url = TemplateURLServiceFactory::GetForProfile(
profile_)->GetTemplateURLForKeyword(keyword);
if (template_url &&
diff --git a/chrome/browser/ui/cocoa/location_bar/selected_keyword_decoration.h b/chrome/browser/ui/cocoa/location_bar/selected_keyword_decoration.h
index 96b6d13..9c6abf1 100644
--- a/chrome/browser/ui/cocoa/location_bar/selected_keyword_decoration.h
+++ b/chrome/browser/ui/cocoa/location_bar/selected_keyword_decoration.h
@@ -19,7 +19,7 @@ class SelectedKeywordDecoration : public BubbleDecoration {
// Calculates appropriate full and partial label strings based on
// inputs.
- void SetKeyword(const string16& keyword, bool is_extension_keyword);
+ void SetKeyword(const base::string16& keyword, bool is_extension_keyword);
// Determines what combination of labels and image will best fit
// within |width|, makes those current for |BubbleDecoration|, and
diff --git a/chrome/browser/ui/cocoa/location_bar/selected_keyword_decoration.mm b/chrome/browser/ui/cocoa/location_bar/selected_keyword_decoration.mm
index e7d654f..a19a477 100644
--- a/chrome/browser/ui/cocoa/location_bar/selected_keyword_decoration.mm
+++ b/chrome/browser/ui/cocoa/location_bar/selected_keyword_decoration.mm
@@ -53,9 +53,10 @@ ui::NinePartImageIds SelectedKeywordDecoration::GetBubbleImageIds() {
};
}
-void SelectedKeywordDecoration::SetKeyword(const string16& short_name,
+void SelectedKeywordDecoration::SetKeyword(const base::string16& short_name,
bool is_extension_keyword) {
- const string16 min_name(location_bar_util::CalculateMinString(short_name));
+ const base::string16 min_name(
+ location_bar_util::CalculateMinString(short_name));
NSString* full_string = is_extension_keyword ?
base::SysUTF16ToNSString(short_name) :
l10n_util::GetNSStringF(IDS_OMNIBOX_KEYWORD_TEXT, short_name);
diff --git a/chrome/browser/ui/cocoa/location_bar/selected_keyword_decoration_unittest.mm b/chrome/browser/ui/cocoa/location_bar/selected_keyword_decoration_unittest.mm
index 3c5ab03..e850e9d 100644
--- a/chrome/browser/ui/cocoa/location_bar/selected_keyword_decoration_unittest.mm
+++ b/chrome/browser/ui/cocoa/location_bar/selected_keyword_decoration_unittest.mm
@@ -32,7 +32,7 @@ class SelectedKeywordDecorationTest : public CocoaTest {
// not enough room.
TEST_F(SelectedKeywordDecorationTest, UsesPartialKeywordIfNarrow) {
- const string16 kKeyword = ASCIIToUTF16("Engine");
+ const base::string16 kKeyword = ASCIIToUTF16("Engine");
NSString* const kFullString = @"Search Engine:";
NSString* const kPartialString = @"Search En\u2026:"; // ellipses
diff --git a/chrome/browser/ui/cocoa/location_bar/zoom_decoration.mm b/chrome/browser/ui/cocoa/location_bar/zoom_decoration.mm
index 912b17d..0caa1d9 100644
--- a/chrome/browser/ui/cocoa/location_bar/zoom_decoration.mm
+++ b/chrome/browser/ui/cocoa/location_bar/zoom_decoration.mm
@@ -34,7 +34,8 @@ void ZoomDecoration::Update(ZoomController* zoom_controller) {
SetImage(OmniboxViewMac::ImageForResource(
zoom_controller->GetResourceForZoomLevel()));
- string16 zoom_percent = base::IntToString16(zoom_controller->zoom_percent());
+ base::string16 zoom_percent =
+ base::IntToString16(zoom_controller->zoom_percent());
NSString* zoom_string =
l10n_util::GetNSStringFWithFixup(IDS_TOOLTIP_ZOOM, zoom_percent);
tooltip_.reset([zoom_string retain]);
diff --git a/chrome/browser/ui/cocoa/login_prompt_cocoa.mm b/chrome/browser/ui/cocoa/login_prompt_cocoa.mm
index b9a81d4..0b0572a 100644
--- a/chrome/browser/ui/cocoa/login_prompt_cocoa.mm
+++ b/chrome/browser/ui/cocoa/login_prompt_cocoa.mm
@@ -43,8 +43,9 @@ class LoginHandlerMac : public LoginHandler,
}
// LoginModelObserver implementation.
- virtual void OnAutofillDataAvailable(const string16& username,
- const string16& password) OVERRIDE {
+ virtual void OnAutofillDataAvailable(
+ const base::string16& username,
+ const base::string16& password) OVERRIDE {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
[sheet_controller_ autofillLogin:base::SysUTF16ToNSString(username)
@@ -55,7 +56,7 @@ class LoginHandlerMac : public LoginHandler,
// LoginHandler:
virtual void BuildViewForPasswordManager(
PasswordManager* manager,
- const string16& explanation) OVERRIDE {
+ const base::string16& explanation) OVERRIDE {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
sheet_controller_.reset(
@@ -99,8 +100,8 @@ class LoginHandlerMac : public LoginHandler,
sheet_controller_.reset();
}
- void OnLoginPressed(const string16& username,
- const string16& password) {
+ void OnLoginPressed(const base::string16& username,
+ const base::string16& password) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
SetAuth(username, password);
}
diff --git a/chrome/browser/ui/cocoa/media_picker/desktop_media_picker_cocoa.h b/chrome/browser/ui/cocoa/media_picker/desktop_media_picker_cocoa.h
index 62afc09..5ca332a 100644
--- a/chrome/browser/ui/cocoa/media_picker/desktop_media_picker_cocoa.h
+++ b/chrome/browser/ui/cocoa/media_picker/desktop_media_picker_cocoa.h
@@ -19,7 +19,7 @@ class DesktopMediaPickerCocoa : public DesktopMediaPicker {
// Overridden from DesktopMediaPicker:
virtual void Show(gfx::NativeWindow context,
gfx::NativeWindow parent,
- const string16& app_name,
+ const base::string16& app_name,
scoped_ptr<DesktopMediaList> media_list,
const DoneCallback& done_callback) OVERRIDE;
diff --git a/chrome/browser/ui/cocoa/media_picker/desktop_media_picker_cocoa.mm b/chrome/browser/ui/cocoa/media_picker/desktop_media_picker_cocoa.mm
index 1b31516..57d3b32 100644
--- a/chrome/browser/ui/cocoa/media_picker/desktop_media_picker_cocoa.mm
+++ b/chrome/browser/ui/cocoa/media_picker/desktop_media_picker_cocoa.mm
@@ -14,7 +14,7 @@ DesktopMediaPickerCocoa::~DesktopMediaPickerCocoa() {
void DesktopMediaPickerCocoa::Show(gfx::NativeWindow context,
gfx::NativeWindow parent,
- const string16& app_name,
+ const base::string16& app_name,
scoped_ptr<DesktopMediaList> media_list,
const DoneCallback& done_callback) {
controller_.reset(
diff --git a/chrome/browser/ui/cocoa/media_picker/desktop_media_picker_controller.h b/chrome/browser/ui/cocoa/media_picker/desktop_media_picker_controller.h
index 4ad9883c..0d37bfe8 100644
--- a/chrome/browser/ui/cocoa/media_picker/desktop_media_picker_controller.h
+++ b/chrome/browser/ui/cocoa/media_picker/desktop_media_picker_controller.h
@@ -55,7 +55,7 @@
// |appName| will be used to format the dialog's title and the label.
- (id)initWithMediaList:(scoped_ptr<DesktopMediaList>)media_list
callback:(const DesktopMediaPicker::DoneCallback&)callback
- appName:(const string16&)appName;
+ appName:(const base::string16&)appName;
@end
diff --git a/chrome/browser/ui/cocoa/media_picker/desktop_media_picker_controller.mm b/chrome/browser/ui/cocoa/media_picker/desktop_media_picker_controller.mm
index 31342a6..fb16902 100644
--- a/chrome/browser/ui/cocoa/media_picker/desktop_media_picker_controller.mm
+++ b/chrome/browser/ui/cocoa/media_picker/desktop_media_picker_controller.mm
@@ -32,7 +32,7 @@ const int kExcessButtonPadding = 6;
@interface DesktopMediaPickerController (Private)
// Populate the window with controls and views.
-- (void)initializeContentsWithAppName:(const string16&)appName;
+- (void)initializeContentsWithAppName:(const base::string16&)appName;
// Create a |NSTextField| with label traits given |width|. Frame height is
// automatically adjusted to fit.
@@ -56,7 +56,7 @@ const int kExcessButtonPadding = 6;
- (id)initWithMediaList:(scoped_ptr<DesktopMediaList>)media_list
callback:(const DesktopMediaPicker::DoneCallback&)callback
- appName:(const string16&)appName {
+ appName:(const base::string16&)appName {
const NSUInteger kStyleMask =
NSTitledWindowMask | NSClosableWindowMask | NSResizableWindowMask;
base::scoped_nsobject<NSWindow> window(
@@ -83,7 +83,7 @@ const int kExcessButtonPadding = 6;
[super dealloc];
}
-- (void)initializeContentsWithAppName:(const string16&)appName {
+- (void)initializeContentsWithAppName:(const base::string16&)appName {
// Use flipped coordinates to facilitate manual layout.
const CGFloat kPaddedWidth = kInitialContentWidth - (kFramePadding * 2);
base::scoped_nsobject<FlippedView> content(
diff --git a/chrome/browser/ui/cocoa/notifications/balloon_controller_unittest.mm b/chrome/browser/ui/cocoa/notifications/balloon_controller_unittest.mm
index b8f8137..6dfea68 100644
--- a/chrome/browser/ui/cocoa/notifications/balloon_controller_unittest.mm
+++ b/chrome/browser/ui/cocoa/notifications/balloon_controller_unittest.mm
@@ -79,7 +79,7 @@ class BalloonControllerTest : public ChromeRenderViewHostTestHarness {
TEST_F(BalloonControllerTest, ShowAndCloseTest) {
Notification n(GURL("http://www.google.com"), GURL("http://www.google.com"),
- ASCIIToUTF16("http://www.google.com"), string16(),
+ ASCIIToUTF16("http://www.google.com"), base::string16(),
new NotificationObjectProxy(-1, -1, -1, false));
scoped_ptr<Balloon> balloon(
new Balloon(n, profile(), collection_.get()));
@@ -95,7 +95,7 @@ TEST_F(BalloonControllerTest, ShowAndCloseTest) {
TEST_F(BalloonControllerTest, SizesTest) {
Notification n(GURL("http://www.google.com"), GURL("http://www.google.com"),
- ASCIIToUTF16("http://www.google.com"), string16(),
+ ASCIIToUTF16("http://www.google.com"), base::string16(),
new NotificationObjectProxy(-1, -1, -1, false));
scoped_ptr<Balloon> balloon(
new Balloon(n, profile(), collection_.get()));
diff --git a/chrome/browser/ui/cocoa/notifications/message_center_tray_bridge.mm b/chrome/browser/ui/cocoa/notifications/message_center_tray_bridge.mm
index acb9edc..b266e8c 100644
--- a/chrome/browser/ui/cocoa/notifications/message_center_tray_bridge.mm
+++ b/chrome/browser/ui/cocoa/notifications/message_center_tray_bridge.mm
@@ -100,7 +100,7 @@ void MessageCenterTrayBridge::UpdateStatusItem() {
[status_item_view_ setUnreadCount:unread_count withQuietMode:quiet_mode];
if (unread_count > 0) {
- string16 unread_count_string = base::FormatNumber(unread_count);
+ base::string16 unread_count_string = base::FormatNumber(unread_count);
[status_item_view_ setToolTip:
l10n_util::GetNSStringF(IDS_MESSAGE_CENTER_TOOLTIP_UNREAD,
unread_count_string)];
diff --git a/chrome/browser/ui/cocoa/notifications/message_center_tray_bridge_unittest.mm b/chrome/browser/ui/cocoa/notifications/message_center_tray_bridge_unittest.mm
index e8755f7..62cabb8 100644
--- a/chrome/browser/ui/cocoa/notifications/message_center_tray_bridge_unittest.mm
+++ b/chrome/browser/ui/cocoa/notifications/message_center_tray_bridge_unittest.mm
@@ -50,7 +50,7 @@ TEST_F(MessageCenterTrayBridgeTest, StatusItemOnlyAfterFirstNotification) {
ASCIIToUTF16("First notification"),
ASCIIToUTF16("This is a simple test."),
gfx::Image(),
- string16(),
+ base::string16(),
message_center::NotifierId(),
data,
NULL));
diff --git a/chrome/browser/ui/cocoa/omnibox/omnibox_popup_view_mac.h b/chrome/browser/ui/cocoa/omnibox/omnibox_popup_view_mac.h
index da3b545..c14872b 100644
--- a/chrome/browser/ui/cocoa/omnibox/omnibox_popup_view_mac.h
+++ b/chrome/browser/ui/cocoa/omnibox/omnibox_popup_view_mac.h
@@ -60,7 +60,7 @@ class OmniboxPopupViewMac : public OmniboxPopupView,
// Applies the given font and colors to the match string based on
// classifications.
static NSMutableAttributedString* DecorateMatchedString(
- const string16& match_string,
+ const base::string16& match_string,
const AutocompleteMatch::ACMatchClassifications& classifications,
NSColor* text_color,
NSColor* dim_text_color,
@@ -74,7 +74,7 @@ class OmniboxPopupViewMac : public OmniboxPopupView,
// cleaner.
static NSMutableAttributedString* ElideString(
NSMutableAttributedString* a_string,
- const string16& original_string,
+ const base::string16& original_string,
const gfx::Font& font,
const float cell_width);
diff --git a/chrome/browser/ui/cocoa/omnibox/omnibox_popup_view_mac.mm b/chrome/browser/ui/cocoa/omnibox/omnibox_popup_view_mac.mm
index d1f302b..17678d2 100644
--- a/chrome/browser/ui/cocoa/omnibox/omnibox_popup_view_mac.mm
+++ b/chrome/browser/ui/cocoa/omnibox/omnibox_popup_view_mac.mm
@@ -246,7 +246,7 @@ NSAttributedString* OmniboxPopupViewMac::MatchText(
// static
NSMutableAttributedString* OmniboxPopupViewMac::DecorateMatchedString(
- const string16& match_string,
+ const base::string16& match_string,
const AutocompleteMatch::ACMatchClassifications& classifications,
NSColor* text_color,
NSColor* dim_text_color,
@@ -311,7 +311,7 @@ NSMutableAttributedString* OmniboxPopupViewMac::DecorateMatchedString(
NSMutableAttributedString* OmniboxPopupViewMac::ElideString(
NSMutableAttributedString* a_string,
- const string16& original_string,
+ const base::string16& original_string,
const gfx::Font& font,
const float width) {
// If it already fits, nothing to be done.
@@ -320,7 +320,7 @@ NSMutableAttributedString* OmniboxPopupViewMac::ElideString(
}
// If ElideText() decides to do nothing, nothing to be done.
- const string16 elided =
+ const base::string16 elided =
gfx::ElideText(original_string, font, width, gfx::ELIDE_AT_END);
if (0 == elided.compare(original_string)) {
return a_string;
diff --git a/chrome/browser/ui/cocoa/omnibox/omnibox_popup_view_mac_unittest.mm b/chrome/browser/ui/cocoa/omnibox/omnibox_popup_view_mac_unittest.mm
index 0b267de..062f0f5 100644
--- a/chrome/browser/ui/cocoa/omnibox/omnibox_popup_view_mac_unittest.mm
+++ b/chrome/browser/ui/cocoa/omnibox/omnibox_popup_view_mac_unittest.mm
@@ -76,8 +76,8 @@ bool RunHasFontTrait(NSAttributedString* string,
// AutocompleteMatch doesn't really have the right constructor for our
// needs. Fake one for us to use.
-AutocompleteMatch MakeMatch(const string16& contents,
- const string16& description) {
+AutocompleteMatch MakeMatch(const base::string16& contents,
+ const base::string16& description) {
AutocompleteMatch m(NULL, 1, true, AutocompleteMatchType::URL_WHAT_YOU_TYPED);
m.contents = contents;
m.description = description;
@@ -373,7 +373,7 @@ TEST_F(OmniboxPopupViewMacTest, MatchTextContentsMatch) {
EXPECT_EQ(run_length_1 + run_length_2 + run_length_3, [contents length]);
AutocompleteMatch m = MakeMatch(base::SysNSStringToUTF16(contents),
- string16());
+ base::string16());
// Push each run onto contents classifications.
m.contents_class.push_back(
@@ -467,7 +467,7 @@ TEST_F(OmniboxPopupViewMacTest, MatchTextDescriptionMatch) {
TEST_F(OmniboxPopupViewMacTest, ElideString) {
NSString* const contents = @"This is a test with long contents";
- const string16 contents16(base::SysNSStringToUTF16(contents));
+ const base::string16 contents16(base::SysNSStringToUTF16(contents));
const float kWide = 1000.0;
const float kNarrow = 20.0;
@@ -487,7 +487,7 @@ TEST_F(OmniboxPopupViewMacTest, ElideString) {
// When elided, result is the same as ElideText().
ret = OmniboxPopupViewMac::ElideString(as, contents16, font_, kNarrow);
- string16 elided =
+ base::string16 elided =
gfx::ElideText(contents16, font_, kNarrow, gfx::ELIDE_AT_END);
EXPECT_TRUE(ret == as);
EXPECT_FALSE([[as string] isEqualToString:contents]);
diff --git a/chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.h b/chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.h
index b76cba2..becf719 100644
--- a/chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.h
+++ b/chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.h
@@ -32,16 +32,17 @@ class OmniboxViewMac : public OmniboxView,
virtual void SaveStateToTab(content::WebContents* tab) OVERRIDE;
virtual void OnTabChanged(const content::WebContents* web_contents) OVERRIDE;
virtual void Update() OVERRIDE;
- virtual string16 GetText() const OVERRIDE;
- virtual void SetWindowTextAndCaretPos(const string16& text,
+ virtual base::string16 GetText() const OVERRIDE;
+ virtual void SetWindowTextAndCaretPos(const base::string16& text,
size_t caret_pos,
bool update_popup,
bool notify_text_changed) OVERRIDE;
virtual void SetForcedQuery() OVERRIDE;
virtual bool IsSelectAll() const OVERRIDE;
virtual bool DeleteAtEndPressed() OVERRIDE;
- virtual void GetSelectionBounds(string16::size_type* start,
- string16::size_type* end) const OVERRIDE;
+ virtual void GetSelectionBounds(
+ base::string16::size_type* start,
+ base::string16::size_type* end) const OVERRIDE;
virtual void SelectAll(bool reversed) OVERRIDE;
virtual void RevertAll() OVERRIDE;
virtual void UpdatePopup() OVERRIDE;
@@ -49,19 +50,19 @@ class OmniboxViewMac : public OmniboxView,
virtual void SetFocus() OVERRIDE;
virtual void ApplyCaretVisibility() OVERRIDE;
virtual void OnTemporaryTextMaybeChanged(
- const string16& display_text,
+ const base::string16& display_text,
bool save_original_selection,
bool notify_text_changed) OVERRIDE;
virtual bool OnInlineAutocompleteTextMaybeChanged(
- const string16& display_text, size_t user_text_length) OVERRIDE;
+ const base::string16& display_text, size_t user_text_length) OVERRIDE;
virtual void OnInlineAutocompleteTextCleared() OVERRIDE;
virtual void OnRevertTemporaryText() OVERRIDE;
virtual void OnBeforePossibleChange() OVERRIDE;
virtual bool OnAfterPossibleChange() OVERRIDE;
virtual gfx::NativeView GetNativeView() const OVERRIDE;
virtual gfx::NativeView GetRelativeWindowForPopup() const OVERRIDE;
- virtual void SetGrayTextAutocompletion(const string16& input) OVERRIDE;
- virtual string16 GetGrayTextAutocompletion() const OVERRIDE;
+ virtual void SetGrayTextAutocompletion(const base::string16& input) OVERRIDE;
+ virtual base::string16 GetGrayTextAutocompletion() const OVERRIDE;
virtual int TextWidth() const OVERRIDE;
virtual bool IsImeComposing() const OVERRIDE;
@@ -131,14 +132,14 @@ class OmniboxViewMac : public OmniboxView,
// Update the field with |display_text| and highlight the host and scheme (if
// it's an URL or URL-fragment). Resets any suggest text that may be present.
- void SetText(const string16& display_text);
+ void SetText(const base::string16& display_text);
// Internal implementation of SetText. Does not reset the suggest text before
// setting the display text. Most callers should use |SetText()| instead.
- void SetTextInternal(const string16& display_text);
+ void SetTextInternal(const base::string16& display_text);
// Update the field with |display_text| and set the selection.
- void SetTextAndSelectedRange(const string16& display_text,
+ void SetTextAndSelectedRange(const base::string16& display_text,
const NSRange range);
// Pass the current content of |field_| to SetText(), maintaining
@@ -148,7 +149,7 @@ class OmniboxViewMac : public OmniboxView,
// Calculates text attributes according to |display_text| and applies them
// to the given |as| object.
- void ApplyTextAttributes(const string16& display_text,
+ void ApplyTextAttributes(const base::string16& display_text,
NSMutableAttributedString* as);
// Return the number of UTF-16 units in the current buffer, excluding the
@@ -170,7 +171,7 @@ class OmniboxViewMac : public OmniboxView,
// Tracking state before and after a possible change for reporting
// to model_.
NSRange selection_before_change_;
- string16 text_before_change_;
+ base::string16 text_before_change_;
NSRange marked_range_before_change_;
// Was delete pressed?
@@ -179,7 +180,7 @@ class OmniboxViewMac : public OmniboxView,
// Was the delete key pressed with an empty selection at the end of the edit?
bool delete_at_end_pressed_;
- string16 suggest_text_;
+ base::string16 suggest_text_;
DISALLOW_COPY_AND_ASSIGN(OmniboxViewMac);
};
diff --git a/chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.mm b/chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.mm
index 4a5a333..932da71 100644
--- a/chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.mm
+++ b/chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.mm
@@ -224,7 +224,7 @@ void OmniboxViewMac::Update() {
}
}
-string16 OmniboxViewMac::GetText() const {
+base::string16 OmniboxViewMac::GetText() const {
return base::SysNSStringToUTF16([field_ stringValue]);
}
@@ -255,7 +255,7 @@ void OmniboxViewMac::SetSelectedRange(const NSRange range) {
}
}
-void OmniboxViewMac::SetWindowTextAndCaretPos(const string16& text,
+void OmniboxViewMac::SetWindowTextAndCaretPos(const base::string16& text,
size_t caret_pos,
bool update_popup,
bool notify_text_changed) {
@@ -275,7 +275,7 @@ void OmniboxViewMac::SetForcedQuery() {
const base::string16 current_text(GetText());
const size_t start = current_text.find_first_not_of(base::kWhitespaceUTF16);
- if (start == string16::npos || (current_text[start] != '?')) {
+ if (start == base::string16::npos || (current_text[start] != '?')) {
SetUserText(ASCIIToUTF16("?"));
} else {
NSRange range = NSMakeRange(start + 1, current_text.size() - start - 1);
@@ -294,8 +294,8 @@ bool OmniboxViewMac::DeleteAtEndPressed() {
return delete_at_end_pressed_;
}
-void OmniboxViewMac::GetSelectionBounds(string16::size_type* start,
- string16::size_type* end) const {
+void OmniboxViewMac::GetSelectionBounds(base::string16::size_type* start,
+ base::string16::size_type* end) const {
if (![field_ currentEditor]) {
*start = *end = 0;
return;
@@ -359,11 +359,11 @@ void OmniboxViewMac::ApplyCaretVisibility() {
ofView:field_];
}
-void OmniboxViewMac::SetText(const string16& display_text) {
+void OmniboxViewMac::SetText(const base::string16& display_text) {
SetTextInternal(display_text);
}
-void OmniboxViewMac::SetTextInternal(const string16& display_text) {
+void OmniboxViewMac::SetTextInternal(const base::string16& display_text) {
NSString* ss = base::SysUTF16ToNSString(display_text);
NSMutableAttributedString* as =
[[[NSMutableAttributedString alloc] initWithString:ss] autorelease];
@@ -388,7 +388,7 @@ void OmniboxViewMac::SetTextInternal(const string16& display_text) {
// text-field implementation.
}
-void OmniboxViewMac::SetTextAndSelectedRange(const string16& display_text,
+void OmniboxViewMac::SetTextAndSelectedRange(const base::string16& display_text,
const NSRange range) {
SetText(display_text);
SetSelectedRange(range);
@@ -414,7 +414,7 @@ void OmniboxViewMac::EmphasizeURLComponents() {
}
}
-void OmniboxViewMac::ApplyTextAttributes(const string16& display_text,
+void OmniboxViewMac::ApplyTextAttributes(const base::string16& display_text,
NSMutableAttributedString* as) {
NSUInteger as_length = [as length];
NSRange as_entire_string = NSMakeRange(0, as_length);
@@ -484,9 +484,10 @@ void OmniboxViewMac::ApplyTextAttributes(const string16& display_text,
}
}
-void OmniboxViewMac::OnTemporaryTextMaybeChanged(const string16& display_text,
- bool save_original_selection,
- bool notify_text_changed) {
+void OmniboxViewMac::OnTemporaryTextMaybeChanged(
+ const base::string16& display_text,
+ bool save_original_selection,
+ bool notify_text_changed) {
if (save_original_selection)
saved_temporary_selection_ = GetSelectedRange();
@@ -497,7 +498,7 @@ void OmniboxViewMac::OnTemporaryTextMaybeChanged(const string16& display_text,
}
bool OmniboxViewMac::OnInlineAutocompleteTextMaybeChanged(
- const string16& display_text,
+ const base::string16& display_text,
size_t user_text_length) {
// TODO(shess): Make sure that this actually works. The round trip
// to native form and back may mean that it's the same but not the
@@ -544,7 +545,7 @@ bool OmniboxViewMac::OnAfterPossibleChange() {
DCHECK(IsFirstResponder());
const NSRange new_selection(GetSelectedRange());
- const string16 new_text(GetText());
+ const base::string16 new_text(GetText());
const size_t length = new_text.length();
const bool selection_differs =
@@ -600,7 +601,8 @@ gfx::NativeView OmniboxViewMac::GetRelativeWindowForPopup() const {
return NULL;
}
-void OmniboxViewMac::SetGrayTextAutocompletion(const string16& suggest_text) {
+void OmniboxViewMac::SetGrayTextAutocompletion(
+ const base::string16& suggest_text) {
if (suggest_text == suggest_text_)
return;
suggest_text_ = suggest_text;
@@ -608,7 +610,7 @@ void OmniboxViewMac::SetGrayTextAutocompletion(const string16& suggest_text) {
textColor:SuggestTextColor()];
}
-string16 OmniboxViewMac::GetGrayTextAutocompletion() const {
+base::string16 OmniboxViewMac::GetGrayTextAutocompletion() const {
return suggest_text_;
}
@@ -792,7 +794,7 @@ void OmniboxViewMac::CopyToPasteboard(NSPasteboard* pb) {
DCHECK(CanCopy());
const NSRange selection = GetSelectedRange();
- string16 text = base::SysNSStringToUTF16(
+ base::string16 text = base::SysNSStringToUTF16(
[[field_ stringValue] substringWithRange:selection]);
// Copy the URL unless this is the search URL and it's being replaced by the
@@ -827,7 +829,7 @@ void OmniboxViewMac::OnPaste() {
// This code currently expects |field_| to be focussed.
DCHECK([field_ currentEditor]);
- string16 text = GetClipboardText();
+ base::string16 text = GetClipboardText();
if (text.empty()) {
return;
}
@@ -869,14 +871,14 @@ bool OmniboxViewMac::CanPasteAndGo() {
}
int OmniboxViewMac::GetPasteActionStringId() {
- string16 text(GetClipboardText());
+ base::string16 text(GetClipboardText());
DCHECK(model()->CanPasteAndGo(text));
return model()->IsPasteAndSearch(text) ?
IDS_PASTE_AND_SEARCH : IDS_PASTE_AND_GO;
}
void OmniboxViewMac::OnPasteAndGo() {
- string16 text(GetClipboardText());
+ base::string16 text(GetClipboardText());
if (model()->CanPasteAndGo(text))
model()->PasteAndGo(text);
}
diff --git a/chrome/browser/ui/cocoa/one_click_signin_dialog_controller.mm b/chrome/browser/ui/cocoa/one_click_signin_dialog_controller.mm
index 022e373..f0156f2 100644
--- a/chrome/browser/ui/cocoa/one_click_signin_dialog_controller.mm
+++ b/chrome/browser/ui/cocoa/one_click_signin_dialog_controller.mm
@@ -13,7 +13,7 @@
OneClickSigninDialogController::OneClickSigninDialogController(
content::WebContents* web_contents,
const BrowserWindow::StartSyncCallback& sync_callback,
- const string16& email) {
+ const base::string16& email) {
base::Closure close_callback = base::Bind(
&OneClickSigninDialogController::PerformClose, base::Unretained(this));
view_controller_.reset([[OneClickSigninViewController alloc]
diff --git a/chrome/browser/ui/cocoa/one_click_signin_view_controller.h b/chrome/browser/ui/cocoa/one_click_signin_view_controller.h
index 751970a..df1f2d5 100644
--- a/chrome/browser/ui/cocoa/one_click_signin_view_controller.h
+++ b/chrome/browser/ui/cocoa/one_click_signin_view_controller.h
@@ -32,7 +32,7 @@ class WebContents;
BOOL clickedLearnMore_;
// The user's email address to be used for sync.
- string16 email_;
+ base::string16 email_;
// Alternate error message to be displayed.
base::scoped_nsobject<NSString> errorMessage_;
@@ -57,7 +57,7 @@ class WebContents;
syncCallback:(const BrowserWindow::StartSyncCallback&)syncCallback
closeCallback:(const base::Closure&)callback
isSyncDialog:(BOOL)isSyncDialog
- email:(const string16&)email
+ email:(const base::string16&)email
errorMessage:(NSString*)errorMessage;
// Called before the view is closed.
diff --git a/chrome/browser/ui/cocoa/one_click_signin_view_controller.mm b/chrome/browser/ui/cocoa/one_click_signin_view_controller.mm
index be723e3..db6d681 100644
--- a/chrome/browser/ui/cocoa/one_click_signin_view_controller.mm
+++ b/chrome/browser/ui/cocoa/one_click_signin_view_controller.mm
@@ -44,7 +44,7 @@ void ShiftOriginY(NSView* view, CGFloat amount) {
syncCallback:(const BrowserWindow::StartSyncCallback&)syncCallback
closeCallback:(const base::Closure&)closeCallback
isSyncDialog:(BOOL)isSyncDialog
- email:(const string16&)email
+ email:(const base::string16&)email
errorMessage:(NSString*)errorMessage {
if ((self = [super initWithNibName:nibName
bundle:base::mac::FrameworkBundle()])) {
diff --git a/chrome/browser/ui/cocoa/profile_signin_confirmation_view_controller.mm b/chrome/browser/ui/cocoa/profile_signin_confirmation_view_controller.mm
index 4a84a92..e47e710 100644
--- a/chrome/browser/ui/cocoa/profile_signin_confirmation_view_controller.mm
+++ b/chrome/browser/ui/cocoa/profile_signin_confirmation_view_controller.mm
@@ -82,8 +82,8 @@ void RemoveUnderlining(NSTextView* textView, int offset, int length) {
NSTextView* AddTextView(
NSView* parent,
id<NSTextViewDelegate> delegate,
- const string16& message,
- const string16& link,
+ const base::string16& message,
+ const base::string16& link,
int offset,
const ui::ResourceBundle::FontStyle& font_style) {
base::scoped_nsobject<HyperlinkTextView> textView(
@@ -107,7 +107,7 @@ NSTextView* AddTextView(
// Create a new NSTextField and add it to the specified parent.
NSTextField* AddTextField(
NSView* parent,
- const string16& message,
+ const base::string16& message,
const ui::ResourceBundle::FontStyle& font_style) {
NSTextField* textField = constrained_window::CreateLabel();
[textField setAttributedStringValue:
@@ -251,9 +251,10 @@ NSTextField* AddTextField(
// Prompt text.
size_t offset;
- const string16 domain = ASCIIToUTF16(gaia::ExtractDomainName(username_));
- const string16 username = ASCIIToUTF16(username_);
- const string16 prompt_text =
+ const base::string16 domain =
+ ASCIIToUTF16(gaia::ExtractDomainName(username_));
+ const base::string16 username = ASCIIToUTF16(username_);
+ const base::string16 prompt_text =
l10n_util::GetStringFUTF16(
IDS_ENTERPRISE_SIGNIN_ALERT_NEW_STYLE,
domain, &offset);
@@ -275,10 +276,10 @@ NSTextField* AddTextField(
// Explanation text.
std::vector<size_t> offsets;
- const string16 learn_more_text =
+ const base::string16 learn_more_text =
l10n_util::GetStringUTF16(
IDS_ENTERPRISE_SIGNIN_PROFILE_LINK_LEARN_MORE);
- const string16 explanation_text =
+ const base::string16 explanation_text =
l10n_util::GetStringFUTF16(
offerProfileCreation_ ?
IDS_ENTERPRISE_SIGNIN_EXPLANATION_WITH_PROFILE_CREATION_NEW_STYLE :
@@ -288,7 +289,7 @@ NSTextField* AddTextField(
// into the middle of the message text. To do this we slice out
// the "learn more" string from the message so that it can be
// inserted again.
- const string16 explanation_message_text =
+ const base::string16 explanation_message_text =
explanation_text.substr(0, offsets[1]) +
explanation_text.substr(offsets[1] + learn_more_text.size());
explanationField_.reset(
diff --git a/chrome/browser/ui/cocoa/profile_signin_confirmation_view_controller_browsertest.mm b/chrome/browser/ui/cocoa/profile_signin_confirmation_view_controller_browsertest.mm
index 0d5a5c4..d477090 100644
--- a/chrome/browser/ui/cocoa/profile_signin_confirmation_view_controller_browsertest.mm
+++ b/chrome/browser/ui/cocoa/profile_signin_confirmation_view_controller_browsertest.mm
@@ -57,7 +57,7 @@ class ProfileSigninConfirmationViewControllerTest
std::string username() {
return "foo@bar.com";
}
- string16 learn_more() {
+ base::string16 learn_more() {
return l10n_util::GetStringUTF16(
IDS_ENTERPRISE_SIGNIN_PROFILE_LINK_LEARN_MORE);
}
diff --git a/chrome/browser/ui/cocoa/screen_capture_notification_ui_cocoa.h b/chrome/browser/ui/cocoa/screen_capture_notification_ui_cocoa.h
index ca803a7..97126c8 100644
--- a/chrome/browser/ui/cocoa/screen_capture_notification_ui_cocoa.h
+++ b/chrome/browser/ui/cocoa/screen_capture_notification_ui_cocoa.h
@@ -22,14 +22,14 @@
}
- (id)initWithCallback:(const base::Closure&)stop_callback
- text:(const string16&)text;
+ text:(const base::string16&)text;
- (void)stopSharing:(id)sender;
@end
class ScreenCaptureNotificationUICocoa : public ScreenCaptureNotificationUI {
public:
- explicit ScreenCaptureNotificationUICocoa(const string16& text);
+ explicit ScreenCaptureNotificationUICocoa(const base::string16& text);
virtual ~ScreenCaptureNotificationUICocoa();
// ScreenCaptureNotificationUI interface.
@@ -38,7 +38,7 @@ class ScreenCaptureNotificationUICocoa : public ScreenCaptureNotificationUI {
private:
friend class ScreenCaptureNotificationUICocoaTest;
- const string16 text_;
+ const base::string16 text_;
base::scoped_nsobject<ScreenCaptureNotificationController> windowController_;
DISALLOW_COPY_AND_ASSIGN(ScreenCaptureNotificationUICocoa);
diff --git a/chrome/browser/ui/cocoa/screen_capture_notification_ui_cocoa.mm b/chrome/browser/ui/cocoa/screen_capture_notification_ui_cocoa.mm
index 6f5cc4e..15b937a 100644
--- a/chrome/browser/ui/cocoa/screen_capture_notification_ui_cocoa.mm
+++ b/chrome/browser/ui/cocoa/screen_capture_notification_ui_cocoa.mm
@@ -34,7 +34,7 @@ const CGFloat kWindowCornerRadius = 2;
@interface ScreenCaptureNotificationController()
- (void)hide;
-- (void)populateWithText:(const string16&)text;
+- (void)populateWithText:(const base::string16&)text;
@end
@interface ScreenCaptureNotificationView : NSView
@@ -46,7 +46,7 @@ const CGFloat kWindowCornerRadius = 2;
ScreenCaptureNotificationUICocoa::ScreenCaptureNotificationUICocoa(
- const string16& text)
+ const base::string16& text)
: text_(text) {
}
@@ -64,14 +64,14 @@ void ScreenCaptureNotificationUICocoa::OnStarted(
}
scoped_ptr<ScreenCaptureNotificationUI> ScreenCaptureNotificationUI::Create(
- const string16& text) {
+ const base::string16& text) {
return scoped_ptr<ScreenCaptureNotificationUI>(
new ScreenCaptureNotificationUICocoa(text));
}
@implementation ScreenCaptureNotificationController
- (id)initWithCallback:(const base::Closure&)stop_callback
- text:(const string16&)text {
+ text:(const base::string16&)text {
base::scoped_nsobject<NSWindow> window(
[[NSWindow alloc] initWithContentRect:ui::kWindowSizeDeterminedLater
styleMask:NSBorderlessWindowMask
@@ -117,7 +117,7 @@ scoped_ptr<ScreenCaptureNotificationUI> ScreenCaptureNotificationUI::Create(
[self close];
}
-- (void)populateWithText:(const string16&)text {
+- (void)populateWithText:(const base::string16&)text {
base::scoped_nsobject<ScreenCaptureNotificationView> content(
[[ScreenCaptureNotificationView alloc]
initWithFrame:ui::kWindowSizeDeterminedLater]);
@@ -151,7 +151,7 @@ scoped_ptr<ScreenCaptureNotificationUI> ScreenCaptureNotificationUI::Create(
gfx::Font font(ui::ResourceBundle::GetSharedInstance()
.GetFont(ui::ResourceBundle::BaseFont)
.GetNativeFont());
- string16 elidedText =
+ base::string16 elidedText =
ElideText(text, font, maxLabelWidth, gfx::ELIDE_IN_MIDDLE);
NSString* statusText = base::SysUTF16ToNSString(elidedText);
base::scoped_nsobject<NSTextField> statusTextField(
diff --git a/chrome/browser/ui/cocoa/simple_message_box_mac.mm b/chrome/browser/ui/cocoa/simple_message_box_mac.mm
index cc956ee..883d527 100644
--- a/chrome/browser/ui/cocoa/simple_message_box_mac.mm
+++ b/chrome/browser/ui/cocoa/simple_message_box_mac.mm
@@ -14,8 +14,8 @@
namespace chrome {
MessageBoxResult ShowMessageBox(gfx::NativeWindow parent,
- const string16& title,
- const string16& message,
+ const base::string16& title,
+ const base::string16& message,
MessageBoxType type) {
if (type == MESSAGE_BOX_TYPE_OK_CANCEL)
NOTIMPLEMENTED();
diff --git a/chrome/browser/ui/cocoa/speech_recognition_window_controller.h b/chrome/browser/ui/cocoa/speech_recognition_window_controller.h
index 9befe2c..24fa890 100644
--- a/chrome/browser/ui/cocoa/speech_recognition_window_controller.h
+++ b/chrome/browser/ui/cocoa/speech_recognition_window_controller.h
@@ -41,7 +41,7 @@
// Updates the UI with data related to the given display mode.
- (void)updateLayout:(SpeechRecognitionBubbleBase::DisplayMode)mode
- messageText:(const string16&)messageText
+ messageText:(const base::string16&)messageText
iconImage:(NSImage*)iconImage;
// Makes the speech recognition bubble visible on screen.
diff --git a/chrome/browser/ui/cocoa/speech_recognition_window_controller.mm b/chrome/browser/ui/cocoa/speech_recognition_window_controller.mm
index 6a0969e..2048fb2 100644
--- a/chrome/browser/ui/cocoa/speech_recognition_window_controller.mm
+++ b/chrome/browser/ui/cocoa/speech_recognition_window_controller.mm
@@ -175,7 +175,7 @@ const int kInstructionLabelMaxWidth = 150;
}
- (void)updateLayout:(SpeechRecognitionBubbleBase::DisplayMode)mode
- messageText:(const string16&)messageText
+ messageText:(const base::string16&)messageText
iconImage:(NSImage*)iconImage {
// The very first time this method is called, the child views would still be
// uninitialized and null. So we invoke [self window] first and that sets up
diff --git a/chrome/browser/ui/cocoa/status_bubble_mac.h b/chrome/browser/ui/cocoa/status_bubble_mac.h
index d38c9e5..be7637f 100644
--- a/chrome/browser/ui/cocoa/status_bubble_mac.h
+++ b/chrome/browser/ui/cocoa/status_bubble_mac.h
@@ -35,7 +35,7 @@ class StatusBubbleMac : public StatusBubble {
virtual ~StatusBubbleMac();
// StatusBubble implementation.
- virtual void SetStatus(const string16& status) OVERRIDE;
+ virtual void SetStatus(const base::string16& status) OVERRIDE;
virtual void SetURL(const GURL& url, const std::string& languages) OVERRIDE;
virtual void Hide() OVERRIDE;
virtual void MouseMoved(const gfx::Point& location,
@@ -72,7 +72,7 @@ class StatusBubbleMac : public StatusBubble {
void SetState(StatusBubbleState state);
// Sets the bubble text for SetStatus and SetURL.
- void SetText(const string16& text, bool is_url);
+ void SetText(const base::string16& text, bool is_url);
// Construct the window/widget if it does not already exist. (Safe to call if
// it does.)
diff --git a/chrome/browser/ui/cocoa/status_bubble_mac.mm b/chrome/browser/ui/cocoa/status_bubble_mac.mm
index d42cb29..2e5cdf8 100644
--- a/chrome/browser/ui/cocoa/status_bubble_mac.mm
+++ b/chrome/browser/ui/cocoa/status_bubble_mac.mm
@@ -124,7 +124,7 @@ StatusBubbleMac::~StatusBubbleMac() {
window_ = nil;
}
-void StatusBubbleMac::SetStatus(const string16& status) {
+void StatusBubbleMac::SetStatus(const base::string16& status) {
SetText(status, false);
}
@@ -153,8 +153,9 @@ void StatusBubbleMac::SetURL(const GURL& url, const std::string& languages) {
gfx::FontList font_list_chr(
gfx::Font(base::SysNSStringToUTF8([font fontName]), [font pointSize]));
- string16 original_url_text = net::FormatUrl(url, languages);
- string16 status = gfx::ElideUrl(url, font_list_chr, text_width, languages);
+ base::string16 original_url_text = net::FormatUrl(url, languages);
+ base::string16 status =
+ gfx::ElideUrl(url, font_list_chr, text_width, languages);
SetText(status, true);
@@ -178,7 +179,7 @@ void StatusBubbleMac::SetURL(const GURL& url, const std::string& languages) {
}
}
-void StatusBubbleMac::SetText(const string16& text, bool is_url) {
+void StatusBubbleMac::SetText(const base::string16& text, bool is_url) {
// The status bubble allows the status and URL strings to be set
// independently. Whichever was set non-empty most recently will be the
// value displayed. When both are empty, the status bubble hides.
@@ -623,7 +624,7 @@ void StatusBubbleMac::ExpandBubble() {
NSFont* font = [[window_ contentView] font];
gfx::FontList font_list_chr(
gfx::Font(base::SysNSStringToUTF8([font fontName]), [font pointSize]));
- string16 expanded_url = gfx::ElideUrl(
+ base::string16 expanded_url = gfx::ElideUrl(
url_, font_list_chr, max_bubble_width, languages_);
// Scale width from gfx::Font in view coordinates to window coordinates.
diff --git a/chrome/browser/ui/cocoa/status_icons/status_icon_mac.h b/chrome/browser/ui/cocoa/status_icons/status_icon_mac.h
index 6bd6570..c3f5cf0 100644
--- a/chrome/browser/ui/cocoa/status_icons/status_icon_mac.h
+++ b/chrome/browser/ui/cocoa/status_icons/status_icon_mac.h
@@ -26,10 +26,10 @@ class StatusIconMac : public StatusIcon {
// Overridden from StatusIcon.
virtual void SetImage(const gfx::ImageSkia& image) OVERRIDE;
virtual void SetPressedImage(const gfx::ImageSkia& image) OVERRIDE;
- virtual void SetToolTip(const string16& tool_tip) OVERRIDE;
+ virtual void SetToolTip(const base::string16& tool_tip) OVERRIDE;
virtual void DisplayBalloon(const gfx::ImageSkia& icon,
- const string16& title,
- const string16& contents) OVERRIDE;
+ const base::string16& title,
+ const base::string16& contents) OVERRIDE;
bool HasStatusIconMenu();
diff --git a/chrome/browser/ui/cocoa/status_icons/status_icon_mac.mm b/chrome/browser/ui/cocoa/status_icons/status_icon_mac.mm
index cc79fc6..32c1f81 100644
--- a/chrome/browser/ui/cocoa/status_icons/status_icon_mac.mm
+++ b/chrome/browser/ui/cocoa/status_icons/status_icon_mac.mm
@@ -79,7 +79,7 @@ void StatusIconMac::SetPressedImage(const gfx::ImageSkia& image) {
}
}
-void StatusIconMac::SetToolTip(const string16& tool_tip) {
+void StatusIconMac::SetToolTip(const base::string16& tool_tip) {
// If we have a status icon menu, make the tool tip part of the menu instead
// of a pop-up tool tip when hovering the mouse over the image.
toolTip_.reset([base::SysUTF16ToNSString(tool_tip) retain]);
@@ -92,8 +92,8 @@ void StatusIconMac::SetToolTip(const string16& tool_tip) {
}
void StatusIconMac::DisplayBalloon(const gfx::ImageSkia& icon,
- const string16& title,
- const string16& contents) {
+ const base::string16& title,
+ const base::string16& contents) {
notification_.DisplayBalloon(icon, title, contents);
}
diff --git a/chrome/browser/ui/cocoa/status_icons/status_tray_mac.h b/chrome/browser/ui/cocoa/status_icons/status_tray_mac.h
index 7325d86..7496892 100644
--- a/chrome/browser/ui/cocoa/status_icons/status_tray_mac.h
+++ b/chrome/browser/ui/cocoa/status_icons/status_tray_mac.h
@@ -17,7 +17,7 @@ class StatusTrayMac : public StatusTray {
virtual StatusIcon* CreatePlatformStatusIcon(
StatusIconType type,
const gfx::ImageSkia& image,
- const string16& tool_tip) OVERRIDE;
+ const base::string16& tool_tip) OVERRIDE;
private:
DISALLOW_COPY_AND_ASSIGN(StatusTrayMac);
diff --git a/chrome/browser/ui/cocoa/status_icons/status_tray_mac.mm b/chrome/browser/ui/cocoa/status_icons/status_tray_mac.mm
index 50dc797..bec5554 100644
--- a/chrome/browser/ui/cocoa/status_icons/status_tray_mac.mm
+++ b/chrome/browser/ui/cocoa/status_icons/status_tray_mac.mm
@@ -13,9 +13,10 @@ StatusTray* StatusTray::Create() {
StatusTrayMac::StatusTrayMac() {
}
-StatusIcon* StatusTrayMac::CreatePlatformStatusIcon(StatusIconType type,
- const gfx::ImageSkia& image,
- const string16& tool_tip) {
+StatusIcon* StatusTrayMac::CreatePlatformStatusIcon(
+ StatusIconType type,
+ const gfx::ImageSkia& image,
+ const base::string16& tool_tip) {
StatusIcon* icon = new StatusIconMac();
icon->SetImage(image);
icon->SetToolTip(tool_tip);
diff --git a/chrome/browser/ui/cocoa/tab_contents/render_view_context_menu_mac.h b/chrome/browser/ui/cocoa/tab_contents/render_view_context_menu_mac.h
index c43503a..43afdd7 100644
--- a/chrome/browser/ui/cocoa/tab_contents/render_view_context_menu_mac.h
+++ b/chrome/browser/ui/cocoa/tab_contents/render_view_context_menu_mac.h
@@ -31,7 +31,7 @@ class RenderViewContextMenuMac : public RenderViewContextMenu {
virtual void UpdateMenuItem(int command_id,
bool enabled,
bool hidden,
- const string16& title) OVERRIDE;
+ const base::string16& title) OVERRIDE;
protected:
// RenderViewContextMenu implementation.
diff --git a/chrome/browser/ui/cocoa/tab_contents/render_view_context_menu_mac.mm b/chrome/browser/ui/cocoa/tab_contents/render_view_context_menu_mac.mm
index 4caf5ce..47c4516 100644
--- a/chrome/browser/ui/cocoa/tab_contents/render_view_context_menu_mac.mm
+++ b/chrome/browser/ui/cocoa/tab_contents/render_view_context_menu_mac.mm
@@ -265,7 +265,7 @@ void RenderViewContextMenuMac::StopSpeaking() {
void RenderViewContextMenuMac::UpdateMenuItem(int command_id,
bool enabled,
bool hidden,
- const string16& title) {
+ const base::string16& title) {
NSMenuItem* item = GetMenuItemByID(&menu_model_, [menu_controller_ menu],
command_id);
if (!item)
diff --git a/chrome/browser/ui/cocoa/tab_contents/sad_tab_view.mm b/chrome/browser/ui/cocoa/tab_contents/sad_tab_view.mm
index 411ffff..769ea74 100644
--- a/chrome/browser/ui/cocoa/tab_contents/sad_tab_view.mm
+++ b/chrome/browser/ui/cocoa/tab_contents/sad_tab_view.mm
@@ -147,7 +147,7 @@ static const CGFloat kTabHorzMargin = 13;
// Get the help text and link.
size_t linkOffset = 0;
NSString* helpMessage(base::SysUTF16ToNSString(l10n_util::GetStringFUTF16(
- IDS_SAD_TAB_HELP_MESSAGE, string16(), &linkOffset)));
+ IDS_SAD_TAB_HELP_MESSAGE, base::string16(), &linkOffset)));
NSString* helpLink = l10n_util::GetNSString(IDS_SAD_TAB_HELP_LINK);
NSFont* font = [NSFont systemFontOfSize:[NSFont smallSystemFontSize]];
[help_.get() setMessageAndLink:helpMessage
diff --git a/chrome/browser/ui/cocoa/tabpose_window.mm b/chrome/browser/ui/cocoa/tabpose_window.mm
index af5b80b..f4cc4fc 100644
--- a/chrome/browser/ui/cocoa/tabpose_window.mm
+++ b/chrome/browser/ui/cocoa/tabpose_window.mm
@@ -406,7 +406,7 @@ class Tile {
NSRect title_rect() const { return NSIntegralRect(title_rect_); }
// Returns an unelided title. The view logic is responsible for eliding.
- const string16& title() const {
+ const base::string16& title() const {
return contents_->GetTitle();
}
diff --git a/chrome/browser/ui/cocoa/task_manager_mac_unittest.mm b/chrome/browser/ui/cocoa/task_manager_mac_unittest.mm
index 9dff6b1e..5bf1fe7 100644
--- a/chrome/browser/ui/cocoa/task_manager_mac_unittest.mm
+++ b/chrome/browser/ui/cocoa/task_manager_mac_unittest.mm
@@ -19,9 +19,12 @@ namespace {
class TestResource : public task_manager::Resource {
public:
- TestResource(const string16& title, pid_t pid) : title_(title), pid_(pid) {}
- virtual string16 GetTitle() const OVERRIDE { return title_; }
- virtual string16 GetProfileName() const OVERRIDE { return string16(); }
+ TestResource(const base::string16& title, pid_t pid)
+ : title_(title), pid_(pid) {}
+ virtual base::string16 GetTitle() const OVERRIDE { return title_; }
+ virtual base::string16 GetProfileName() const OVERRIDE {
+ return base::string16();
+ }
virtual gfx::ImageSkia GetIcon() const OVERRIDE { return gfx::ImageSkia(); }
virtual base::ProcessHandle GetProcess() const OVERRIDE { return pid_; }
virtual int GetUniqueChildProcessId() const OVERRIDE {
@@ -33,8 +36,8 @@ class TestResource : public task_manager::Resource {
virtual bool SupportNetworkUsage() const OVERRIDE { return false; }
virtual void SetSupportNetworkUsage() OVERRIDE { NOTREACHED(); }
virtual void Refresh() OVERRIDE {}
- string16 title_;
- string16 profile_name_;
+ base::string16 title_;
+ base::string16 profile_name_;
pid_t pid_;
};
diff --git a/chrome/browser/ui/cocoa/ui_localizer.mm b/chrome/browser/ui/cocoa/ui_localizer.mm
index 273f3f4..139f93e 100644
--- a/chrome/browser/ui/cocoa/ui_localizer.mm
+++ b/chrome/browser/ui/cocoa/ui_localizer.mm
@@ -78,9 +78,9 @@ int ResourceMapCompare(const void* utf8Void,
if (val) {
// Do we need to build the string, or just fetch it?
if (val->label_arg_id != 0) {
- const string16 label_arg(l10n_util::GetStringUTF16(val->label_arg_id));
- return l10n_util::GetNSStringFWithFixup(val->label_id,
- label_arg);
+ const base::string16 label_arg(
+ l10n_util::GetStringUTF16(val->label_arg_id));
+ return l10n_util::GetNSStringFWithFixup(val->label_id, label_arg);
}
return l10n_util::GetNSStringWithFixup(val->label_id);
diff --git a/chrome/browser/ui/cocoa/validation_message_bubble_controller.h b/chrome/browser/ui/cocoa/validation_message_bubble_controller.h
index e010fab..7c8f78d 100644
--- a/chrome/browser/ui/cocoa/validation_message_bubble_controller.h
+++ b/chrome/browser/ui/cocoa/validation_message_bubble_controller.h
@@ -13,12 +13,12 @@
- (id)init:(NSWindow*)parentWindow
anchoredAt:(NSPoint)anchorPoint
- mainText:(const string16&)mainText
- subText:(const string16&)subText;
+ mainText:(const base::string16&)mainText
+ subText:(const base::string16&)subText;
// This is exposed for testing.
-+ (NSView*)constructContentView:(const string16&)mainText
- subText:(const string16&)subText;
++ (NSView*)constructContentView:(const base::string16&)mainText
+ subText:(const base::string16&)subText;
@end
diff --git a/chrome/browser/ui/cocoa/web_dialog_window_controller.mm b/chrome/browser/ui/cocoa/web_dialog_window_controller.mm
index 4e7d2bf..d87ef92 100644
--- a/chrome/browser/ui/cocoa/web_dialog_window_controller.mm
+++ b/chrome/browser/ui/cocoa/web_dialog_window_controller.mm
@@ -46,7 +46,7 @@ public:
// WebDialogDelegate declarations.
virtual ui::ModalType GetDialogModalType() const OVERRIDE;
- virtual string16 GetDialogTitle() const OVERRIDE;
+ virtual base::string16 GetDialogTitle() const OVERRIDE;
virtual GURL GetDialogContentURL() const OVERRIDE;
virtual void GetWebUIMessageHandlers(
std::vector<WebUIMessageHandler*>* handlers) const OVERRIDE;
@@ -151,7 +151,7 @@ ui::ModalType WebDialogWindowDelegateBridge::GetDialogModalType() const {
}
string16 WebDialogWindowDelegateBridge::GetDialogTitle() const {
- return delegate_ ? delegate_->GetDialogTitle() : string16();
+ return delegate_ ? delegate_->GetDialogTitle() : base::string16();
}
GURL WebDialogWindowDelegateBridge::GetDialogContentURL() const {
diff --git a/chrome/browser/ui/cocoa/web_dialog_window_controller_unittest.mm b/chrome/browser/ui/cocoa/web_dialog_window_controller_unittest.mm
index c3bb0d6..be10630 100644
--- a/chrome/browser/ui/cocoa/web_dialog_window_controller_unittest.mm
+++ b/chrome/browser/ui/cocoa/web_dialog_window_controller_unittest.mm
@@ -33,7 +33,7 @@ namespace {
class MockDelegate : public WebDialogDelegate {
public:
MOCK_CONST_METHOD0(GetDialogModalType, ui::ModalType());
- MOCK_CONST_METHOD0(GetDialogTitle, string16());
+ MOCK_CONST_METHOD0(GetDialogTitle, base::string16());
MOCK_CONST_METHOD0(GetDialogContentURL, GURL());
MOCK_CONST_METHOD1(GetWebUIMessageHandlers,
void(std::vector<WebUIMessageHandler*>*));
@@ -56,7 +56,7 @@ class WebDialogWindowControllerTest : public BrowserWithTestWindowTest {
}
protected:
- string16 title_;
+ base::string16 title_;
gfx::Size size_;
GURL gurl_;
diff --git a/chrome/browser/ui/cocoa/website_settings_bubble_controller.h b/chrome/browser/ui/cocoa/website_settings_bubble_controller.h
index 5f671e7..dcf3849 100644
--- a/chrome/browser/ui/cocoa/website_settings_bubble_controller.h
+++ b/chrome/browser/ui/cocoa/website_settings_bubble_controller.h
@@ -119,7 +119,7 @@ class WebsiteSettingsUIBridge : public WebsiteSettingsUI {
virtual void SetPermissionInfo(
const PermissionInfoList& permission_info_list) OVERRIDE;
virtual void SetIdentityInfo(const IdentityInfo& identity_info) OVERRIDE;
- virtual void SetFirstVisit(const string16& first_visit) OVERRIDE;
+ virtual void SetFirstVisit(const base::string16& first_visit) OVERRIDE;
virtual void SetSelectedTab(TabId tab_id) OVERRIDE;
private:
diff --git a/chrome/browser/ui/cocoa/website_settings_bubble_controller.mm b/chrome/browser/ui/cocoa/website_settings_bubble_controller.mm
index d131376..d39bb7e 100644
--- a/chrome/browser/ui/cocoa/website_settings_bubble_controller.mm
+++ b/chrome/browser/ui/cocoa/website_settings_bubble_controller.mm
@@ -359,7 +359,7 @@ NSColor* IdentityVerifiedTextColor() {
[imageView setImage:rb.GetNativeImageNamed(IDR_PRODUCT_LOGO_26).ToNSImage()];
controlOrigin.x += NSWidth([imageView frame]) + kInternalPageImageSpacing;
- string16 text = l10n_util::GetStringUTF16(IDS_PAGE_INFO_INTERNAL_PAGE);
+ base::string16 text = l10n_util::GetStringUTF16(IDS_PAGE_INFO_INTERNAL_PAGE);
NSTextField* textField = [self addText:text
withSize:[NSFont smallSystemFontSize]
bold:NO
@@ -768,7 +768,7 @@ NSColor* IdentityVerifiedTextColor() {
// Create a new text field and add it to the given array of subviews.
// The array will retain a reference to the object.
-- (NSTextField*)addText:(const string16&)text
+- (NSTextField*)addText:(const base::string16&)text
withSize:(CGFloat)fontSize
bold:(BOOL)bold
toView:(NSView*)view
@@ -893,7 +893,7 @@ NSColor* IdentityVerifiedTextColor() {
// Set the button title.
base::scoped_nsobject<NSMenuItem> titleItem([[NSMenuItem alloc] init]);
- string16 buttonTitle = WebsiteSettingsUI::PermissionActionToUIString(
+ base::string16 buttonTitle = WebsiteSettingsUI::PermissionActionToUIString(
permissionInfo.setting,
permissionInfo.default_setting,
permissionInfo.source);
@@ -905,7 +905,7 @@ NSColor* IdentityVerifiedTextColor() {
// Determine the largest possible size for this button.
CGFloat maxTitleWidth = 0;
for (NSInteger i = 0; i < [button numberOfItems]; ++i) {
- string16 title = WebsiteSettingsUI::PermissionActionToUIString(
+ base::string16 title = WebsiteSettingsUI::PermissionActionToUIString(
static_cast<ContentSetting>([[button itemAtIndex:i] tag]),
permissionInfo.default_setting,
content_settings::SETTING_SOURCE_USER);
@@ -962,7 +962,7 @@ NSColor* IdentityVerifiedTextColor() {
[imageView setImage:image];
point.x += kPermissionImageSize + kPermissionImageSpacing;
- string16 labelText =
+ base::string16 labelText =
WebsiteSettingsUI::PermissionTypeToUIString(permissionInfo.type) +
ASCIIToUTF16(":");
@@ -1027,7 +1027,7 @@ NSColor* IdentityVerifiedTextColor() {
[imageView setImage:image];
point.x += kPermissionImageSize + kPermissionImageSpacing;
- string16 labelText = l10n_util::GetStringFUTF16(
+ base::string16 labelText = l10n_util::GetStringFUTF16(
IDS_WEBSITE_SETTINGS_SITE_DATA_STATS_LINE,
UTF8ToUTF16(cookieInfo.cookie_source),
base::IntToString16(cookieInfo.allowed),
@@ -1094,7 +1094,7 @@ NSColor* IdentityVerifiedTextColor() {
[cookiesView_ setSubviews:[NSArray array]];
NSPoint controlOrigin = NSMakePoint(kFramePadding, 0);
- string16 sectionTitle = l10n_util::GetStringUTF16(
+ base::string16 sectionTitle = l10n_util::GetStringUTF16(
IDS_WEBSITE_SETTINGS_TITLE_SITE_DATA);
NSTextField* header = [self addText:sectionTitle
withSize:[NSFont smallSystemFontSize]
@@ -1124,7 +1124,7 @@ NSColor* IdentityVerifiedTextColor() {
[permissionsView_ setSubviews:[NSArray array]];
NSPoint controlOrigin = NSMakePoint(kFramePadding, 0);
- string16 sectionTitle = l10n_util::GetStringUTF16(
+ base::string16 sectionTitle = l10n_util::GetStringUTF16(
IDS_WEBSITE_SETTINGS_TITLE_SITE_PERMISSIONS);
NSTextField* header = [self addText:sectionTitle
withSize:[NSFont smallSystemFontSize]
@@ -1150,7 +1150,7 @@ NSColor* IdentityVerifiedTextColor() {
[self performLayout];
}
-- (void)setFirstVisit:(const string16&)firstVisit {
+- (void)setFirstVisit:(const base::string16&)firstVisit {
[firstVisitIcon_ setImage:
WebsiteSettingsUI::GetFirstVisitIcon(firstVisit).ToNSImage()];
[firstVisitDescriptionField_ setStringValue:
@@ -1228,7 +1228,7 @@ void WebsiteSettingsUIBridge::SetPermissionInfo(
[bubble_controller_ setPermissionInfo:permission_info_list];
}
-void WebsiteSettingsUIBridge::SetFirstVisit(const string16& first_visit) {
+void WebsiteSettingsUIBridge::SetFirstVisit(const base::string16& first_visit) {
[bubble_controller_ setFirstVisit:first_visit];
}
diff --git a/chrome/browser/ui/cocoa/wrench_menu/wrench_menu_controller.mm b/chrome/browser/ui/cocoa/wrench_menu/wrench_menu_controller.mm
index 23eb0b8..4ac09ad 100644
--- a/chrome/browser/ui/cocoa/wrench_menu/wrench_menu_controller.mm
+++ b/chrome/browser/ui/cocoa/wrench_menu/wrench_menu_controller.mm
@@ -79,7 +79,7 @@ class ZoomLevelObserver {
void OnZoomLevelChanged(const HostZoomMap::ZoomLevelChange& change) {
WrenchMenuModel* wrenchMenuModel = [controller_ wrenchMenuModel];
wrenchMenuModel->UpdateZoomControls();
- const string16 level =
+ const base::string16 level =
wrenchMenuModel->GetLabelForCommandId(IDC_ZOOM_PERCENT_DISPLAY);
[[controller_ zoomDisplay] setTitle:SysUTF16ToNSString(level)];
}
@@ -170,7 +170,7 @@ class ZoomLevelObserver {
} else {
// Not a section header. Add a tooltip with the title and the URL.
std::string url;
- string16 title;
+ base::string16 title;
if ([self recentTabsMenuModel]->GetURLAndTitleForItemAtIndex(
[item tag], &url, &title)) {
[menuItem setToolTip:
diff --git a/chrome/browser/ui/cocoa/wrench_menu/wrench_menu_controller_unittest.mm b/chrome/browser/ui/cocoa/wrench_menu/wrench_menu_controller_unittest.mm
index 15547fc..29472bc 100644
--- a/chrome/browser/ui/cocoa/wrench_menu/wrench_menu_controller_unittest.mm
+++ b/chrome/browser/ui/cocoa/wrench_menu/wrench_menu_controller_unittest.mm
@@ -134,9 +134,9 @@ TEST_F(WrenchMenuControllerTest, RecentTabsElideTitle) {
RecentTabsBuilderTestHelper recent_tabs_builder;
recent_tabs_builder.AddSession();
recent_tabs_builder.AddWindow(0);
- string16 tab1_short_title = ASCIIToUTF16("Short");
+ base::string16 tab1_short_title = ASCIIToUTF16("Short");
recent_tabs_builder.AddTabWithInfo(0, 0, base::Time::Now(), tab1_short_title);
- string16 tab2_long_title = ASCIIToUTF16("Very very very very very very "
+ base::string16 tab2_long_title = ASCIIToUTF16("Very very very very very very "
"very very very very very very long");
recent_tabs_builder.AddTabWithInfo(0, 0,
base::Time::Now() - base::TimeDelta::FromMinutes(10), tab2_long_title);