diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-12-05 21:38:49 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-12-05 21:38:49 +0000 |
commit | 428fac1f2102da6f5b6085add20e97ce7eb04698 (patch) | |
tree | da6005e86eb430600c142ae63ee4ede310970d9f /chrome | |
parent | 7c49a005cb4b95014aef8218a3a90ebbb3e02a78 (diff) | |
download | chromium_src-428fac1f2102da6f5b6085add20e97ce7eb04698.zip chromium_src-428fac1f2102da6f5b6085add20e97ce7eb04698.tar.gz chromium_src-428fac1f2102da6f5b6085add20e97ce7eb04698.tar.bz2 |
Add explicit base namespace to string16 users.
This changes callers in chrome/common.
TBR=sky
Review URL: https://codereview.chromium.org/105473003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@239034 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
129 files changed, 304 insertions, 292 deletions
diff --git a/chrome/common/automation_messages.h b/chrome/common/automation_messages.h index c01b93a..07b8842 100644 --- a/chrome/common/automation_messages.h +++ b/chrome/common/automation_messages.h @@ -29,7 +29,7 @@ IPC_ENUM_TRAITS(content::PageType) IPC_STRUCT_BEGIN(AutomationMsg_Find_Params) // The word(s) to find on the page. - IPC_STRUCT_MEMBER(string16, search_string) + IPC_STRUCT_MEMBER(base::string16, search_string) // Whether to search forward or backward within the page. IPC_STRUCT_MEMBER(bool, forward) diff --git a/chrome/common/badge_util.cc b/chrome/common/badge_util.cc index a762a6f..81bb6f3 100644 --- a/chrome/common/badge_util.cc +++ b/chrome/common/badge_util.cc @@ -94,8 +94,8 @@ SkPaint* GetBadgeTextPaintSingleton() { SkBitmap DrawBadgeIconOverlay(const SkBitmap& icon, float font_size, - const string16& text, - const string16& fallback) { + const base::string16& text, + const base::string16& fallback) { const int kMinPadding = 1; // Calculate the proper style/text overlay to render on the badge. diff --git a/chrome/common/badge_util.h b/chrome/common/badge_util.h index f9cc90d..e8e5f8b2 100644 --- a/chrome/common/badge_util.h +++ b/chrome/common/badge_util.h @@ -31,8 +31,8 @@ SkPaint* GetBadgeTextPaintSingleton(); // rendered instead (or nothing, if |fallback| is empty). SkBitmap DrawBadgeIconOverlay(const SkBitmap& icon, float font_size_in_pixels, - const string16& text, - const string16& fallback); + const base::string16& text, + const base::string16& fallback); // Paints badge with specified parameters to |canvas|. void PaintBadge(gfx::Canvas* canvas, diff --git a/chrome/common/chrome_content_client.cc b/chrome/common/chrome_content_client.cc index 9040894..83a732b 100644 --- a/chrome/common/chrome_content_client.cc +++ b/chrome/common/chrome_content_client.cc @@ -516,7 +516,7 @@ std::string ChromeContentClient::GetUserAgent() const { return webkit_glue::BuildUserAgentFromProduct(product); } -string16 ChromeContentClient::GetLocalizedString(int message_id) const { +base::string16 ChromeContentClient::GetLocalizedString(int message_id) const { return l10n_util::GetStringUTF16(message_id); } diff --git a/chrome/common/chrome_content_client.h b/chrome/common/chrome_content_client.h index 40f6f9b..804f666 100644 --- a/chrome/common/chrome_content_client.h +++ b/chrome/common/chrome_content_client.h @@ -29,7 +29,7 @@ class ChromeContentClient : public content::ContentClient { virtual bool CanHandleWhileSwappedOut(const IPC::Message& msg) OVERRIDE; virtual std::string GetProduct() const OVERRIDE; virtual std::string GetUserAgent() const OVERRIDE; - virtual string16 GetLocalizedString(int message_id) const OVERRIDE; + virtual base::string16 GetLocalizedString(int message_id) const OVERRIDE; virtual base::StringPiece GetDataResource( int resource_id, ui::ScaleFactor scale_factor) const OVERRIDE; diff --git a/chrome/common/chrome_content_client_ios.mm b/chrome/common/chrome_content_client_ios.mm index 347a89a..53d255b 100644 --- a/chrome/common/chrome_content_client_ios.mm +++ b/chrome/common/chrome_content_client_ios.mm @@ -53,7 +53,7 @@ std::string ChromeContentClient::GetUserAgent() const { return webkit_glue::BuildUserAgentFromProduct(product); } -string16 ChromeContentClient::GetLocalizedString(int message_id) const { +base::string16 ChromeContentClient::GetLocalizedString(int message_id) const { return l10n_util::GetStringUTF16(message_id); } diff --git a/chrome/common/chrome_version_info_win.cc b/chrome/common/chrome_version_info_win.cc index 03fa7b6..a7568a8 100644 --- a/chrome/common/chrome_version_info_win.cc +++ b/chrome/common/chrome_version_info_win.cc @@ -18,7 +18,7 @@ namespace chrome { std::string VersionInfo::GetVersionStringModifier() { #if defined(GOOGLE_CHROME_BUILD) base::FilePath module; - string16 channel; + base::string16 channel; if (PathService::Get(base::FILE_MODULE, &module)) { bool is_system_install = !InstallUtil::IsPerUserInstall(module.value().c_str()); diff --git a/chrome/common/content_settings_helper.cc b/chrome/common/content_settings_helper.cc index af80870..ea6226b 100644 --- a/chrome/common/content_settings_helper.cc +++ b/chrome/common/content_settings_helper.cc @@ -22,7 +22,7 @@ std::string OriginToString(const GURL& origin) { return scheme_component + origin.host() + port_component; } -string16 OriginToString16(const GURL& origin) { +base::string16 OriginToString16(const GURL& origin) { return UTF8ToUTF16(OriginToString(origin)); } diff --git a/chrome/common/content_settings_helper.h b/chrome/common/content_settings_helper.h index 3662afc..8c017c8 100644 --- a/chrome/common/content_settings_helper.h +++ b/chrome/common/content_settings_helper.h @@ -16,7 +16,7 @@ namespace content_settings_helper { // Return simplified string representing origin. If origin is using http or // the standard port, those parts are not included in the output. std::string OriginToString(const GURL& origin); -string16 OriginToString16(const GURL& origin); +base::string16 OriginToString16(const GURL& origin); } // namespace content_settings_helper diff --git a/chrome/common/custom_handlers/protocol_handler.cc b/chrome/common/custom_handlers/protocol_handler.cc index 8b4d893..f8af6a9 100644 --- a/chrome/common/custom_handlers/protocol_handler.cc +++ b/chrome/common/custom_handlers/protocol_handler.cc @@ -11,7 +11,7 @@ ProtocolHandler::ProtocolHandler(const std::string& protocol, const GURL& url, - const string16& title) + const base::string16& title) : protocol_(protocol), url_(url), title_(title) { @@ -20,7 +20,7 @@ ProtocolHandler::ProtocolHandler(const std::string& protocol, ProtocolHandler ProtocolHandler::CreateProtocolHandler( const std::string& protocol, const GURL& url, - const string16& title) { + const base::string16& title) { std::string lower_protocol = StringToLowerASCII(protocol); return ProtocolHandler(lower_protocol, url, title); } @@ -49,7 +49,7 @@ ProtocolHandler ProtocolHandler::CreateProtocolHandler( return EmptyProtocolHandler(); } std::string protocol, url; - string16 title; + base::string16 title; value->GetString("protocol", &protocol); value->GetString("url", &url); value->GetString("title", &title); diff --git a/chrome/common/custom_handlers/protocol_handler.h b/chrome/common/custom_handlers/protocol_handler.h index 6652ba6..dc18be5 100644 --- a/chrome/common/custom_handlers/protocol_handler.h +++ b/chrome/common/custom_handlers/protocol_handler.h @@ -17,7 +17,7 @@ class ProtocolHandler { public: static ProtocolHandler CreateProtocolHandler(const std::string& protocol, const GURL& url, - const string16& title); + const base::string16& title); // Creates a ProtocolHandler with fields from the dictionary. Returns an // empty ProtocolHandler if the input is invalid. @@ -48,7 +48,7 @@ class ProtocolHandler { const std::string& protocol() const { return protocol_; } const GURL& url() const { return url_;} - const string16& title() const { return title_; } + const base::string16& title() const { return title_; } bool IsEmpty() const { return protocol_.empty(); @@ -66,12 +66,12 @@ class ProtocolHandler { private: ProtocolHandler(const std::string& protocol, const GURL& url, - const string16& title); + const base::string16& title); ProtocolHandler(); std::string protocol_; GURL url_; - string16 title_; + base::string16 title_; }; #endif // CHROME_COMMON_CUSTOM_HANDLERS_PROTOCOL_HANDLER_H_ diff --git a/chrome/common/extensions/api/commands/commands_handler.cc b/chrome/common/extensions/api/commands/commands_handler.cc index 852f152..71697f1 100644 --- a/chrome/common/extensions/api/commands/commands_handler.cc +++ b/chrome/common/extensions/api/commands/commands_handler.cc @@ -61,7 +61,7 @@ CommandsHandler::CommandsHandler() { CommandsHandler::~CommandsHandler() { } -bool CommandsHandler::Parse(Extension* extension, string16* error) { +bool CommandsHandler::Parse(Extension* extension, base::string16* error) { if (!extension->manifest()->HasKey(keys::kCommands)) { scoped_ptr<CommandsInfo> commands_info(new CommandsInfo); MaybeSetBrowserActionDefault(extension, commands_info.get()); @@ -139,7 +139,7 @@ void CommandsHandler::MaybeSetBrowserActionDefault(const Extension* extension, !info->browser_action_command.get()) { info->browser_action_command.reset( new Command(manifest_values::kBrowserActionCommandEvent, - string16(), + base::string16(), std::string(), false)); } diff --git a/chrome/common/extensions/api/commands/commands_handler.h b/chrome/common/extensions/api/commands/commands_handler.h index ca75764..9d30bf5 100644 --- a/chrome/common/extensions/api/commands/commands_handler.h +++ b/chrome/common/extensions/api/commands/commands_handler.h @@ -40,7 +40,7 @@ class CommandsHandler : public ManifestHandler { CommandsHandler(); virtual ~CommandsHandler(); - virtual bool Parse(Extension* extension, string16* error) OVERRIDE; + virtual bool Parse(Extension* extension, base::string16* error) OVERRIDE; virtual bool AlwaysParseForType(Manifest::Type type) const OVERRIDE; private: diff --git a/chrome/common/extensions/api/extension_action/action_info.cc b/chrome/common/extensions/api/extension_action/action_info.cc index 715af4d..badd2c8 100644 --- a/chrome/common/extensions/api/extension_action/action_info.cc +++ b/chrome/common/extensions/api/extension_action/action_info.cc @@ -55,7 +55,7 @@ ActionInfo::~ActionInfo() { // static scoped_ptr<ActionInfo> ActionInfo::Load(const Extension* extension, const base::DictionaryValue* dict, - string16* error) { + base::string16* error) { scoped_ptr<ActionInfo> result(new ActionInfo()); if (extension->manifest_version() == 1) { diff --git a/chrome/common/extensions/api/extension_action/action_info.h b/chrome/common/extensions/api/extension_action/action_info.h index c1f0714..12d7b2b 100644 --- a/chrome/common/extensions/api/extension_action/action_info.h +++ b/chrome/common/extensions/api/extension_action/action_info.h @@ -35,7 +35,7 @@ struct ActionInfo { // Loads an ActionInfo from the given DictionaryValue. static scoped_ptr<ActionInfo> Load(const Extension* extension, const base::DictionaryValue* dict, - string16* error); + base::string16* error); // Returns the extension's browser action, if any. static const ActionInfo* GetBrowserActionInfo(const Extension* extension); diff --git a/chrome/common/extensions/api/extension_action/browser_action_handler.cc b/chrome/common/extensions/api/extension_action/browser_action_handler.cc index f877554..1cf6b8b 100644 --- a/chrome/common/extensions/api/extension_action/browser_action_handler.cc +++ b/chrome/common/extensions/api/extension_action/browser_action_handler.cc @@ -24,7 +24,7 @@ BrowserActionHandler::~BrowserActionHandler() { } bool BrowserActionHandler::Parse(Extension* extension, - string16* error) { + base::string16* error) { const base::DictionaryValue* dict = NULL; if (!extension->manifest()->GetDictionary( manifest_keys::kBrowserAction, &dict)) { diff --git a/chrome/common/extensions/api/extension_action/browser_action_handler.h b/chrome/common/extensions/api/extension_action/browser_action_handler.h index 4d1122f..6769f53 100644 --- a/chrome/common/extensions/api/extension_action/browser_action_handler.h +++ b/chrome/common/extensions/api/extension_action/browser_action_handler.h @@ -19,7 +19,7 @@ class BrowserActionHandler : public ManifestHandler { BrowserActionHandler(); virtual ~BrowserActionHandler(); - virtual bool Parse(Extension* extension, string16* error) OVERRIDE; + virtual bool Parse(Extension* extension, base::string16* error) OVERRIDE; virtual bool Validate(const Extension* extension, std::string* error, std::vector<InstallWarning>* warnings) const OVERRIDE; diff --git a/chrome/common/extensions/api/extension_action/browser_action_manifest_unittest.cc b/chrome/common/extensions/api/extension_action/browser_action_manifest_unittest.cc index 78aa046..b2f223f 100644 --- a/chrome/common/extensions/api/extension_action/browser_action_manifest_unittest.cc +++ b/chrome/common/extensions/api/extension_action/browser_action_manifest_unittest.cc @@ -103,7 +103,7 @@ TEST_F(BrowserActionManifestTest, DictionaryBuilder().Set("19", std::string()) // Invalid value. .Set("24", "icon24.png").Set("38", "icon38.png"))).Build(); - string16 error = ErrorUtils::FormatErrorMessageUTF16( + base::string16 error = ErrorUtils::FormatErrorMessageUTF16( errors::kInvalidIconPath, "19"); LoadAndExpectError(Manifest(manifest_value.get(), "Invalid default icon"), errors::kInvalidIconPath); diff --git a/chrome/common/extensions/api/extension_action/page_action_handler.cc b/chrome/common/extensions/api/extension_action/page_action_handler.cc index d607afa..7f87e6c 100644 --- a/chrome/common/extensions/api/extension_action/page_action_handler.cc +++ b/chrome/common/extensions/api/extension_action/page_action_handler.cc @@ -23,7 +23,7 @@ PageActionHandler::PageActionHandler() { PageActionHandler::~PageActionHandler() { } -bool PageActionHandler::Parse(Extension* extension, string16* error) { +bool PageActionHandler::Parse(Extension* extension, base::string16* error) { scoped_ptr<ActionInfo> page_action_info; const base::DictionaryValue* page_action_value = NULL; diff --git a/chrome/common/extensions/api/extension_action/page_action_handler.h b/chrome/common/extensions/api/extension_action/page_action_handler.h index bd8fd67..b5db539 100644 --- a/chrome/common/extensions/api/extension_action/page_action_handler.h +++ b/chrome/common/extensions/api/extension_action/page_action_handler.h @@ -19,7 +19,7 @@ class PageActionHandler : public ManifestHandler { PageActionHandler(); virtual ~PageActionHandler(); - virtual bool Parse(Extension* extension, string16* error) OVERRIDE; + virtual bool Parse(Extension* extension, base::string16* error) OVERRIDE; virtual bool Validate(const Extension* extension, std::string* error, std::vector<InstallWarning>* warnings) const OVERRIDE; diff --git a/chrome/common/extensions/api/extension_action/script_badge_handler.cc b/chrome/common/extensions/api/extension_action/script_badge_handler.cc index 519d6db..97c9b58 100644 --- a/chrome/common/extensions/api/extension_action/script_badge_handler.cc +++ b/chrome/common/extensions/api/extension_action/script_badge_handler.cc @@ -30,7 +30,7 @@ const std::vector<std::string> ScriptBadgeHandler::PrerequisiteKeys() const { return SingleKey(keys::kIcons); } -bool ScriptBadgeHandler::Parse(Extension* extension, string16* error) { +bool ScriptBadgeHandler::Parse(Extension* extension, base::string16* error) { scoped_ptr<ActionInfo> action_info(new ActionInfo); // Provide a default script badge if one isn't declared in the manifest. diff --git a/chrome/common/extensions/api/extension_action/script_badge_handler.h b/chrome/common/extensions/api/extension_action/script_badge_handler.h index 5f2efb3..59e2b2b 100644 --- a/chrome/common/extensions/api/extension_action/script_badge_handler.h +++ b/chrome/common/extensions/api/extension_action/script_badge_handler.h @@ -19,7 +19,7 @@ class ScriptBadgeHandler : public ManifestHandler { ScriptBadgeHandler(); virtual ~ScriptBadgeHandler(); - virtual bool Parse(Extension* extension, string16* error) OVERRIDE; + virtual bool Parse(Extension* extension, base::string16* error) OVERRIDE; virtual const std::vector<std::string> PrerequisiteKeys() const OVERRIDE; virtual bool AlwaysParseForType(Manifest::Type type) const OVERRIDE; diff --git a/chrome/common/extensions/api/file_browser_handlers/file_browser_handler.cc b/chrome/common/extensions/api/file_browser_handlers/file_browser_handler.cc index ff6df3d..7948e5b 100644 --- a/chrome/common/extensions/api/file_browser_handlers/file_browser_handler.cc +++ b/chrome/common/extensions/api/file_browser_handlers/file_browser_handler.cc @@ -133,7 +133,7 @@ namespace { FileBrowserHandler* LoadFileBrowserHandler( const std::string& extension_id, const DictionaryValue* file_browser_handler, - string16* error) { + base::string16* error) { scoped_ptr<FileBrowserHandler> result(new FileBrowserHandler()); result->set_extension_id(extension_id); @@ -245,7 +245,7 @@ bool LoadFileBrowserHandlers( const std::string& extension_id, const ListValue* extension_actions, FileBrowserHandler::List* result, - string16* error) { + base::string16* error) { for (ListValue::const_iterator iter = extension_actions->begin(); iter != extension_actions->end(); ++iter) { @@ -266,7 +266,7 @@ bool LoadFileBrowserHandlers( } // namespace bool FileBrowserHandlerParser::Parse(extensions::Extension* extension, - string16* error) { + base::string16* error) { const ListValue* file_browser_handlers_value = NULL; if (!extension->manifest()->GetList(keys::kFileBrowserHandlers, &file_browser_handlers_value)) { diff --git a/chrome/common/extensions/api/file_browser_handlers/file_browser_handler.h b/chrome/common/extensions/api/file_browser_handlers/file_browser_handler.h index faf8b82..733b2a6 100644 --- a/chrome/common/extensions/api/file_browser_handlers/file_browser_handler.h +++ b/chrome/common/extensions/api/file_browser_handlers/file_browser_handler.h @@ -92,7 +92,7 @@ class FileBrowserHandlerParser : public extensions::ManifestHandler { virtual ~FileBrowserHandlerParser(); virtual bool Parse(extensions::Extension* extension, - string16* error) OVERRIDE; + base::string16* error) OVERRIDE; private: virtual const std::vector<std::string> Keys() const OVERRIDE; diff --git a/chrome/common/extensions/api/file_handlers/file_handlers_parser.cc b/chrome/common/extensions/api/file_handlers/file_handlers_parser.cc index 9e5958a..70a8917 100644 --- a/chrome/common/extensions/api/file_handlers/file_handlers_parser.cc +++ b/chrome/common/extensions/api/file_handlers/file_handlers_parser.cc @@ -42,7 +42,7 @@ FileHandlersParser::~FileHandlersParser() { bool LoadFileHandler(const std::string& handler_id, const base::DictionaryValue& handler_info, std::vector<FileHandlerInfo>* file_handlers, - string16* error) { + base::string16* error) { DCHECK(error); FileHandlerInfo handler; @@ -110,7 +110,7 @@ bool LoadFileHandler(const std::string& handler_id, return true; } -bool FileHandlersParser::Parse(Extension* extension, string16* error) { +bool FileHandlersParser::Parse(Extension* extension, base::string16* error) { scoped_ptr<FileHandlers> info(new FileHandlers); const base::DictionaryValue* all_handlers = NULL; if (!extension->manifest()->GetDictionary(keys::kFileHandlers, diff --git a/chrome/common/extensions/api/file_handlers/file_handlers_parser.h b/chrome/common/extensions/api/file_handlers/file_handlers_parser.h index 82bbac5..5d3e3cf 100644 --- a/chrome/common/extensions/api/file_handlers/file_handlers_parser.h +++ b/chrome/common/extensions/api/file_handlers/file_handlers_parser.h @@ -44,7 +44,7 @@ class FileHandlersParser : public ManifestHandler { FileHandlersParser(); virtual ~FileHandlersParser(); - virtual bool Parse(Extension* extension, string16* error) OVERRIDE; + virtual bool Parse(Extension* extension, base::string16* error) OVERRIDE; private: virtual const std::vector<std::string> Keys() const OVERRIDE; diff --git a/chrome/common/extensions/api/i18n/default_locale_handler.cc b/chrome/common/extensions/api/i18n/default_locale_handler.cc index c395ced..5bf98a5 100644 --- a/chrome/common/extensions/api/i18n/default_locale_handler.cc +++ b/chrome/common/extensions/api/i18n/default_locale_handler.cc @@ -36,7 +36,7 @@ DefaultLocaleHandler::DefaultLocaleHandler() { DefaultLocaleHandler::~DefaultLocaleHandler() { } -bool DefaultLocaleHandler::Parse(Extension* extension, string16* error) { +bool DefaultLocaleHandler::Parse(Extension* extension, base::string16* error) { scoped_ptr<LocaleInfo> info(new LocaleInfo); if (!extension->manifest()->GetString(keys::kDefaultLocale, &info->default_locale) || diff --git a/chrome/common/extensions/api/i18n/default_locale_handler.h b/chrome/common/extensions/api/i18n/default_locale_handler.h index e59730b..bc25f57 100644 --- a/chrome/common/extensions/api/i18n/default_locale_handler.h +++ b/chrome/common/extensions/api/i18n/default_locale_handler.h @@ -26,7 +26,7 @@ class DefaultLocaleHandler : public ManifestHandler { DefaultLocaleHandler(); virtual ~DefaultLocaleHandler(); - virtual bool Parse(Extension* extension, string16* error) OVERRIDE; + virtual bool Parse(Extension* extension, base::string16* error) OVERRIDE; // Validates locale info. Doesn't check if messages.json files are valid. virtual bool Validate(const Extension* extension, diff --git a/chrome/common/extensions/api/identity/oauth2_manifest_handler.cc b/chrome/common/extensions/api/identity/oauth2_manifest_handler.cc index f101db7..e4af424 100644 --- a/chrome/common/extensions/api/identity/oauth2_manifest_handler.cc +++ b/chrome/common/extensions/api/identity/oauth2_manifest_handler.cc @@ -45,7 +45,7 @@ OAuth2ManifestHandler::~OAuth2ManifestHandler() { } bool OAuth2ManifestHandler::Parse(Extension* extension, - string16* error) { + base::string16* error) { scoped_ptr<OAuth2Info> info(new OAuth2Info); const base::DictionaryValue* dict = NULL; if (!extension->manifest()->GetDictionary(keys::kOAuth2, &dict)) { diff --git a/chrome/common/extensions/api/identity/oauth2_manifest_handler.h b/chrome/common/extensions/api/identity/oauth2_manifest_handler.h index 5095de8..59a82b7 100644 --- a/chrome/common/extensions/api/identity/oauth2_manifest_handler.h +++ b/chrome/common/extensions/api/identity/oauth2_manifest_handler.h @@ -35,7 +35,7 @@ class OAuth2ManifestHandler : public ManifestHandler { virtual ~OAuth2ManifestHandler(); virtual bool Parse(Extension* extension, - string16* error) OVERRIDE; + base::string16* error) OVERRIDE; private: virtual const std::vector<std::string> Keys() const OVERRIDE; diff --git a/chrome/common/extensions/api/input_ime/input_components_handler.cc b/chrome/common/extensions/api/input_ime/input_components_handler.cc index 3efbbf0..cdf2f2a 100644 --- a/chrome/common/extensions/api/input_ime/input_components_handler.cc +++ b/chrome/common/extensions/api/input_ime/input_components_handler.cc @@ -47,7 +47,7 @@ InputComponentsHandler::~InputComponentsHandler() { } bool InputComponentsHandler::Parse(Extension* extension, - string16* error) { + base::string16* error) { scoped_ptr<InputComponents> info(new InputComponents); const base::ListValue* list_value = NULL; if (!extension->manifest()->GetList(keys::kInputComponents, &list_value)) { diff --git a/chrome/common/extensions/api/input_ime/input_components_handler.h b/chrome/common/extensions/api/input_ime/input_components_handler.h index ea28ab9..4444a3d 100644 --- a/chrome/common/extensions/api/input_ime/input_components_handler.h +++ b/chrome/common/extensions/api/input_ime/input_components_handler.h @@ -60,7 +60,7 @@ class InputComponentsHandler : public ManifestHandler { InputComponentsHandler(); virtual ~InputComponentsHandler(); - virtual bool Parse(Extension* extension, string16* error) OVERRIDE; + virtual bool Parse(Extension* extension, base::string16* error) OVERRIDE; // Requires kOptionsPage is already parsed. virtual const std::vector<std::string> PrerequisiteKeys() const OVERRIDE; diff --git a/chrome/common/extensions/api/managed_mode_private/managed_mode_handler.cc b/chrome/common/extensions/api/managed_mode_private/managed_mode_handler.cc index 7690eeb..1fbebd0 100644 --- a/chrome/common/extensions/api/managed_mode_private/managed_mode_handler.cc +++ b/chrome/common/extensions/api/managed_mode_private/managed_mode_handler.cc @@ -44,7 +44,7 @@ ManagedModeHandler::ManagedModeHandler() { ManagedModeHandler::~ManagedModeHandler() { } -bool ManagedModeHandler::Parse(Extension* extension, string16* error) { +bool ManagedModeHandler::Parse(Extension* extension, base::string16* error) { if (!extension->manifest()->HasKey(keys::kContentPack)) return true; @@ -72,7 +72,7 @@ const std::vector<std::string> ManagedModeHandler::Keys() const { bool ManagedModeHandler::LoadSites( ManagedModeInfo* info, const base::DictionaryValue* content_pack_value, - string16* error) { + base::string16* error) { if (!content_pack_value->HasKey(keys::kContentPackSites)) return true; @@ -91,7 +91,7 @@ bool ManagedModeHandler::LoadSites( bool ManagedModeHandler::LoadConfigurations( ManagedModeInfo* info, const base::DictionaryValue* content_pack_value, - string16* error) { + base::string16* error) { NOTIMPLEMENTED(); return true; } diff --git a/chrome/common/extensions/api/managed_mode_private/managed_mode_handler.h b/chrome/common/extensions/api/managed_mode_private/managed_mode_handler.h index f02b37d..81822c5 100644 --- a/chrome/common/extensions/api/managed_mode_private/managed_mode_handler.h +++ b/chrome/common/extensions/api/managed_mode_private/managed_mode_handler.h @@ -33,16 +33,16 @@ class ManagedModeHandler : public ManifestHandler { ManagedModeHandler(); virtual ~ManagedModeHandler(); - virtual bool Parse(Extension* extension, string16* error) OVERRIDE; + virtual bool Parse(Extension* extension, base::string16* error) OVERRIDE; private: virtual const std::vector<std::string> Keys() const OVERRIDE; bool LoadSites(ManagedModeInfo* info, const base::DictionaryValue* content_pack_value, - string16* error); + base::string16* error); bool LoadConfigurations(ManagedModeInfo* info, const base::DictionaryValue* content_pack_value, - string16* error); + base::string16* error); DISALLOW_COPY_AND_ASSIGN(ManagedModeHandler); }; diff --git a/chrome/common/extensions/api/media_galleries_private/media_galleries_handler.cc b/chrome/common/extensions/api/media_galleries_private/media_galleries_handler.cc index 209be44..2dce164 100644 --- a/chrome/common/extensions/api/media_galleries_private/media_galleries_handler.cc +++ b/chrome/common/extensions/api/media_galleries_private/media_galleries_handler.cc @@ -36,7 +36,7 @@ MediaGalleriesHandlerInfo::~MediaGalleriesHandlerInfo() { MediaGalleriesHandler* LoadMediaGalleriesHandler( const std::string& extension_id, const DictionaryValue* media_galleries_handler, - string16* error) { + base::string16* error) { scoped_ptr<MediaGalleriesHandler> result(new MediaGalleriesHandler()); result->set_extension_id(extension_id); @@ -80,7 +80,7 @@ bool LoadMediaGalleriesHandlers( const std::string& extension_id, const base::ListValue* extension_actions, MediaGalleriesHandler::List* result, - string16* error) { + base::string16* error) { for (base::ListValue::const_iterator iter = extension_actions->begin(); iter != extension_actions->end(); ++iter) { @@ -123,7 +123,7 @@ MediaGalleriesHandlerParser::~MediaGalleriesHandlerParser() { } bool MediaGalleriesHandlerParser::Parse(extensions::Extension* extension, - string16* error) { + base::string16* error) { const base::ListValue* media_galleries_handlers_value = NULL; if (!extension->manifest()->GetList(keys::kMediaGalleriesHandlers, &media_galleries_handlers_value)) { diff --git a/chrome/common/extensions/api/media_galleries_private/media_galleries_handler.h b/chrome/common/extensions/api/media_galleries_private/media_galleries_handler.h index 7614f86..1e7c92e 100644 --- a/chrome/common/extensions/api/media_galleries_private/media_galleries_handler.h +++ b/chrome/common/extensions/api/media_galleries_private/media_galleries_handler.h @@ -61,7 +61,7 @@ class MediaGalleriesHandlerParser : public extensions::ManifestHandler { virtual ~MediaGalleriesHandlerParser(); virtual bool Parse(extensions::Extension* extension, - string16* error) OVERRIDE; + base::string16* error) OVERRIDE; private: virtual const std::vector<std::string> Keys() const OVERRIDE; diff --git a/chrome/common/extensions/api/omnibox/omnibox_handler.cc b/chrome/common/extensions/api/omnibox/omnibox_handler.cc index 77500ac..e43a5a6 100644 --- a/chrome/common/extensions/api/omnibox/omnibox_handler.cc +++ b/chrome/common/extensions/api/omnibox/omnibox_handler.cc @@ -34,7 +34,7 @@ OmniboxHandler::OmniboxHandler() { OmniboxHandler::~OmniboxHandler() { } -bool OmniboxHandler::Parse(Extension* extension, string16* error) { +bool OmniboxHandler::Parse(Extension* extension, base::string16* error) { scoped_ptr<OmniboxInfo> info(new OmniboxInfo); const base::DictionaryValue* dict = NULL; if (!extension->manifest()->GetDictionary(manifest_keys::kOmnibox, diff --git a/chrome/common/extensions/api/omnibox/omnibox_handler.h b/chrome/common/extensions/api/omnibox/omnibox_handler.h index 681f01d..9bb1f2f 100644 --- a/chrome/common/extensions/api/omnibox/omnibox_handler.h +++ b/chrome/common/extensions/api/omnibox/omnibox_handler.h @@ -28,7 +28,7 @@ class OmniboxHandler : public ManifestHandler { OmniboxHandler(); virtual ~OmniboxHandler(); - virtual bool Parse(Extension* extension, string16* error) OVERRIDE; + virtual bool Parse(Extension* extension, base::string16* error) OVERRIDE; private: virtual const std::vector<std::string> Keys() const OVERRIDE; diff --git a/chrome/common/extensions/api/plugins/plugins_handler.cc b/chrome/common/extensions/api/plugins/plugins_handler.cc index 2b0f67a..e7834c1 100644 --- a/chrome/common/extensions/api/plugins/plugins_handler.cc +++ b/chrome/common/extensions/api/plugins/plugins_handler.cc @@ -66,7 +66,7 @@ const std::vector<std::string> PluginsHandler::Keys() const { return SingleKey(keys::kPlugins); } -bool PluginsHandler::Parse(Extension* extension, string16* error) { +bool PluginsHandler::Parse(Extension* extension, base::string16* error) { const base::ListValue* list_value = NULL; if (!extension->manifest()->GetList(keys::kPlugins, &list_value)) { *error = ASCIIToUTF16(manifest_errors::kInvalidPlugins); diff --git a/chrome/common/extensions/api/plugins/plugins_handler.h b/chrome/common/extensions/api/plugins/plugins_handler.h index 3f58f5a..8b7ed3b 100644 --- a/chrome/common/extensions/api/plugins/plugins_handler.h +++ b/chrome/common/extensions/api/plugins/plugins_handler.h @@ -36,7 +36,7 @@ class PluginsHandler : public ManifestHandler { PluginsHandler(); virtual ~PluginsHandler(); - virtual bool Parse(Extension* extension, string16* error) OVERRIDE; + virtual bool Parse(Extension* extension, base::string16* error) OVERRIDE; virtual bool Validate(const Extension* extension, std::string* error, std::vector<InstallWarning>* warnings) const OVERRIDE; diff --git a/chrome/common/extensions/api/sockets/sockets_manifest_data.cc b/chrome/common/extensions/api/sockets/sockets_manifest_data.cc index b00c8e0..794ea05 100644 --- a/chrome/common/extensions/api/sockets/sockets_manifest_data.cc +++ b/chrome/common/extensions/api/sockets/sockets_manifest_data.cc @@ -38,7 +38,7 @@ bool SocketsManifestData::CheckRequest( // static scoped_ptr<SocketsManifestData> SocketsManifestData::FromValue( const base::Value& value, - string16* error) { + base::string16* error) { scoped_ptr<SocketsManifestPermission> permission = SocketsManifestPermission::FromValue(value, error); if (!permission) diff --git a/chrome/common/extensions/api/sockets/sockets_manifest_data.h b/chrome/common/extensions/api/sockets/sockets_manifest_data.h index d284497..bdfdc55 100644 --- a/chrome/common/extensions/api/sockets/sockets_manifest_data.h +++ b/chrome/common/extensions/api/sockets/sockets_manifest_data.h @@ -39,7 +39,7 @@ class SocketsManifestData : public Extension::ManifestData { // the manifest. Sets |error| and returns an empty scoped_ptr on failure. static scoped_ptr<SocketsManifestData> FromValue( const base::Value& value, - string16* error); + base::string16* error); const SocketsManifestPermission* permission() const { return permission_.get(); diff --git a/chrome/common/extensions/api/sockets/sockets_manifest_handler.cc b/chrome/common/extensions/api/sockets/sockets_manifest_handler.cc index c1ba23f..25727069 100644 --- a/chrome/common/extensions/api/sockets/sockets_manifest_handler.cc +++ b/chrome/common/extensions/api/sockets/sockets_manifest_handler.cc @@ -15,7 +15,8 @@ SocketsManifestHandler::SocketsManifestHandler() {} SocketsManifestHandler::~SocketsManifestHandler() {} -bool SocketsManifestHandler::Parse(Extension* extension, string16* error) { +bool SocketsManifestHandler::Parse(Extension* extension, + base::string16* error) { const base::Value* sockets = NULL; CHECK(extension->manifest()->Get(manifest_keys::kSockets, &sockets)); scoped_ptr<SocketsManifestData> data = diff --git a/chrome/common/extensions/api/sockets/sockets_manifest_handler.h b/chrome/common/extensions/api/sockets/sockets_manifest_handler.h index 17dc401..1781156 100644 --- a/chrome/common/extensions/api/sockets/sockets_manifest_handler.h +++ b/chrome/common/extensions/api/sockets/sockets_manifest_handler.h @@ -24,7 +24,7 @@ class SocketsManifestHandler : public ManifestHandler { virtual ~SocketsManifestHandler(); // ManifestHandler overrides. - virtual bool Parse(Extension* extension, string16* error) OVERRIDE; + virtual bool Parse(Extension* extension, base::string16* error) OVERRIDE; virtual ManifestPermission* CreatePermission() OVERRIDE; virtual ManifestPermission* CreateInitialRequiredPermission( const Extension* extension) OVERRIDE; diff --git a/chrome/common/extensions/api/sockets/sockets_manifest_permission.cc b/chrome/common/extensions/api/sockets/sockets_manifest_permission.cc index 2e17f46..6819861 100644 --- a/chrome/common/extensions/api/sockets/sockets_manifest_permission.cc +++ b/chrome/common/extensions/api/sockets/sockets_manifest_permission.cc @@ -33,7 +33,7 @@ static bool ParseHostPattern( SocketsManifestPermission* permission, content::SocketPermissionRequest::OperationType operation_type, const std::string& host_pattern, - string16* error) { + base::string16* error) { SocketPermissionEntry entry; if (!SocketPermissionEntry::ParseHostPattern( operation_type, host_pattern, &entry)) { @@ -49,7 +49,7 @@ static bool ParseHostPatterns( SocketsManifestPermission* permission, content::SocketPermissionRequest::OperationType operation_type, const scoped_ptr<SocketHostPatterns>& host_patterns, - string16* error) { + base::string16* error) { if (!host_patterns) return true; @@ -92,7 +92,7 @@ SocketsManifestPermission::~SocketsManifestPermission() {} // static scoped_ptr<SocketsManifestPermission> SocketsManifestPermission::FromValue( const base::Value& value, - string16* error) { + base::string16* error) { scoped_ptr<Sockets> sockets = Sockets::FromValue(value, error); if (!sockets) return scoped_ptr<SocketsManifestPermission>(); @@ -176,7 +176,7 @@ PermissionMessages SocketsManifestPermission::GetMessages() const { bool SocketsManifestPermission::FromValue(const base::Value* value) { if (!value) return false; - string16 error; + base::string16 error; scoped_ptr<SocketsManifestPermission> manifest_permission( SocketsManifestPermission::FromValue(*value, &error)); @@ -320,7 +320,7 @@ bool SocketsManifestPermission::AddAnyHostMessage( void SocketsManifestPermission::AddSubdomainHostMessage( PermissionMessages& messages) const { - std::set<string16> domains; + std::set<base::string16> domains; for (SocketPermissionEntrySet::const_iterator it = permissions_.begin(); it != permissions_.end(); ++it) { if (it->GetHostType() == SocketPermissionEntry::HOSTS_IN_DOMAINS) @@ -335,14 +335,14 @@ void SocketsManifestPermission::AddSubdomainHostMessage( l10n_util::GetStringFUTF16( id, JoinString( - std::vector<string16>( + std::vector<base::string16>( domains.begin(), domains.end()), ' ')))); } } void SocketsManifestPermission::AddSpecificHostMessage( PermissionMessages& messages) const { - std::set<string16> hostnames; + std::set<base::string16> hostnames; for (SocketPermissionEntrySet::const_iterator it = permissions_.begin(); it != permissions_.end(); ++it) { if (it->GetHostType() == SocketPermissionEntry::SPECIFIC_HOSTS) @@ -357,7 +357,7 @@ void SocketsManifestPermission::AddSpecificHostMessage( l10n_util::GetStringFUTF16( id, JoinString( - std::vector<string16>( + std::vector<base::string16>( hostnames.begin(), hostnames.end()), ' ')))); } } diff --git a/chrome/common/extensions/api/sockets/sockets_manifest_permission.h b/chrome/common/extensions/api/sockets/sockets_manifest_permission.h index e9cf405..92112c0 100644 --- a/chrome/common/extensions/api/sockets/sockets_manifest_permission.h +++ b/chrome/common/extensions/api/sockets/sockets_manifest_permission.h @@ -32,7 +32,7 @@ class SocketsManifestPermission : public ManifestPermission { // the manifest. Sets |error| and returns an empty scoped_ptr on failure. static scoped_ptr<SocketsManifestPermission> FromValue( const base::Value& value, - string16* error); + base::string16* error); bool CheckRequest(const Extension* extension, const content::SocketPermissionRequest& request) const; diff --git a/chrome/common/extensions/api/speech/tts_engine_manifest_handler.cc b/chrome/common/extensions/api/speech/tts_engine_manifest_handler.cc index e18c594..0dd93fb 100644 --- a/chrome/common/extensions/api/speech/tts_engine_manifest_handler.cc +++ b/chrome/common/extensions/api/speech/tts_engine_manifest_handler.cc @@ -47,7 +47,8 @@ TtsEngineManifestHandler::TtsEngineManifestHandler() { TtsEngineManifestHandler::~TtsEngineManifestHandler() { } -bool TtsEngineManifestHandler::Parse(Extension* extension, string16* error) { +bool TtsEngineManifestHandler::Parse(Extension* extension, + base::string16* error) { scoped_ptr<TtsVoices> info(new TtsVoices); const base::DictionaryValue* tts_dict = NULL; if (!extension->manifest()->GetDictionary(keys::kTtsEngine, &tts_dict)) { diff --git a/chrome/common/extensions/api/speech/tts_engine_manifest_handler.h b/chrome/common/extensions/api/speech/tts_engine_manifest_handler.h index e9640c5..e8176a0 100644 --- a/chrome/common/extensions/api/speech/tts_engine_manifest_handler.h +++ b/chrome/common/extensions/api/speech/tts_engine_manifest_handler.h @@ -33,7 +33,7 @@ class TtsEngineManifestHandler : public ManifestHandler { TtsEngineManifestHandler(); virtual ~TtsEngineManifestHandler(); - virtual bool Parse(Extension* extension, string16* error) OVERRIDE; + virtual bool Parse(Extension* extension, base::string16* error) OVERRIDE; private: virtual const std::vector<std::string> Keys() const OVERRIDE; diff --git a/chrome/common/extensions/api/spellcheck/spellcheck_handler.cc b/chrome/common/extensions/api/spellcheck/spellcheck_handler.cc index 84a9f13..1ca1479 100644 --- a/chrome/common/extensions/api/spellcheck/spellcheck_handler.cc +++ b/chrome/common/extensions/api/spellcheck/spellcheck_handler.cc @@ -24,7 +24,7 @@ SpellcheckHandler::SpellcheckHandler() { SpellcheckHandler::~SpellcheckHandler() { } -bool SpellcheckHandler::Parse(Extension* extension, string16* error) { +bool SpellcheckHandler::Parse(Extension* extension, base::string16* error) { const base::DictionaryValue* spellcheck_value = NULL; if (!extension->manifest()->GetDictionary(keys::kSpellcheck, &spellcheck_value)) { diff --git a/chrome/common/extensions/api/spellcheck/spellcheck_handler.h b/chrome/common/extensions/api/spellcheck/spellcheck_handler.h index 466acfb..a3386ab 100644 --- a/chrome/common/extensions/api/spellcheck/spellcheck_handler.h +++ b/chrome/common/extensions/api/spellcheck/spellcheck_handler.h @@ -28,7 +28,7 @@ class SpellcheckHandler : public ManifestHandler { SpellcheckHandler(); virtual ~SpellcheckHandler(); - virtual bool Parse(Extension* extension, string16* error) OVERRIDE; + virtual bool Parse(Extension* extension, base::string16* error) OVERRIDE; private: virtual const std::vector<std::string> Keys() const OVERRIDE; diff --git a/chrome/common/extensions/api/storage/storage_schema_manifest_handler.cc b/chrome/common/extensions/api/storage/storage_schema_manifest_handler.cc index 87c5a812..027a283 100644 --- a/chrome/common/extensions/api/storage/storage_schema_manifest_handler.cc +++ b/chrome/common/extensions/api/storage/storage_schema_manifest_handler.cc @@ -65,7 +65,7 @@ policy::Schema StorageSchemaManifestHandler::GetSchema( #endif bool StorageSchemaManifestHandler::Parse(Extension* extension, - string16* error) { + base::string16* error) { std::string path; if (!extension->manifest()->GetString(kStorageManagedSchema, &path)) { *error = ASCIIToUTF16( diff --git a/chrome/common/extensions/api/storage/storage_schema_manifest_handler.h b/chrome/common/extensions/api/storage/storage_schema_manifest_handler.h index 89e0c28..c594310 100644 --- a/chrome/common/extensions/api/storage/storage_schema_manifest_handler.h +++ b/chrome/common/extensions/api/storage/storage_schema_manifest_handler.h @@ -31,7 +31,7 @@ class StorageSchemaManifestHandler : public ManifestHandler { private: // ManifestHandler implementation: - virtual bool Parse(Extension* extension, string16* error) OVERRIDE; + virtual bool Parse(Extension* extension, base::string16* error) OVERRIDE; virtual bool Validate(const Extension* extension, std::string* error, std::vector<InstallWarning>* warnings) const OVERRIDE; diff --git a/chrome/common/extensions/api/system_indicator/system_indicator_handler.cc b/chrome/common/extensions/api/system_indicator/system_indicator_handler.cc index d13b94d..28db8cc 100644 --- a/chrome/common/extensions/api/system_indicator/system_indicator_handler.cc +++ b/chrome/common/extensions/api/system_indicator/system_indicator_handler.cc @@ -21,7 +21,8 @@ SystemIndicatorHandler::SystemIndicatorHandler() { SystemIndicatorHandler::~SystemIndicatorHandler() { } -bool SystemIndicatorHandler::Parse(Extension* extension, string16* error) { +bool SystemIndicatorHandler::Parse(Extension* extension, + base::string16* error) { const base::DictionaryValue* system_indicator_value = NULL; if (!extension->manifest()->GetDictionary( manifest_keys::kSystemIndicator, &system_indicator_value)) { diff --git a/chrome/common/extensions/api/system_indicator/system_indicator_handler.h b/chrome/common/extensions/api/system_indicator/system_indicator_handler.h index 050ecfe..1ee1bf4 100644 --- a/chrome/common/extensions/api/system_indicator/system_indicator_handler.h +++ b/chrome/common/extensions/api/system_indicator/system_indicator_handler.h @@ -17,7 +17,7 @@ class SystemIndicatorHandler : public ManifestHandler { SystemIndicatorHandler(); virtual ~SystemIndicatorHandler(); - virtual bool Parse(Extension* extension, string16* error) OVERRIDE; + virtual bool Parse(Extension* extension, base::string16* error) OVERRIDE; private: virtual const std::vector<std::string> Keys() const OVERRIDE; diff --git a/chrome/common/extensions/api/url_handlers/url_handlers_parser.cc b/chrome/common/extensions/api/url_handlers/url_handlers_parser.cc index a399771..1299aad 100644 --- a/chrome/common/extensions/api/url_handlers/url_handlers_parser.cc +++ b/chrome/common/extensions/api/url_handlers/url_handlers_parser.cc @@ -91,7 +91,7 @@ UrlHandlersParser::~UrlHandlersParser() { bool ParseUrlHandler(const std::string& handler_id, const DictionaryValue& handler_info, std::vector<UrlHandlerInfo>* url_handlers, - string16* error) { + base::string16* error) { DCHECK(error); UrlHandlerInfo handler; @@ -132,7 +132,7 @@ bool ParseUrlHandler(const std::string& handler_id, return true; } -bool UrlHandlersParser::Parse(Extension* extension, string16* error) { +bool UrlHandlersParser::Parse(Extension* extension, base::string16* error) { scoped_ptr<UrlHandlers> info(new UrlHandlers); const DictionaryValue* all_handlers = NULL; if (!extension->manifest()->GetDictionary( diff --git a/chrome/common/extensions/api/url_handlers/url_handlers_parser.h b/chrome/common/extensions/api/url_handlers/url_handlers_parser.h index 98ffec4..4badd75 100644 --- a/chrome/common/extensions/api/url_handlers/url_handlers_parser.h +++ b/chrome/common/extensions/api/url_handlers/url_handlers_parser.h @@ -58,7 +58,7 @@ class UrlHandlersParser : public ManifestHandler { virtual ~UrlHandlersParser(); // ManifestHandler API - virtual bool Parse(Extension* extension, string16* error) OVERRIDE; + virtual bool Parse(Extension* extension, base::string16* error) OVERRIDE; private: virtual const std::vector<std::string> Keys() const OVERRIDE; diff --git a/chrome/common/extensions/command.cc b/chrome/common/extensions/command.cc index 7593974..b9c95a0 100644 --- a/chrome/common/extensions/command.cc +++ b/chrome/common/extensions/command.cc @@ -47,7 +47,7 @@ ui::Accelerator ParseImpl(const std::string& accelerator, const std::string& platform_key, int index, bool should_parse_media_keys, - string16* error) { + base::string16* error) { error->clear(); if (platform_key != values::kKeybindingPlatformWin && platform_key != values::kKeybindingPlatformMac && @@ -255,13 +255,13 @@ std::string NormalizeShortcutSuggestion(const std::string& suggestion, Command::Command() : global_(false) {} Command::Command(const std::string& command_name, - const string16& description, + const base::string16& description, const std::string& accelerator, bool global) : command_name_(command_name), description_(description), global_(global) { - string16 error; + base::string16 error; accelerator_ = ParseImpl(accelerator, CommandPlatform(), 0, IsNamedCommand(command_name), &error); } @@ -286,7 +286,7 @@ std::string Command::CommandPlatform() { // static ui::Accelerator Command::StringToAccelerator(const std::string& accelerator, const std::string& command_name) { - string16 error; + base::string16 error; ui::Accelerator parsed = ParseImpl(accelerator, Command::CommandPlatform(), 0, IsNamedCommand(command_name), &error); @@ -384,10 +384,10 @@ std::string Command::AcceleratorToString(const ui::Accelerator& accelerator) { bool Command::Parse(const base::DictionaryValue* command, const std::string& command_name, int index, - string16* error) { + base::string16* error) { DCHECK(!command_name.empty()); - string16 description; + base::string16 description; if (IsNamedCommand(command_name)) { if (!command->GetString(keys::kDescription, &description) || description.empty()) { @@ -514,7 +514,7 @@ base::DictionaryValue* Command::ToValue(const Extension* extension, bool active) const { base::DictionaryValue* extension_data = new base::DictionaryValue(); - string16 command_description; + base::string16 command_description; bool extension_action = false; if (command_name() == values::kBrowserActionCommandEvent || command_name() == values::kPageActionCommandEvent || diff --git a/chrome/common/extensions/command.h b/chrome/common/extensions/command.h index 67f0d40..0ea3fe4 100644 --- a/chrome/common/extensions/command.h +++ b/chrome/common/extensions/command.h @@ -25,7 +25,7 @@ class Command { public: Command(); Command(const std::string& command_name, - const string16& description, + const base::string16& description, const std::string& accelerator, bool global); ~Command(); @@ -46,7 +46,7 @@ class Command { bool Parse(const base::DictionaryValue* command, const std::string& command_name, int index, - string16* error); + base::string16* error); // Convert a Command object from |extension| to a DictionaryValue. // |active| specifies whether the command is active or not. @@ -56,7 +56,7 @@ class Command { // Accessors: const std::string& command_name() const { return command_name_; } const ui::Accelerator& accelerator() const { return accelerator_; } - const string16& description() const { return description_; } + const base::string16& description() const { return description_; } bool global() const { return global_; } // Setter: @@ -70,7 +70,7 @@ class Command { private: std::string command_name_; ui::Accelerator accelerator_; - string16 description_; + base::string16 description_; bool global_; }; diff --git a/chrome/common/extensions/command_unittest.cc b/chrome/common/extensions/command_unittest.cc index cd985e6..0b3c392 100644 --- a/chrome/common/extensions/command_unittest.cc +++ b/chrome/common/extensions/command_unittest.cc @@ -130,7 +130,7 @@ TEST(CommandTest, ExtensionCommandParsing) { "| index: " + base::IntToString(i)); extensions::Command command; - string16 error; + base::string16 error; bool result = command.Parse(input.get(), kTests[i].command_name, i, &error); @@ -182,7 +182,7 @@ TEST(CommandTest, ExtensionCommandParsingFallback) { input->SetString("description", description); extensions::Command command; - string16 error; + base::string16 error; EXPECT_TRUE(command.Parse(input.get(), command_name, 0, &error)); EXPECT_STREQ(description.c_str(), UTF16ToASCII(command.description()).c_str()); diff --git a/chrome/common/extensions/extension_messages.h b/chrome/common/extensions/extension_messages.h index bd0453b..7ca82c7 100644 --- a/chrome/common/extensions/extension_messages.h +++ b/chrome/common/extensions/extension_messages.h @@ -51,7 +51,7 @@ IPC_STRUCT_BEGIN(ExtensionHostMsg_DOMAction_Params) IPC_STRUCT_MEMBER(GURL, url) // Title of the page. - IPC_STRUCT_MEMBER(string16, url_title) + IPC_STRUCT_MEMBER(base::string16, url_title) // API name. IPC_STRUCT_MEMBER(std::string, api_call) diff --git a/chrome/common/extensions/manifest_handler_helpers.cc b/chrome/common/extensions/manifest_handler_helpers.cc index 1e66fe4..f46fd31 100644 --- a/chrome/common/extensions/manifest_handler_helpers.cc +++ b/chrome/common/extensions/manifest_handler_helpers.cc @@ -35,7 +35,7 @@ bool LoadIconsFromDictionary(const base::DictionaryValue* icons_value, const int* icon_sizes, size_t num_icon_sizes, ExtensionIconSet* icons, - string16* error) { + base::string16* error) { DCHECK(icons); for (size_t i = 0; i < num_icon_sizes; ++i) { std::string key = base::IntToString(icon_sizes[i]); diff --git a/chrome/common/extensions/manifest_handler_helpers.h b/chrome/common/extensions/manifest_handler_helpers.h index 29ad904..6226b9d 100644 --- a/chrome/common/extensions/manifest_handler_helpers.h +++ b/chrome/common/extensions/manifest_handler_helpers.h @@ -31,7 +31,7 @@ bool LoadIconsFromDictionary(const base::DictionaryValue* icons_value, const int* icon_sizes, size_t num_icon_sizes, ExtensionIconSet* icons, - string16* error); + base::string16* error); } // namespace manifest_handler_helpers } // namespace extensions diff --git a/chrome/common/extensions/manifest_handlers/app_isolation_info.cc b/chrome/common/extensions/manifest_handlers/app_isolation_info.cc index 2d2d2c6..212f7c2 100644 --- a/chrome/common/extensions/manifest_handlers/app_isolation_info.cc +++ b/chrome/common/extensions/manifest_handlers/app_isolation_info.cc @@ -38,7 +38,7 @@ AppIsolationHandler::AppIsolationHandler() { AppIsolationHandler::~AppIsolationHandler() { } -bool AppIsolationHandler::Parse(Extension* extension, string16* error) { +bool AppIsolationHandler::Parse(Extension* extension, base::string16* error) { // Platform apps always get isolated storage. if (extension->is_platform_app()) { extension->SetManifestData(keys::kIsolation, new AppIsolationInfo(true)); diff --git a/chrome/common/extensions/manifest_handlers/app_isolation_info.h b/chrome/common/extensions/manifest_handlers/app_isolation_info.h index c74ed9d..7b1db4a 100644 --- a/chrome/common/extensions/manifest_handlers/app_isolation_info.h +++ b/chrome/common/extensions/manifest_handlers/app_isolation_info.h @@ -30,7 +30,7 @@ class AppIsolationHandler : public ManifestHandler { AppIsolationHandler(); virtual ~AppIsolationHandler(); - virtual bool Parse(Extension* extension, string16* error) OVERRIDE; + virtual bool Parse(Extension* extension, base::string16* error) OVERRIDE; virtual bool AlwaysParseForType(Manifest::Type type) const OVERRIDE; private: diff --git a/chrome/common/extensions/manifest_handlers/app_launch_info.cc b/chrome/common/extensions/manifest_handlers/app_launch_info.cc index fe3fbea..7b3d07e 100644 --- a/chrome/common/extensions/manifest_handlers/app_launch_info.cc +++ b/chrome/common/extensions/manifest_handlers/app_launch_info.cc @@ -27,7 +27,7 @@ bool ReadLaunchDimension(const extensions::Manifest* manifest, const char* key, int* target, bool is_valid_container, - string16* error) { + base::string16* error) { const Value* temp = NULL; if (manifest->Get(key, &temp)) { if (!is_valid_container) { @@ -104,14 +104,14 @@ GURL AppLaunchInfo::GetFullLaunchURL(const Extension* extension) { return extension->url().Resolve(info.launch_local_path_); } -bool AppLaunchInfo::Parse(Extension* extension, string16* error) { +bool AppLaunchInfo::Parse(Extension* extension, base::string16* error) { if (!LoadLaunchURL(extension, error) || !LoadLaunchContainer(extension, error)) return false; return true; } -bool AppLaunchInfo::LoadLaunchURL(Extension* extension, string16* error) { +bool AppLaunchInfo::LoadLaunchURL(Extension* extension, base::string16* error) { const Value* temp = NULL; // Launch URL can be either local (to chrome-extension:// root) or an absolute @@ -225,7 +225,7 @@ bool AppLaunchInfo::LoadLaunchURL(Extension* extension, string16* error) { } bool AppLaunchInfo::LoadLaunchContainer(Extension* extension, - string16* error) { + base::string16* error) { const Value* tmp_launcher_container = NULL; if (!extension->manifest()->Get(keys::kLaunchContainer, &tmp_launcher_container)) @@ -299,7 +299,8 @@ AppLaunchManifestHandler::AppLaunchManifestHandler() { AppLaunchManifestHandler::~AppLaunchManifestHandler() { } -bool AppLaunchManifestHandler::Parse(Extension* extension, string16* error) { +bool AppLaunchManifestHandler::Parse(Extension* extension, + base::string16* error) { scoped_ptr<AppLaunchInfo> info(new AppLaunchInfo); if (!info->Parse(extension, error)) return false; diff --git a/chrome/common/extensions/manifest_handlers/app_launch_info.h b/chrome/common/extensions/manifest_handlers/app_launch_info.h index 8cb28fb..d0b0dd9 100644 --- a/chrome/common/extensions/manifest_handlers/app_launch_info.h +++ b/chrome/common/extensions/manifest_handlers/app_launch_info.h @@ -44,11 +44,11 @@ class AppLaunchInfo : public Extension::ManifestData { // Get the fully resolved absolute launch URL. static GURL GetFullLaunchURL(const Extension* extension); - bool Parse(Extension* extension, string16* error); + bool Parse(Extension* extension, base::string16* error); private: - bool LoadLaunchURL(Extension* extension, string16* error); - bool LoadLaunchContainer(Extension* extension, string16* error); + bool LoadLaunchURL(Extension* extension, base::string16* error); + bool LoadLaunchContainer(Extension* extension, base::string16* error); void OverrideLaunchURL(Extension* extension, GURL override_url); std::string launch_local_path_; @@ -69,7 +69,7 @@ class AppLaunchManifestHandler : public ManifestHandler { AppLaunchManifestHandler(); virtual ~AppLaunchManifestHandler(); - virtual bool Parse(Extension* extension, string16* error) OVERRIDE; + virtual bool Parse(Extension* extension, base::string16* error) OVERRIDE; virtual bool AlwaysParseForType(Manifest::Type type) const OVERRIDE; private: diff --git a/chrome/common/extensions/manifest_handlers/content_scripts_handler.cc b/chrome/common/extensions/manifest_handlers/content_scripts_handler.cc index 6e48e82..32d42f9 100644 --- a/chrome/common/extensions/manifest_handlers/content_scripts_handler.cc +++ b/chrome/common/extensions/manifest_handlers/content_scripts_handler.cc @@ -36,7 +36,7 @@ namespace { bool LoadGlobsHelper(const base::DictionaryValue* content_script, int content_script_index, const char* globs_property_name, - string16* error, + base::string16* error, void(UserScript::*add_method)(const std::string& glob), UserScript* instance) { if (!content_script->HasKey(globs_property_name)) @@ -73,7 +73,7 @@ bool LoadGlobsHelper(const base::DictionaryValue* content_script, bool LoadUserScriptFromDictionary(const base::DictionaryValue* content_script, int definition_index, Extension* extension, - string16* error, + base::string16* error, UserScript* result) { // run_at if (content_script->HasKey(keys::kRunAt)) { @@ -380,7 +380,7 @@ const std::vector<std::string> ContentScriptsHandler::Keys() const { return std::vector<std::string>(keys, keys + arraysize(keys)); } -bool ContentScriptsHandler::Parse(Extension* extension, string16* error) { +bool ContentScriptsHandler::Parse(Extension* extension, base::string16* error) { scoped_ptr<ContentScriptsInfo> content_scripts_info(new ContentScriptsInfo); const base::ListValue* scripts_list = NULL; if (!extension->manifest()->GetList(keys::kContentScripts, &scripts_list)) { diff --git a/chrome/common/extensions/manifest_handlers/content_scripts_handler.h b/chrome/common/extensions/manifest_handlers/content_scripts_handler.h index 5b48c27..6b7e446 100644 --- a/chrome/common/extensions/manifest_handlers/content_scripts_handler.h +++ b/chrome/common/extensions/manifest_handlers/content_scripts_handler.h @@ -40,7 +40,7 @@ class ContentScriptsHandler : public ManifestHandler { ContentScriptsHandler(); virtual ~ContentScriptsHandler(); - virtual bool Parse(Extension* extension, string16* error) OVERRIDE; + virtual bool Parse(Extension* extension, base::string16* error) OVERRIDE; virtual bool Validate(const Extension* extension, std::string* error, std::vector<InstallWarning>* warnings) const OVERRIDE; diff --git a/chrome/common/extensions/manifest_handlers/externally_connectable.cc b/chrome/common/extensions/manifest_handlers/externally_connectable.cc index 7be1d23..cacb13a 100644 --- a/chrome/common/extensions/manifest_handlers/externally_connectable.cc +++ b/chrome/common/extensions/manifest_handlers/externally_connectable.cc @@ -56,7 +56,7 @@ ExternallyConnectableHandler::ExternallyConnectableHandler() {} ExternallyConnectableHandler::~ExternallyConnectableHandler() {} bool ExternallyConnectableHandler::Parse(Extension* extension, - string16* error) { + base::string16* error) { const base::Value* externally_connectable = NULL; CHECK(extension->manifest()->Get(keys::kExternallyConnectable, &externally_connectable)); @@ -91,7 +91,7 @@ ExternallyConnectableInfo* ExternallyConnectableInfo::Get( scoped_ptr<ExternallyConnectableInfo> ExternallyConnectableInfo::FromValue( const base::Value& value, std::vector<InstallWarning>* install_warnings, - string16* error) { + base::string16* error) { scoped_ptr<ExternallyConnectable> externally_connectable = ExternallyConnectable::FromValue(value, error); if (!externally_connectable) diff --git a/chrome/common/extensions/manifest_handlers/externally_connectable.h b/chrome/common/extensions/manifest_handlers/externally_connectable.h index 681da8b..db4b97a 100644 --- a/chrome/common/extensions/manifest_handlers/externally_connectable.h +++ b/chrome/common/extensions/manifest_handlers/externally_connectable.h @@ -38,7 +38,7 @@ class ExternallyConnectableHandler : public ManifestHandler { ExternallyConnectableHandler(); virtual ~ExternallyConnectableHandler(); - virtual bool Parse(Extension* extension, string16* error) OVERRIDE; + virtual bool Parse(Extension* extension, base::string16* error) OVERRIDE; private: virtual const std::vector<std::string> Keys() const OVERRIDE; @@ -58,7 +58,7 @@ struct ExternallyConnectableInfo : public Extension::ManifestData { static scoped_ptr<ExternallyConnectableInfo> FromValue( const base::Value& value, std::vector<InstallWarning>* install_warnings, - string16* error); + base::string16* error); virtual ~ExternallyConnectableInfo(); diff --git a/chrome/common/extensions/manifest_handlers/icons_handler.cc b/chrome/common/extensions/manifest_handlers/icons_handler.cc index 7434218..779d59d 100644 --- a/chrome/common/extensions/manifest_handlers/icons_handler.cc +++ b/chrome/common/extensions/manifest_handlers/icons_handler.cc @@ -73,7 +73,7 @@ IconsHandler::IconsHandler() { IconsHandler::~IconsHandler() { } -bool IconsHandler::Parse(Extension* extension, string16* error) { +bool IconsHandler::Parse(Extension* extension, base::string16* error) { scoped_ptr<IconsInfo> icons_info(new IconsInfo); const base::DictionaryValue* icons_dict = NULL; if (!extension->manifest()->GetDictionary(keys::kIcons, &icons_dict)) { diff --git a/chrome/common/extensions/manifest_handlers/icons_handler.h b/chrome/common/extensions/manifest_handlers/icons_handler.h index 924eb18..2303755 100644 --- a/chrome/common/extensions/manifest_handlers/icons_handler.h +++ b/chrome/common/extensions/manifest_handlers/icons_handler.h @@ -46,7 +46,7 @@ class IconsHandler : public ManifestHandler { IconsHandler(); virtual ~IconsHandler(); - virtual bool Parse(Extension* extension, string16* error) OVERRIDE; + virtual bool Parse(Extension* extension, base::string16* error) OVERRIDE; virtual bool Validate(const Extension* extension, std::string* error, std::vector<InstallWarning>* warnings) const OVERRIDE; diff --git a/chrome/common/extensions/manifest_handlers/minimum_chrome_version_checker.cc b/chrome/common/extensions/manifest_handlers/minimum_chrome_version_checker.cc index b1277d8..a1d4e40 100644 --- a/chrome/common/extensions/manifest_handlers/minimum_chrome_version_checker.cc +++ b/chrome/common/extensions/manifest_handlers/minimum_chrome_version_checker.cc @@ -24,7 +24,8 @@ MinimumChromeVersionChecker::MinimumChromeVersionChecker() { MinimumChromeVersionChecker::~MinimumChromeVersionChecker() { } -bool MinimumChromeVersionChecker::Parse(Extension* extension, string16* error) { +bool MinimumChromeVersionChecker::Parse(Extension* extension, + base::string16* error) { std::string minimum_version_string; if (!extension->manifest()->GetString(keys::kMinimumChromeVersion, &minimum_version_string)) { diff --git a/chrome/common/extensions/manifest_handlers/minimum_chrome_version_checker.h b/chrome/common/extensions/manifest_handlers/minimum_chrome_version_checker.h index 557c101..0e22479 100644 --- a/chrome/common/extensions/manifest_handlers/minimum_chrome_version_checker.h +++ b/chrome/common/extensions/manifest_handlers/minimum_chrome_version_checker.h @@ -17,7 +17,7 @@ class MinimumChromeVersionChecker : public ManifestHandler { // Validate minimum Chrome version. We don't need to store this, since the // extension is not valid if it is incorrect. - virtual bool Parse(Extension* extension, string16* error) OVERRIDE; + virtual bool Parse(Extension* extension, base::string16* error) OVERRIDE; private: virtual const std::vector<std::string> Keys() const OVERRIDE; diff --git a/chrome/common/extensions/manifest_handlers/nacl_modules_handler.cc b/chrome/common/extensions/manifest_handlers/nacl_modules_handler.cc index 9e144ca..9adae29 100644 --- a/chrome/common/extensions/manifest_handlers/nacl_modules_handler.cc +++ b/chrome/common/extensions/manifest_handlers/nacl_modules_handler.cc @@ -40,8 +40,7 @@ NaClModulesHandler::NaClModulesHandler() { NaClModulesHandler::~NaClModulesHandler() { } -bool NaClModulesHandler::Parse(Extension* extension, - string16* error) { +bool NaClModulesHandler::Parse(Extension* extension, base::string16* error) { const base::ListValue* list_value = NULL; if (!extension->manifest()->GetList(keys::kNaClModules, &list_value)) { *error = ASCIIToUTF16(errors::kInvalidNaClModules); diff --git a/chrome/common/extensions/manifest_handlers/nacl_modules_handler.h b/chrome/common/extensions/manifest_handlers/nacl_modules_handler.h index 123536c..9c7a409 100644 --- a/chrome/common/extensions/manifest_handlers/nacl_modules_handler.h +++ b/chrome/common/extensions/manifest_handlers/nacl_modules_handler.h @@ -30,7 +30,7 @@ class NaClModulesHandler : public ManifestHandler { NaClModulesHandler(); virtual ~NaClModulesHandler(); - virtual bool Parse(Extension* extension, string16* error) OVERRIDE; + virtual bool Parse(Extension* extension, base::string16* error) OVERRIDE; private: virtual const std::vector<std::string> Keys() const OVERRIDE; diff --git a/chrome/common/extensions/manifest_handlers/settings_overrides_handler.cc b/chrome/common/extensions/manifest_handlers/settings_overrides_handler.cc index acd1a81..50b0345 100644 --- a/chrome/common/extensions/manifest_handlers/settings_overrides_handler.cc +++ b/chrome/common/extensions/manifest_handlers/settings_overrides_handler.cc @@ -30,7 +30,7 @@ scoped_ptr<GURL> CreateManifestURL(const std::string& url) { } scoped_ptr<GURL> ParseHomepage(const ChromeSettingsOverrides& overrides, - string16* error) { + base::string16* error) { if (!overrides.homepage) return scoped_ptr<GURL>(); scoped_ptr<GURL> manifest_url = CreateManifestURL(*overrides.homepage); @@ -42,7 +42,7 @@ scoped_ptr<GURL> ParseHomepage(const ChromeSettingsOverrides& overrides, } std::vector<GURL> ParseStartupPage(const ChromeSettingsOverrides& overrides, - string16* error) { + base::string16* error) { std::vector<GURL> urls; if (!overrides.startup_pages) return urls; @@ -64,7 +64,7 @@ std::vector<GURL> ParseStartupPage(const ChromeSettingsOverrides& overrides, scoped_ptr<ChromeSettingsOverrides::Search_provider> ParseSearchEngine( ChromeSettingsOverrides* overrides, - string16* error) { + base::string16* error) { if (!overrides->search_provider) return scoped_ptr<ChromeSettingsOverrides::Search_provider>(); if (!CreateManifestURL(overrides->search_provider->favicon_url)) { @@ -106,7 +106,8 @@ SettingsOverridesHandler::SettingsOverridesHandler() {} SettingsOverridesHandler::~SettingsOverridesHandler() {} -bool SettingsOverridesHandler::Parse(Extension* extension, string16* error) { +bool SettingsOverridesHandler::Parse(Extension* extension, + base::string16* error) { const base::Value* dict = NULL; CHECK(extension->manifest()->Get(manifest_keys::kSettingsOverride, &dict)); scoped_ptr<ChromeSettingsOverrides> settings( diff --git a/chrome/common/extensions/manifest_handlers/settings_overrides_handler.h b/chrome/common/extensions/manifest_handlers/settings_overrides_handler.h index 3ab9c7e..d237bca 100644 --- a/chrome/common/extensions/manifest_handlers/settings_overrides_handler.h +++ b/chrome/common/extensions/manifest_handlers/settings_overrides_handler.h @@ -34,7 +34,7 @@ class SettingsOverridesHandler : public ManifestHandler { SettingsOverridesHandler(); virtual ~SettingsOverridesHandler(); - virtual bool Parse(Extension* extension, string16* error) OVERRIDE; + virtual bool Parse(Extension* extension, base::string16* error) OVERRIDE; private: virtual const std::vector<std::string> Keys() const OVERRIDE; diff --git a/chrome/common/extensions/manifest_handlers/theme_handler.cc b/chrome/common/extensions/manifest_handlers/theme_handler.cc index 059ad98..6d1c536 100644 --- a/chrome/common/extensions/manifest_handlers/theme_handler.cc +++ b/chrome/common/extensions/manifest_handlers/theme_handler.cc @@ -21,7 +21,7 @@ namespace errors = manifest_errors; namespace { bool LoadImages(const base::DictionaryValue* theme_value, - string16* error, + base::string16* error, ThemeInfo* theme_info) { const base::DictionaryValue* images_value = NULL; if (theme_value->GetDictionary(keys::kThemeImages, &images_value)) { @@ -56,7 +56,7 @@ bool LoadImages(const base::DictionaryValue* theme_value, } bool LoadColors(const base::DictionaryValue* theme_value, - string16* error, + base::string16* error, ThemeInfo* theme_info) { const base::DictionaryValue* colors_value = NULL; if (theme_value->GetDictionary(keys::kThemeColors, &colors_value)) { @@ -88,7 +88,7 @@ bool LoadColors(const base::DictionaryValue* theme_value, } bool LoadTints(const base::DictionaryValue* theme_value, - string16* error, + base::string16* error, ThemeInfo* theme_info) { const base::DictionaryValue* tints_value = NULL; if (!theme_value->GetDictionary(keys::kThemeTints, &tints_value)) @@ -113,7 +113,7 @@ bool LoadTints(const base::DictionaryValue* theme_value, } bool LoadDisplayProperties(const base::DictionaryValue* theme_value, - string16* error, + base::string16* error, ThemeInfo* theme_info) { const base::DictionaryValue* display_properties_value = NULL; if (theme_value->GetDictionary(keys::kThemeDisplayProperties, @@ -167,7 +167,7 @@ ThemeHandler::ThemeHandler() { ThemeHandler::~ThemeHandler() { } -bool ThemeHandler::Parse(Extension* extension, string16* error) { +bool ThemeHandler::Parse(Extension* extension, base::string16* error) { const base::DictionaryValue* theme_value = NULL; if (!extension->manifest()->GetDictionary(keys::kTheme, &theme_value)) { *error = ASCIIToUTF16(errors::kInvalidTheme); diff --git a/chrome/common/extensions/manifest_handlers/theme_handler.h b/chrome/common/extensions/manifest_handlers/theme_handler.h index 6e7651e..2a36e8e 100644 --- a/chrome/common/extensions/manifest_handlers/theme_handler.h +++ b/chrome/common/extensions/manifest_handlers/theme_handler.h @@ -45,7 +45,7 @@ class ThemeHandler : public ManifestHandler { ThemeHandler(); virtual ~ThemeHandler(); - virtual bool Parse(Extension* extension, string16* error) OVERRIDE; + virtual bool Parse(Extension* extension, base::string16* error) OVERRIDE; virtual bool Validate(const Extension* extension, std::string* error, std::vector<InstallWarning>* warnings) const OVERRIDE; diff --git a/chrome/common/extensions/manifest_tests/extension_manifests_initvalue_unittest.cc b/chrome/common/extensions/manifest_tests/extension_manifests_initvalue_unittest.cc index b9737aa..f7fbab9 100644 --- a/chrome/common/extensions/manifest_tests/extension_manifests_initvalue_unittest.cc +++ b/chrome/common/extensions/manifest_tests/extension_manifests_initvalue_unittest.cc @@ -153,7 +153,7 @@ TEST_F(InitValueManifestTest, InitFromValueValidNameInRTL) { scoped_refptr<Extension> extension(LoadAndExpectSuccess( "init_valid_name_no_rtl.json")); - string16 localized_name(ASCIIToUTF16("Dictionary (by Google)")); + base::string16 localized_name(ASCIIToUTF16("Dictionary (by Google)")); base::i18n::AdjustStringForLocaleDirection(&localized_name); EXPECT_EQ(localized_name, UTF8ToUTF16(extension->name())); diff --git a/chrome/common/extensions/manifest_url_handler.cc b/chrome/common/extensions/manifest_url_handler.cc index 1c7d3d0..e464c39 100644 --- a/chrome/common/extensions/manifest_url_handler.cc +++ b/chrome/common/extensions/manifest_url_handler.cc @@ -116,7 +116,7 @@ DevToolsPageHandler::DevToolsPageHandler() { DevToolsPageHandler::~DevToolsPageHandler() { } -bool DevToolsPageHandler::Parse(Extension* extension, string16* error) { +bool DevToolsPageHandler::Parse(Extension* extension, base::string16* error) { scoped_ptr<ManifestURL> manifest_url(new ManifestURL); std::string devtools_str; if (!extension->manifest()->GetString(keys::kDevToolsPage, &devtools_str)) { @@ -140,7 +140,7 @@ HomepageURLHandler::HomepageURLHandler() { HomepageURLHandler::~HomepageURLHandler() { } -bool HomepageURLHandler::Parse(Extension* extension, string16* error) { +bool HomepageURLHandler::Parse(Extension* extension, base::string16* error) { scoped_ptr<ManifestURL> manifest_url(new ManifestURL); std::string homepage_url_str; if (!extension->manifest()->GetString(keys::kHomepageURL, @@ -170,7 +170,7 @@ UpdateURLHandler::UpdateURLHandler() { UpdateURLHandler::~UpdateURLHandler() { } -bool UpdateURLHandler::Parse(Extension* extension, string16* error) { +bool UpdateURLHandler::Parse(Extension* extension, base::string16* error) { scoped_ptr<ManifestURL> manifest_url(new ManifestURL); std::string tmp_update_url; @@ -202,7 +202,7 @@ OptionsPageHandler::OptionsPageHandler() { OptionsPageHandler::~OptionsPageHandler() { } -bool OptionsPageHandler::Parse(Extension* extension, string16* error) { +bool OptionsPageHandler::Parse(Extension* extension, base::string16* error) { scoped_ptr<ManifestURL> manifest_url(new ManifestURL); std::string options_str; if (!extension->manifest()->GetString(keys::kOptionsPage, &options_str)) { @@ -269,7 +269,7 @@ URLOverridesHandler::URLOverridesHandler() { URLOverridesHandler::~URLOverridesHandler() { } -bool URLOverridesHandler::Parse(Extension* extension, string16* error) { +bool URLOverridesHandler::Parse(Extension* extension, base::string16* error) { const base::DictionaryValue* overrides = NULL; if (!extension->manifest()->GetDictionary(keys::kChromeURLOverrides, &overrides)) { diff --git a/chrome/common/extensions/manifest_url_handler.h b/chrome/common/extensions/manifest_url_handler.h index 181171e..057589b 100644 --- a/chrome/common/extensions/manifest_url_handler.h +++ b/chrome/common/extensions/manifest_url_handler.h @@ -67,7 +67,7 @@ class DevToolsPageHandler : public ManifestHandler { DevToolsPageHandler(); virtual ~DevToolsPageHandler(); - virtual bool Parse(Extension* extension, string16* error) OVERRIDE; + virtual bool Parse(Extension* extension, base::string16* error) OVERRIDE; private: virtual const std::vector<std::string> Keys() const OVERRIDE; @@ -81,7 +81,7 @@ class HomepageURLHandler : public ManifestHandler { HomepageURLHandler(); virtual ~HomepageURLHandler(); - virtual bool Parse(Extension* extension, string16* error) OVERRIDE; + virtual bool Parse(Extension* extension, base::string16* error) OVERRIDE; private: virtual const std::vector<std::string> Keys() const OVERRIDE; @@ -95,7 +95,7 @@ class UpdateURLHandler : public ManifestHandler { UpdateURLHandler(); virtual ~UpdateURLHandler(); - virtual bool Parse(Extension* extension, string16* error) OVERRIDE; + virtual bool Parse(Extension* extension, base::string16* error) OVERRIDE; private: virtual const std::vector<std::string> Keys() const OVERRIDE; @@ -109,7 +109,7 @@ class OptionsPageHandler : public ManifestHandler { OptionsPageHandler(); virtual ~OptionsPageHandler(); - virtual bool Parse(Extension* extension, string16* error) OVERRIDE; + virtual bool Parse(Extension* extension, base::string16* error) OVERRIDE; virtual bool Validate(const Extension* extension, std::string* error, std::vector<InstallWarning>* warnings) const OVERRIDE; @@ -126,7 +126,7 @@ class URLOverridesHandler : public ManifestHandler { URLOverridesHandler(); virtual ~URLOverridesHandler(); - virtual bool Parse(Extension* extension, string16* error) OVERRIDE; + virtual bool Parse(Extension* extension, base::string16* error) OVERRIDE; private: virtual const std::vector<std::string> Keys() const OVERRIDE; diff --git a/chrome/common/extensions/mime_types_handler.cc b/chrome/common/extensions/mime_types_handler.cc index 2ba6433..a7a04ee 100644 --- a/chrome/common/extensions/mime_types_handler.cc +++ b/chrome/common/extensions/mime_types_handler.cc @@ -85,7 +85,7 @@ MimeTypesHandlerParser::~MimeTypesHandlerParser() { } bool MimeTypesHandlerParser::Parse(extensions::Extension* extension, - string16* error) { + base::string16* error) { const base::ListValue* mime_types_value = NULL; if (!extension->manifest()->GetList(keys::kMIMETypes, &mime_types_value)) { diff --git a/chrome/common/extensions/mime_types_handler.h b/chrome/common/extensions/mime_types_handler.h index 515854c..240a12b 100644 --- a/chrome/common/extensions/mime_types_handler.h +++ b/chrome/common/extensions/mime_types_handler.h @@ -54,7 +54,7 @@ class MimeTypesHandlerParser : public extensions::ManifestHandler { virtual ~MimeTypesHandlerParser(); virtual bool Parse(extensions::Extension* extension, - string16* error) OVERRIDE; + base::string16* error) OVERRIDE; private: virtual const std::vector<std::string> Keys() const OVERRIDE; diff --git a/chrome/common/extensions/permissions/chrome_permission_message_provider.cc b/chrome/common/extensions/permissions/chrome_permission_message_provider.cc index 35785a7..d63faec 100644 --- a/chrome/common/extensions/permissions/chrome_permission_message_provider.cc +++ b/chrome/common/extensions/permissions/chrome_permission_message_provider.cc @@ -48,10 +48,10 @@ PermissionMessages ChromePermissionMessageProvider::GetPermissionMessages( } // static -std::vector<string16> ChromePermissionMessageProvider::GetWarningMessages( +std::vector<base::string16> ChromePermissionMessageProvider::GetWarningMessages( const PermissionSet* permissions, Manifest::Type extension_type) const { - std::vector<string16> message_strings; + std::vector<base::string16> message_strings; PermissionMessages messages = GetPermissionMessages(permissions, extension_type); @@ -118,11 +118,11 @@ std::vector<string16> ChromePermissionMessageProvider::GetWarningMessages( } // static -std::vector<string16> +std::vector<base::string16> ChromePermissionMessageProvider::GetWarningMessagesDetails( const PermissionSet* permissions, Manifest::Type extension_type) const { - std::vector<string16> message_strings; + std::vector<base::string16> message_strings; PermissionMessages messages = GetPermissionMessages(permissions, extension_type); @@ -177,12 +177,14 @@ ChromePermissionMessageProvider::GetAPIPermissionMessages( // TODO(sammc): Remove this. See http://crbug.com/284849. std::set<PermissionMessage>::iterator write_directory_message = messages.find(PermissionMessage( - PermissionMessage::kFileSystemWriteDirectory, string16())); + PermissionMessage::kFileSystemWriteDirectory, base::string16())); if (write_directory_message != messages.end()) { messages.erase( - PermissionMessage(PermissionMessage::kFileSystemWrite, string16())); + PermissionMessage(PermissionMessage::kFileSystemWrite, + base::string16())); messages.erase( - PermissionMessage(PermissionMessage::kFileSystemDirectory, string16())); + PermissionMessage(PermissionMessage::kFileSystemDirectory, + base::string16())); } // A special hack: The warning message for declarativeWebRequest @@ -193,7 +195,7 @@ ChromePermissionMessageProvider::GetAPIPermissionMessages( if (permissions->HasEffectiveAccessToAllHosts()) { messages.erase( PermissionMessage( - PermissionMessage::kDeclarativeWebRequest, string16())); + PermissionMessage::kDeclarativeWebRequest, base::string16())); } return messages; @@ -260,12 +262,14 @@ bool ChromePermissionMessageProvider::IsAPIPrivilegeIncrease( // kFileSystemWrite. // TODO(sammc): Remove this. See http://crbug.com/284849. if (old_warnings.find(PermissionMessage( - PermissionMessage::kFileSystemWriteDirectory, string16())) != + PermissionMessage::kFileSystemWriteDirectory, base::string16())) != old_warnings.end()) { delta_warnings.erase( - PermissionMessage(PermissionMessage::kFileSystemDirectory, string16())); + PermissionMessage(PermissionMessage::kFileSystemDirectory, + base::string16())); delta_warnings.erase( - PermissionMessage(PermissionMessage::kFileSystemWrite, string16())); + PermissionMessage(PermissionMessage::kFileSystemWrite, + base::string16())); } // It is a privilege increase if there are additional warnings present. diff --git a/chrome/common/extensions/permissions/chrome_permission_message_provider.h b/chrome/common/extensions/permissions/chrome_permission_message_provider.h index bc0bef0..d8584bb 100644 --- a/chrome/common/extensions/permissions/chrome_permission_message_provider.h +++ b/chrome/common/extensions/permissions/chrome_permission_message_provider.h @@ -23,10 +23,10 @@ class ChromePermissionMessageProvider : public PermissionMessageProvider { virtual PermissionMessages GetPermissionMessages( const PermissionSet* permissions, Manifest::Type extension_type) const OVERRIDE; - virtual std::vector<string16> GetWarningMessages( + virtual std::vector<base::string16> GetWarningMessages( const PermissionSet* permissions, Manifest::Type extension_type) const OVERRIDE; - virtual std::vector<string16> GetWarningMessagesDetails( + virtual std::vector<base::string16> GetWarningMessagesDetails( const PermissionSet* permissions, Manifest::Type extension_type) const OVERRIDE; virtual bool IsPrivilegeIncrease( diff --git a/chrome/common/extensions/permissions/permission_message_util.cc b/chrome/common/extensions/permissions/permission_message_util.cc index 1a99542..a5d925e 100644 --- a/chrome/common/extensions/permissions/permission_message_util.cc +++ b/chrome/common/extensions/permissions/permission_message_util.cc @@ -41,8 +41,8 @@ PermissionMessage CreateFromHostList(const std::set<std::string>& hosts) { std::vector<std::string> host_list(hosts.begin(), hosts.end()); DCHECK(host_list.size()); PermissionMessage::ID message_id; - string16 message; - string16 details; + base::string16 message; + base::string16 details; switch (host_list.size()) { case 1: diff --git a/chrome/common/extensions/permissions/permission_set_unittest.cc b/chrome/common/extensions/permissions/permission_set_unittest.cc index b3d4371..3189c5d 100644 --- a/chrome/common/extensions/permissions/permission_set_unittest.cc +++ b/chrome/common/extensions/permissions/permission_set_unittest.cc @@ -33,7 +33,7 @@ static void AddPattern(URLPatternSet* extent, const std::string& pattern) { extent->AddPattern(URLPattern(schemes, pattern)); } -size_t IndexOf(const std::vector<string16>& warnings, +size_t IndexOf(const std::vector<base::string16>& warnings, const std::string& warning) { for (size_t i = 0; i < warnings.size(); ++i) { if (warnings[i] == ASCIIToUTF16(warning)) @@ -43,7 +43,7 @@ size_t IndexOf(const std::vector<string16>& warnings, return warnings.size(); } -bool Contains(const std::vector<string16>& warnings, +bool Contains(const std::vector<base::string16>& warnings, const std::string& warning) { return IndexOf(warnings, warning) != warnings.size(); } @@ -875,7 +875,7 @@ TEST(PermissionsTest, GetWarningMessages_ManyHosts) { scoped_refptr<Extension> extension; extension = LoadManifest("permissions", "many-hosts.json"); - std::vector<string16> warnings = + std::vector<base::string16> warnings = PermissionsData::GetPermissionMessageStrings(extension.get()); ASSERT_EQ(1u, warnings.size()); EXPECT_EQ("Access your data on encrypted.google.com and www.google.com", @@ -887,7 +887,7 @@ TEST(PermissionsTest, GetWarningMessages_Plugins) { scoped_refptr<PermissionSet> permissions; extension = LoadManifest("permissions", "plugins.json"); - std::vector<string16> warnings = + std::vector<base::string16> warnings = PermissionsData::GetPermissionMessageStrings(extension.get()); // We don't parse the plugins key on Chrome OS, so it should not ask for any // permissions. @@ -908,7 +908,7 @@ TEST(PermissionsTest, GetWarningMessages_AudioVideo) { PermissionSet* set = const_cast<PermissionSet*>( extension->GetActivePermissions().get()); - std::vector<string16> warnings = + std::vector<base::string16> warnings = provider->GetWarningMessages(set, extension->GetType()); EXPECT_FALSE(Contains(warnings, "Use your microphone")); EXPECT_FALSE(Contains(warnings, "Use your camera")); @@ -950,7 +950,7 @@ TEST(PermissionsTest, GetWarningMessages_DeclarativeWebRequest) { LoadManifest("permissions", "web_request_com_host_permissions.json"); const PermissionMessageProvider* provider = PermissionMessageProvider::Get(); const PermissionSet* set = extension->GetActivePermissions().get(); - std::vector<string16> warnings = + std::vector<base::string16> warnings = provider->GetWarningMessages(set, extension->GetType()); EXPECT_TRUE(Contains(warnings, "Block parts of web pages")); EXPECT_FALSE(Contains(warnings, "Access your data on all websites")); @@ -971,7 +971,7 @@ TEST(PermissionsTest, GetWarningMessages_Serial) { EXPECT_TRUE(extension->is_platform_app()); EXPECT_TRUE(extension->HasAPIPermission(APIPermission::kSerial)); - std::vector<string16> warnings = + std::vector<base::string16> warnings = PermissionsData::GetPermissionMessageStrings(extension.get()); EXPECT_TRUE( Contains(warnings, "Use serial devices attached to your computer")); @@ -985,7 +985,7 @@ TEST(PermissionsTest, GetWarningMessages_Socket_AnyHost) { LoadManifest("permissions", "socket_any_host.json"); EXPECT_TRUE(extension->is_platform_app()); EXPECT_TRUE(extension->HasAPIPermission(APIPermission::kSocket)); - std::vector<string16> warnings = + std::vector<base::string16> warnings = PermissionsData::GetPermissionMessageStrings(extension.get()); EXPECT_EQ(1u, warnings.size()); EXPECT_TRUE(Contains(warnings, "Exchange data with any computer " @@ -999,7 +999,7 @@ TEST(PermissionsTest, GetWarningMessages_Socket_OneDomainTwoHostnames) { LoadManifest("permissions", "socket_one_domain_two_hostnames.json"); EXPECT_TRUE(extension->is_platform_app()); EXPECT_TRUE(extension->HasAPIPermission(APIPermission::kSocket)); - std::vector<string16> warnings = + std::vector<base::string16> warnings = PermissionsData::GetPermissionMessageStrings(extension.get()); // Verify the warnings, including support for unicode characters, the fact @@ -1025,7 +1025,7 @@ TEST(PermissionsTest, GetWarningMessages_Socket_TwoDomainsOneHostname) { LoadManifest("permissions", "socket_two_domains_one_hostname.json"); EXPECT_TRUE(extension->is_platform_app()); EXPECT_TRUE(extension->HasAPIPermission(APIPermission::kSocket)); - std::vector<string16> warnings = + std::vector<base::string16> warnings = PermissionsData::GetPermissionMessageStrings(extension.get()); // Verify the warnings, including the fact that domain host warnings come @@ -1047,7 +1047,7 @@ TEST(PermissionsTest, GetWarningMessages_PlatformApppHosts) { extension = LoadManifest("permissions", "platform_app_hosts.json"); EXPECT_TRUE(extension->is_platform_app()); - std::vector<string16> warnings = + std::vector<base::string16> warnings = PermissionsData::GetPermissionMessageStrings(extension.get()); ASSERT_EQ(0u, warnings.size()); @@ -1452,7 +1452,7 @@ TEST(PermissionsTest, SyncFileSystemPermission) { apis.insert(APIPermission::kSyncFileSystem); EXPECT_TRUE(extension->is_platform_app()); EXPECT_TRUE(extension->HasAPIPermission(APIPermission::kSyncFileSystem)); - std::vector<string16> warnings = + std::vector<base::string16> warnings = PermissionsData::GetPermissionMessageStrings(extension.get()); EXPECT_TRUE(Contains(warnings, "Store data in your Google Drive account")); ASSERT_EQ(1u, warnings.size()); diff --git a/chrome/common/extensions/permissions/settings_override_permission_unittest.cc b/chrome/common/extensions/permissions/settings_override_permission_unittest.cc index 4a2cc16..ba8fa22 100644 --- a/chrome/common/extensions/permissions/settings_override_permission_unittest.cc +++ b/chrome/common/extensions/permissions/settings_override_permission_unittest.cc @@ -66,7 +66,7 @@ TEST_F(SettingsOverridePermissionTest, HomePage) { extension->GetActivePermissions()); EXPECT_TRUE(permission_set->HasAPIPermission(APIPermission::kHomepage)); - std::vector<string16> warnings = + std::vector<base::string16> warnings = PermissionsData::GetPermissionMessageStrings(extension.get()); ASSERT_EQ(1u, warnings.size()); EXPECT_EQ("Change your home page to: google.com/", @@ -83,7 +83,7 @@ TEST_F(SettingsOverridePermissionTest, SartupPages) { extension->GetActivePermissions()); EXPECT_TRUE(permission_set->HasAPIPermission(APIPermission::kStartupPages)); - std::vector<string16> warnings = + std::vector<base::string16> warnings = PermissionsData::GetPermissionMessageStrings(extension.get()); ASSERT_EQ(1u, warnings.size()); EXPECT_EQ("Change your start page to: startup.com/startup.html", @@ -100,7 +100,7 @@ TEST_F(SettingsOverridePermissionTest, SearchSettings) { extension->GetActivePermissions()); EXPECT_TRUE(permission_set->HasAPIPermission(APIPermission::kSearchProvider)); - std::vector<string16> warnings = + std::vector<base::string16> warnings = PermissionsData::GetPermissionMessageStrings(extension.get()); ASSERT_EQ(1u, warnings.size()); EXPECT_EQ("Change your search settings to: google.com", diff --git a/chrome/common/extensions/permissions/socket_permission.cc b/chrome/common/extensions/permissions/socket_permission.cc index d640cbe..5e8fd64 100644 --- a/chrome/common/extensions/permissions/socket_permission.cc +++ b/chrome/common/extensions/permissions/socket_permission.cc @@ -51,7 +51,7 @@ bool SocketPermission::AddAnyHostMessage(PermissionMessages& messages) const { void SocketPermission::AddSubdomainHostMessage( PermissionMessages& messages) const { - std::set<string16> domains; + std::set<base::string16> domains; std::set<SocketPermissionData>::const_iterator i; for (i = data_set_.begin(); i != data_set_.end(); ++i) { if (i->entry().GetHostType() == SocketPermissionEntry::HOSTS_IN_DOMAINS) @@ -66,14 +66,14 @@ void SocketPermission::AddSubdomainHostMessage( l10n_util::GetStringFUTF16( id, JoinString( - std::vector<string16>( + std::vector<base::string16>( domains.begin(), domains.end()), ' ')))); } } void SocketPermission::AddSpecificHostMessage( PermissionMessages& messages) const { - std::set<string16> hostnames; + std::set<base::string16> hostnames; std::set<SocketPermissionData>::const_iterator i; for (i = data_set_.begin(); i != data_set_.end(); ++i) { if (i->entry().GetHostType() == SocketPermissionEntry::SPECIFIC_HOSTS) @@ -88,7 +88,7 @@ void SocketPermission::AddSpecificHostMessage( l10n_util::GetStringFUTF16( id, JoinString( - std::vector<string16>( + std::vector<base::string16>( hostnames.begin(), hostnames.end()), ' ')))); } } diff --git a/chrome/common/extensions/web_accessible_resources_handler.cc b/chrome/common/extensions/web_accessible_resources_handler.cc index 3ef11af..fdd6e0e 100644 --- a/chrome/common/extensions/web_accessible_resources_handler.cc +++ b/chrome/common/extensions/web_accessible_resources_handler.cc @@ -62,7 +62,7 @@ WebAccessibleResourcesHandler::~WebAccessibleResourcesHandler() { } bool WebAccessibleResourcesHandler::Parse(Extension* extension, - string16* error) { + base::string16* error) { scoped_ptr<WebAccessibleResourcesInfo> info(new WebAccessibleResourcesInfo); const base::ListValue* list_value = NULL; if (!extension->manifest()->GetList(keys::kWebAccessibleResources, diff --git a/chrome/common/extensions/web_accessible_resources_handler.h b/chrome/common/extensions/web_accessible_resources_handler.h index 95f262f..a6aa350 100644 --- a/chrome/common/extensions/web_accessible_resources_handler.h +++ b/chrome/common/extensions/web_accessible_resources_handler.h @@ -37,7 +37,7 @@ class WebAccessibleResourcesHandler : public ManifestHandler { WebAccessibleResourcesHandler(); virtual ~WebAccessibleResourcesHandler(); - virtual bool Parse(Extension* extension, string16* error) OVERRIDE; + virtual bool Parse(Extension* extension, base::string16* error) OVERRIDE; private: virtual const std::vector<std::string> Keys() const OVERRIDE; diff --git a/chrome/common/extensions/webview_handler.cc b/chrome/common/extensions/webview_handler.cc index 78f0b7e..a5279a2 100644 --- a/chrome/common/extensions/webview_handler.cc +++ b/chrome/common/extensions/webview_handler.cc @@ -66,7 +66,7 @@ WebviewHandler::WebviewHandler() { WebviewHandler::~WebviewHandler() { } -bool WebviewHandler::Parse(Extension* extension, string16* error) { +bool WebviewHandler::Parse(Extension* extension, base::string16* error) { scoped_ptr<WebviewInfo> info(new WebviewInfo()); const base::DictionaryValue* dict_value = NULL; diff --git a/chrome/common/extensions/webview_handler.h b/chrome/common/extensions/webview_handler.h index 5d9b530..2c4858f 100644 --- a/chrome/common/extensions/webview_handler.h +++ b/chrome/common/extensions/webview_handler.h @@ -40,7 +40,7 @@ class WebviewHandler : public ManifestHandler { WebviewHandler(); virtual ~WebviewHandler(); - virtual bool Parse(Extension* extension, string16* error) OVERRIDE; + virtual bool Parse(Extension* extension, base::string16* error) OVERRIDE; private: virtual const std::vector<std::string> Keys() const OVERRIDE; diff --git a/chrome/common/importer/firefox_importer_utils.cc b/chrome/common/importer/firefox_importer_utils.cc index bf34de0..4f6a201 100644 --- a/chrome/common/importer/firefox_importer_utils.cc +++ b/chrome/common/importer/firefox_importer_utils.cc @@ -25,7 +25,7 @@ namespace { // Retrieves the file system path of the profile name. base::FilePath GetProfilePath(const DictionaryValue& root, const std::string& profile_name) { - string16 path16; + base::string16 path16; std::string is_relative; if (!root.GetStringASCII(profile_name + ".IsRelative", &is_relative) || !root.GetString(profile_name + ".Path", &path16)) @@ -253,7 +253,7 @@ std::string GetPrefsJsValue(const std::string& content, // ID={ec8030f7-c20a-464f-9b0e-13a3a9e97384} // ......................................... // In this example the function returns "Iceweasel" (or a localized equivalent). -string16 GetFirefoxImporterName(const base::FilePath& app_path) { +base::string16 GetFirefoxImporterName(const base::FilePath& app_path) { const base::FilePath app_ini_file = app_path.AppendASCII("application.ini"); std::string branding_name; if (base::PathExists(app_ini_file)) { diff --git a/chrome/common/importer/firefox_importer_utils.h b/chrome/common/importer/firefox_importer_utils.h index 5dac529..c46a436 100644 --- a/chrome/common/importer/firefox_importer_utils.h +++ b/chrome/common/importer/firefox_importer_utils.h @@ -89,6 +89,6 @@ std::string GetPrefsJsValue(const std::string& prefs, // This is useful to differentiate between Firefox and Iceweasel. // If anything goes wrong while trying to obtain the branding name, // the function assumes it's Firefox. -string16 GetFirefoxImporterName(const base::FilePath& app_path); +base::string16 GetFirefoxImporterName(const base::FilePath& app_path); #endif // CHROME_COMMON_IMPORTER_FIREFOX_IMPORTER_UTILS_H_ diff --git a/chrome/common/importer/firefox_importer_utils_win.cc b/chrome/common/importer/firefox_importer_utils_win.cc index 0f0b57f..5cc9f99 100644 --- a/chrome/common/importer/firefox_importer_utils_win.cc +++ b/chrome/common/importer/firefox_importer_utils_win.cc @@ -47,7 +47,7 @@ int GetCurrentFirefoxMajorVersionFromRegistry() { base::FilePath GetFirefoxInstallPathFromRegistry() { // Detects the path that Firefox is installed in. - string16 registry_path = kFirefoxPath; + base::string16 registry_path = kFirefoxPath; wchar_t buffer[MAX_PATH]; DWORD buffer_length = sizeof(buffer); base::win::RegKey reg_key(HKEY_LOCAL_MACHINE, registry_path.c_str(), @@ -57,7 +57,7 @@ base::FilePath GetFirefoxInstallPathFromRegistry() { if (result != ERROR_SUCCESS) return base::FilePath(); - registry_path += L"\\" + string16(buffer) + L"\\Main"; + registry_path += L"\\" + base::string16(buffer) + L"\\Main"; buffer_length = sizeof(buffer); base::win::RegKey reg_key_directory(HKEY_LOCAL_MACHINE, registry_path.c_str(), KEY_READ); diff --git a/chrome/common/importer/ie_importer_test_registry_overrider_win.cc b/chrome/common/importer/ie_importer_test_registry_overrider_win.cc index 615b324..552a1d7 100644 --- a/chrome/common/importer/ie_importer_test_registry_overrider_win.cc +++ b/chrome/common/importer/ie_importer_test_registry_overrider_win.cc @@ -65,6 +65,6 @@ IEImporterTestRegistryOverrider::~IEImporterTestRegistryOverrider() { base::string16 IEImporterTestRegistryOverrider::GetTestRegistryOverride() { base::string16 key; if (!GetTestKeyFromEnvironment(&key)) - return string16(); + return base::string16(); return key; } diff --git a/chrome/common/importer/ie_importer_utils_win.cc b/chrome/common/importer/ie_importer_utils_win.cc index 5eabd3e..bd4acf9 100644 --- a/chrome/common/importer/ie_importer_utils_win.cc +++ b/chrome/common/importer/ie_importer_utils_win.cc @@ -18,7 +18,8 @@ const char16 kIEStorage2Key[] = const char16 kIESettingsMainKey[] = L"Software\\Microsoft\\Internet Explorer\\Main"; -string16 GetPotentiallyOverridenIEKey(const string16& desired_key_path) { +base::string16 GetPotentiallyOverridenIEKey( + const base::string16& desired_key_path) { base::string16 test_reg_override( IEImporterTestRegistryOverrider::GetTestRegistryOverride()); return test_reg_override.empty() ? desired_key_path : test_reg_override; diff --git a/chrome/common/importer/importer_bridge.h b/chrome/common/importer/importer_bridge.h index 8aaf40d..c0903ff 100644 --- a/chrome/common/importer/importer_bridge.h +++ b/chrome/common/importer/importer_bridge.h @@ -37,7 +37,7 @@ class ImporterBridge : public base::RefCountedThreadSafe<ImporterBridge> { virtual void AddBookmarks( const std::vector<ImportedBookmarkEntry>& bookmarks, - const string16& first_folder_name) = 0; + const base::string16& first_folder_name) = 0; virtual void AddHomePage(const GURL& home_page) = 0; @@ -81,7 +81,7 @@ class ImporterBridge : public base::RefCountedThreadSafe<ImporterBridge> { // this calls the set of strings we've ported over to the external process. // It's good to avoid having to create a separate ResourceBundle for the // external import process, since the importer only needs a few strings. - virtual string16 GetLocalizedString(int message_id) = 0; + virtual base::string16 GetLocalizedString(int message_id) = 0; protected: friend class base::RefCountedThreadSafe<ImporterBridge>; diff --git a/chrome/common/importer/importer_data_types.h b/chrome/common/importer/importer_data_types.h index 8f55068..5790209 100644 --- a/chrome/common/importer/importer_data_types.h +++ b/chrome/common/importer/importer_data_types.h @@ -36,7 +36,7 @@ struct SourceProfile { SourceProfile(); ~SourceProfile(); - string16 importer_name; + base::string16 importer_name; ImporterType importer_type; base::FilePath source_path; base::FilePath app_path; @@ -49,8 +49,8 @@ struct SourceProfile { // Contains information needed for importing bookmarks/search engine urls, etc. struct URLKeywordInfo { GURL url; - string16 keyword; - string16 display_name; + base::string16 keyword; + base::string16 display_name; }; #if defined(OS_WIN) diff --git a/chrome/common/importer/profile_import_process_messages.h b/chrome/common/importer/profile_import_process_messages.h index 1e5bab6..baa913e 100644 --- a/chrome/common/importer/profile_import_process_messages.h +++ b/chrome/common/importer/profile_import_process_messages.h @@ -92,7 +92,7 @@ struct ParamTraits<ImporterURLRow> { } static bool Read(const Message* m, PickleIterator* iter, param_type* p) { GURL url; - string16 title; + base::string16 title; int visit_count, typed_count; base::Time last_visit; bool hidden; @@ -300,8 +300,8 @@ IPC_MESSAGE_CONTROL1(ProfileImportProcessHostMsg_NotifyHomePageImportReady, GURL /* GURL of home page */) IPC_MESSAGE_CONTROL2(ProfileImportProcessHostMsg_NotifyBookmarksImportStart, - string16 /* first folder name */, - int /* total number of bookmarks */) + base::string16 /* first folder name */, + int /* total number of bookmarks */) IPC_MESSAGE_CONTROL1(ProfileImportProcessHostMsg_NotifyBookmarksImportGroup, std::vector<ImportedBookmarkEntry>) diff --git a/chrome/common/instant_types.cc b/chrome/common/instant_types.cc index ea744018..5d199ae 100644 --- a/chrome/common/instant_types.cc +++ b/chrome/common/instant_types.cc @@ -7,7 +7,7 @@ InstantSuggestion::InstantSuggestion() { } -InstantSuggestion::InstantSuggestion(const string16& in_text, +InstantSuggestion::InstantSuggestion(const base::string16& in_text, const std::string& in_metadata) : text(in_text), metadata(in_metadata) { diff --git a/chrome/common/instant_types.h b/chrome/common/instant_types.h index 8ef078b..4cc41db 100644 --- a/chrome/common/instant_types.h +++ b/chrome/common/instant_types.h @@ -22,12 +22,12 @@ typedef int InstantRestrictedID; // server what suggestion to prefetch. struct InstantSuggestion { InstantSuggestion(); - InstantSuggestion(const string16& in_text, + InstantSuggestion(const base::string16& in_text, const std::string& in_metadata); ~InstantSuggestion(); // Full suggested text. - string16 text; + base::string16 text; // JSON metadata from the server response which produced this suggestion. std::string metadata; @@ -39,20 +39,20 @@ struct InstantAutocompleteResult { ~InstantAutocompleteResult(); // The provider name, as returned by AutocompleteProvider::GetName(). - string16 provider; + base::string16 provider; // The type of the result. AutocompleteMatchType::Type type; // The description (title), same as AutocompleteMatch::description. - string16 description; + base::string16 description; // The URL of the match, same as AutocompleteMatch::destination_url. - string16 destination_url; + base::string16 destination_url; // The search query for this match. Only set for matches coming from // SearchProvider. Populated using AutocompleteMatch::contents. - string16 search_query; + base::string16 search_query; // The transition type to use when the user opens this match. Same as // AutocompleteMatch::transition. @@ -165,7 +165,7 @@ struct InstantMostVisitedItem { // The title of the Most Visited page. May be empty, in which case the |url| // is used as the title. - string16 title; + base::string16 title; }; // An InstantMostVisitedItem along with its assigned restricted ID. diff --git a/chrome/common/localized_error.cc b/chrome/common/localized_error.cc index 132ae38..4a90c89 100644 --- a/chrome/common/localized_error.cc +++ b/chrome/common/localized_error.cc @@ -531,7 +531,7 @@ void LocalizedError::GetStrings(int error_code, options.suggestions = SUGGEST_NONE; } - string16 failed_url_string(net::FormatUrl( + base::string16 failed_url_string(net::FormatUrl( failed_url, accept_languages, net::kFormatUrlOmitNothing, net::UnescapeRule::NORMAL, NULL, NULL, NULL)); // URLs are always LTR. @@ -569,7 +569,7 @@ void LocalizedError::GetStrings(int error_code, "errorDetails", l10n_util::GetStringUTF16(options.details_resource_id)); } - string16 error_string; + base::string16 error_string; if (error_domain == net::kErrorDomain) { // Non-internationalized error string, for debugging Chrome itself. std::string ascii_error_string = net::ErrorToString(error_code); @@ -769,8 +769,8 @@ void LocalizedError::GetStrings(int error_code, error_strings->Set("suggestions", suggestions); } -string16 LocalizedError::GetErrorDetails(const blink::WebURLError& error, - bool is_post) { +base::string16 LocalizedError::GetErrorDetails(const blink::WebURLError& error, + bool is_post) { const LocalizedErrorMap* error_map = LookupErrorMap(error.domain.utf8(), error.reason, is_post); if (error_map) @@ -796,7 +796,7 @@ void LocalizedError::GetAppErrorStrings( bool rtl = LocaleIsRTL(); error_strings->SetString("textdirection", rtl ? "rtl" : "ltr"); - string16 failed_url(ASCIIToUTF16(display_url.spec())); + base::string16 failed_url(ASCIIToUTF16(display_url.spec())); // URLs are always LTR. if (rtl) base::i18n::WrapStringWithLTRFormatting(&failed_url); diff --git a/chrome/common/localized_error.h b/chrome/common/localized_error.h index f38144b..a68407f 100644 --- a/chrome/common/localized_error.h +++ b/chrome/common/localized_error.h @@ -37,8 +37,8 @@ class LocalizedError { base::DictionaryValue* strings); // Returns a description of the encountered error. - static string16 GetErrorDetails(const blink::WebURLError& error, - bool is_post); + static base::string16 GetErrorDetails(const blink::WebURLError& error, + bool is_post); // Returns true if an error page exists for the specified parameters. static bool HasStrings(const std::string& error_domain, int error_code); diff --git a/chrome/common/mac/app_mode_chrome_locator.h b/chrome/common/mac/app_mode_chrome_locator.h index f5e7a3e..1b260d2 100644 --- a/chrome/common/mac/app_mode_chrome_locator.h +++ b/chrome/common/mac/app_mode_chrome_locator.h @@ -28,7 +28,7 @@ bool FindBundleById(NSString* bundle_id, base::FilePath* out_bundle); // the framework directory). // Returns true if all information read succesfuly, false otherwise. bool GetChromeBundleInfo(const base::FilePath& chrome_bundle, - string16* raw_version_str, + base::string16* raw_version_str, base::FilePath* version_path, base::FilePath* framework_shlib_path); diff --git a/chrome/common/mac/app_mode_chrome_locator.mm b/chrome/common/mac/app_mode_chrome_locator.mm index 204ea28..ac62380 100644 --- a/chrome/common/mac/app_mode_chrome_locator.mm +++ b/chrome/common/mac/app_mode_chrome_locator.mm @@ -25,7 +25,7 @@ bool FindBundleById(NSString* bundle_id, base::FilePath* out_bundle) { } bool GetChromeBundleInfo(const base::FilePath& chrome_bundle, - string16* raw_version_str, + base::string16* raw_version_str, base::FilePath* version_path, base::FilePath* framework_shlib_path) { using base::mac::ObjCCast; diff --git a/chrome/common/mac/app_mode_chrome_locator_unittest.mm b/chrome/common/mac/app_mode_chrome_locator_unittest.mm index 950da7e..50e98bf 100644 --- a/chrome/common/mac/app_mode_chrome_locator_unittest.mm +++ b/chrome/common/mac/app_mode_chrome_locator_unittest.mm @@ -43,7 +43,7 @@ TEST(ChromeLocatorTest, GetNonExistentBundleInfo) { base::ScopedTempDir temp_dir; ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); - string16 raw_version; + base::string16 raw_version; base::FilePath version_path; base::FilePath framework_path; EXPECT_FALSE(app_mode::GetChromeBundleInfo(temp_dir.path(), @@ -57,7 +57,7 @@ TEST(ChromeLocatorTest, GetChromeBundleInfo) { GetChromeBundlePath(&chrome_bundle_path); ASSERT_TRUE(base::DirectoryExists(chrome_bundle_path)); - string16 raw_version; + base::string16 raw_version; base::FilePath version_path; base::FilePath framework_path; EXPECT_TRUE(GetChromeBundleInfo(chrome_bundle_path, diff --git a/chrome/common/mac/app_mode_common.h b/chrome/common/mac/app_mode_common.h index de82e24..a88ded6 100644 --- a/chrome/common/mac/app_mode_common.h +++ b/chrome/common/mac/app_mode_common.h @@ -115,7 +115,7 @@ struct ChromeAppModeInfo { std::string app_mode_id; // Required: v1.0 // Unrestricted (e.g., several-word) UTF8-encoded name for the shortcut. - string16 app_mode_name; // Optional: v1.0 + base::string16 app_mode_name; // Optional: v1.0 // URL for the shortcut. Must be a valid URL. std::string app_mode_url; // Required: v1.0 diff --git a/chrome/common/metrics/variations/experiment_labels_win.cc b/chrome/common/metrics/variations/experiment_labels_win.cc index 7116ab8..07d3391 100644 --- a/chrome/common/metrics/variations/experiment_labels_win.cc +++ b/chrome/common/metrics/variations/experiment_labels_win.cc @@ -22,14 +22,14 @@ const wchar_t kVariationPrefix[] = L"CrVar"; // including a timestamp that is a year in the future from |current_time|. Since // multiple headers can be transmitted, |count| is a number that is appended // after the label key to differentiate the labels. -string16 CreateSingleExperimentLabel(int count, VariationID id, - const base::Time& current_time) { +base::string16 CreateSingleExperimentLabel(int count, VariationID id, + const base::Time& current_time) { // Build the parts separately so they can be validated. - const string16 key = kVariationPrefix + base::IntToString16(count); + const base::string16 key = kVariationPrefix + base::IntToString16(count); DCHECK_LE(key.size(), 8U); - const string16 value = base::IntToString16(id); + const base::string16 value = base::IntToString16(id); DCHECK_LE(value.size(), 8U); - string16 label(key); + base::string16 label(key); label += L'='; label += value; label += L'|'; @@ -39,9 +39,9 @@ string16 CreateSingleExperimentLabel(int count, VariationID id, } // namespace -string16 BuildGoogleUpdateExperimentLabel( +base::string16 BuildGoogleUpdateExperimentLabel( const base::FieldTrial::ActiveGroups& active_groups) { - string16 experiment_labels; + base::string16 experiment_labels; int counter = 0; const base::Time current_time(base::Time::Now()); @@ -64,16 +64,16 @@ string16 BuildGoogleUpdateExperimentLabel( return experiment_labels; } -string16 ExtractNonVariationLabels(const string16& labels) { - string16 non_variation_labels; +base::string16 ExtractNonVariationLabels(const base::string16& labels) { + base::string16 non_variation_labels; // First, split everything by the label separator. - std::vector<string16> entries; + std::vector<base::string16> entries; base::SplitStringUsingSubstr(labels, google_update::kExperimentLabelSep, &entries); // For each label, keep the ones that do not look like a Variations label. - for (std::vector<string16>::const_iterator it = entries.begin(); + for (std::vector<base::string16>::const_iterator it = entries.begin(); it != entries.end(); ++it) { if (it->empty() || StartsWith(*it, kVariationPrefix, false)) continue; @@ -87,8 +87,8 @@ string16 ExtractNonVariationLabels(const string16& labels) { return non_variation_labels; } -string16 CombineExperimentLabels(const string16& variation_labels, - const string16& other_labels) { +base::string16 CombineExperimentLabels(const base::string16& variation_labels, + const base::string16& other_labels) { DCHECK(!StartsWith(variation_labels, google_update::kExperimentLabelSep, false)); DCHECK(!EndsWith(variation_labels, google_update::kExperimentLabelSep, @@ -96,7 +96,7 @@ string16 CombineExperimentLabels(const string16& variation_labels, DCHECK(!StartsWith(other_labels, google_update::kExperimentLabelSep, false)); DCHECK(!EndsWith(other_labels, google_update::kExperimentLabelSep, false)); // Note that if either label is empty, a separator is not necessary. - string16 combined_labels = other_labels; + base::string16 combined_labels = other_labels; if (!other_labels.empty() && !variation_labels.empty()) combined_labels += google_update::kExperimentLabelSep; combined_labels += variation_labels; diff --git a/chrome/common/metrics/variations/experiment_labels_win.h b/chrome/common/metrics/variations/experiment_labels_win.h index 1c6ae39..5df9e5a 100644 --- a/chrome/common/metrics/variations/experiment_labels_win.h +++ b/chrome/common/metrics/variations/experiment_labels_win.h @@ -13,20 +13,20 @@ namespace chrome_variations { // Takes the list of active groups and builds the label for the ones that have // Google Update VariationID associated with them. This will return an empty // string if there are no such groups. -string16 BuildGoogleUpdateExperimentLabel( +base::string16 BuildGoogleUpdateExperimentLabel( const base::FieldTrial::ActiveGroups& active_groups); // Creates a final combined experiment labels string with |variation_labels| // and |other_labels|, appropriately appending a separator based on their // contents. It is assumed that |variation_labels| and |other_labels| do not // have leading or trailing separators. -string16 CombineExperimentLabels(const string16& variation_labels, - const string16& other_labels); +base::string16 CombineExperimentLabels(const base::string16& variation_labels, + const base::string16& other_labels); // Takes the value of experiment_labels from the registry and returns a valid // experiment_labels string value containing only the labels that are not // associated with Chrome Variations. -string16 ExtractNonVariationLabels(const string16& labels); +base::string16 ExtractNonVariationLabels(const base::string16& labels); } // namespace chrome_variations diff --git a/chrome/common/multi_process_lock_win.cc b/chrome/common/multi_process_lock_win.cc index 0acadc3..e2a7cb9 100644 --- a/chrome/common/multi_process_lock_win.cc +++ b/chrome/common/multi_process_lock_win.cc @@ -30,7 +30,7 @@ class MultiProcessLockWin : public MultiProcessLock { return false; } - string16 wname = UTF8ToUTF16(name_); + base::string16 wname = UTF8ToUTF16(name_); event_.Set(CreateEvent(NULL, FALSE, FALSE, wname.c_str())); if (event_.Get() && GetLastError() != ERROR_ALREADY_EXISTS) { return true; diff --git a/chrome/common/net/url_fixer_upper.cc b/chrome/common/net/url_fixer_upper.cc index 8c074ee..ae917e2 100644 --- a/chrome/common/net/url_fixer_upper.cc +++ b/chrome/common/net/url_fixer_upper.cc @@ -40,8 +40,9 @@ url_parse::Component UTF8ComponentToUTF16Component( text_utf8.substr(0, component_utf8.begin); std::string component_string = text_utf8.substr(component_utf8.begin, component_utf8.len); - string16 before_component_string_16 = UTF8ToUTF16(before_component_string); - string16 component_string_16 = UTF8ToUTF16(component_string); + base::string16 before_component_string_16 = + UTF8ToUTF16(before_component_string); + base::string16 component_string_16 = UTF8ToUTF16(component_string); url_parse::Component component_16(before_component_string_16.length(), component_string_16.length()); return component_16; @@ -80,8 +81,8 @@ TrimPositions TrimWhitespaceUTF8(const std::string& input, // twice. Please feel free to file a bug if this function hurts the // performance of Chrome. DCHECK(IsStringUTF8(input)); - string16 input16 = UTF8ToUTF16(input); - string16 output16; + base::string16 input16 = UTF8ToUTF16(input); + base::string16 output16; TrimPositions result = TrimWhitespace(input16, positions, &output16); *output = UTF16ToUTF8(output16); return result; @@ -483,8 +484,8 @@ std::string URLFixerUpper::SegmentURL(const std::string& text, return SegmentURLInternal(&mutable_text, parts); } -string16 URLFixerUpper::SegmentURL(const string16& text, - url_parse::Parsed* parts) { +base::string16 URLFixerUpper::SegmentURL(const base::string16& text, + url_parse::Parsed* parts) { std::string text_utf8 = UTF16ToUTF8(text); url_parse::Parsed parts_utf8; std::string scheme_utf8 = SegmentURL(text_utf8, &parts_utf8); diff --git a/chrome/common/net/url_fixer_upper.h b/chrome/common/net/url_fixer_upper.h index 27a7aa9..3462880 100644 --- a/chrome/common/net/url_fixer_upper.h +++ b/chrome/common/net/url_fixer_upper.h @@ -31,7 +31,8 @@ namespace URLFixerUpper { // Returns the canonicalized scheme, or the empty string when |text| is only // whitespace. std::string SegmentURL(const std::string& text, url_parse::Parsed* parts); - string16 SegmentURL(const string16& text, url_parse::Parsed* parts); + base::string16 SegmentURL(const base::string16& text, + url_parse::Parsed* parts); // Converts |text| to a fixed-up URL and returns it. Attempts to make // some "smart" adjustments to obviously-invalid input where possible. diff --git a/chrome/common/net/url_util.cc b/chrome/common/net/url_util.cc index aaeb95e..3015a17 100644 --- a/chrome/common/net/url_util.cc +++ b/chrome/common/net/url_util.cc @@ -21,7 +21,7 @@ void WriteURLToClipboard(const GURL& url, // Unescaping path and query is not a good idea because other applications // may not encode non-ASCII characters in UTF-8. See crbug.com/2820. - string16 text = url.SchemeIs(content::kMailToScheme) ? + base::string16 text = url.SchemeIs(content::kMailToScheme) ? ASCIIToUTF16(url.path()) : net::FormatUrl(url, languages, net::kFormatUrlOmitNothing, net::UnescapeRule::NONE, NULL, NULL, NULL); diff --git a/chrome/common/net/x509_certificate_model.cc b/chrome/common/net/x509_certificate_model.cc index 416bd9d..bfc1192 100644 --- a/chrome/common/net/x509_certificate_model.cc +++ b/chrome/common/net/x509_certificate_model.cc @@ -17,11 +17,11 @@ namespace x509_certificate_model { std::string ProcessIDN(const std::string& input) { // Convert the ASCII input to a string16 for ICU. - string16 input16; + base::string16 input16; input16.reserve(input.length()); input16.insert(input16.end(), input.begin(), input.end()); - string16 output16 = net::IDNToUnicode(input, std::string()); + base::string16 output16 = net::IDNToUnicode(input, std::string()); if (input16 == output16) return input; // Input did not contain any encoded data. diff --git a/chrome/common/print_messages.cc b/chrome/common/print_messages.cc index b900562..5894629 100644 --- a/chrome/common/print_messages.cc +++ b/chrome/common/print_messages.cc @@ -53,8 +53,8 @@ void PrintMsg_Print_Params::Reset() { print_scaling_option = blink::WebPrintScalingOptionSourceSize; print_to_pdf = false; display_header_footer = false; - title = string16(); - url = string16(); + title = base::string16(); + url = base::string16(); should_print_backgrounds = false; } diff --git a/chrome/common/print_messages.h b/chrome/common/print_messages.h index d4de3ce..711eea5 100644 --- a/chrome/common/print_messages.h +++ b/chrome/common/print_messages.h @@ -45,8 +45,8 @@ struct PrintMsg_Print_Params { blink::WebPrintScalingOption print_scaling_option; bool print_to_pdf; bool display_header_footer; - string16 title; - string16 url; + base::string16 title; + base::string16 url; bool should_print_backgrounds; }; diff --git a/chrome/common/render_messages.h b/chrome/common/render_messages.h index 6b03d4d..9df2974 100644 --- a/chrome/common/render_messages.h +++ b/chrome/common/render_messages.h @@ -141,7 +141,7 @@ IPC_STRUCT_BEGIN(ChromeViewHostMsg_GetPluginInfo_Output) IPC_STRUCT_MEMBER(content::WebPluginInfo, plugin) IPC_STRUCT_MEMBER(std::string, actual_mime_type) IPC_STRUCT_MEMBER(std::string, group_identifier) - IPC_STRUCT_MEMBER(string16, group_name) + IPC_STRUCT_MEMBER(base::string16, group_name) IPC_STRUCT_END() IPC_STRUCT_TRAITS_BEGIN(ContentSettingsPattern::PatternParts) @@ -270,8 +270,8 @@ IPC_MESSAGE_CONTROL0(ChromeViewMsg_PurgeMemory) // a time which is late enough to not be thrown out, and early enough to be // before onload events are fired. IPC_MESSAGE_ROUTED4(ChromeViewMsg_WebUIJavaScript, - string16, /* frame_xpath */ - string16, /* jscript_url */ + base::string16, /* frame_xpath */ + base::string16, /* jscript_url */ int, /* ID */ bool /* If true, result is sent back. */) @@ -328,13 +328,13 @@ IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxSetSuggestionToPrefetch, InstantSuggestion /* suggestion */) IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxSubmit, - string16 /* value */) + base::string16 /* value */) IPC_MESSAGE_ROUTED1(ChromeViewMsg_SearchBoxThemeChanged, ThemeBackgroundInfo /* value */) IPC_MESSAGE_ROUTED2(ChromeViewMsg_ChromeIdentityCheckResult, - string16 /* identity */, + base::string16 /* identity */, bool /* identity_match */) IPC_MESSAGE_ROUTED0(ChromeViewMsg_SearchBoxToggleVoiceSearch) @@ -466,8 +466,8 @@ IPC_SYNC_MESSAGE_CONTROL5_1(ChromeViewHostMsg_AllowDatabase, int /* render_view_id */, GURL /* origin_url */, GURL /* top origin url */, - string16 /* database name */, - string16 /* database display name */, + base::string16 /* database name */, + base::string16 /* database display name */, bool /* allowed */) // Sent by the renderer process to check whether access to DOM Storage is @@ -493,7 +493,7 @@ IPC_SYNC_MESSAGE_CONTROL4_1(ChromeViewHostMsg_AllowIndexedDB, int /* render_view_id */, GURL /* origin_url */, GURL /* top origin url */, - string16 /* database name */, + base::string16 /* database name */, bool /* allowed */) // Return information about a plugin for the given URL and MIME type. @@ -536,7 +536,7 @@ IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_RemovePluginPlaceholderHost, // Notifies a missing plug-in placeholder that a plug-in with name |plugin_name| // has been found. IPC_MESSAGE_ROUTED1(ChromeViewMsg_FoundMissingPlugin, - string16 /* plugin_name */) + base::string16 /* plugin_name */) // Notifies a missing plug-in placeholder that no plug-in has been found. IPC_MESSAGE_ROUTED0(ChromeViewMsg_DidNotFindMissingPlugin) @@ -617,7 +617,7 @@ IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_BlockedOutdatedPlugin, // Notifies when a plugin couldn't be loaded because it requires // user authorization. IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_BlockedUnauthorizedPlugin, - string16 /* name */, + base::string16 /* name */, std::string /* plug-in group identifier */) // Provide the browser process with information about the WebCore resource @@ -722,7 +722,7 @@ IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_LogEvent, // The Instant page asks for Chrome identity check against |identity|. IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_ChromeIdentityCheck, int /* page_id */, - string16 /* identity */) + base::string16 /* identity */) // Tells InstantExtended to set the omnibox focus state. IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_FocusOmnibox, @@ -734,7 +734,7 @@ IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_FocusOmnibox, // open. IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_PasteAndOpenDropdown, int /* page_id */, - string16 /* text to be pasted */) + base::string16 /* text to be pasted */) // Tells InstantExtended whether the embedded search API is supported. // See http://dev.chromium.org/embeddedsearch @@ -778,7 +778,7 @@ IPC_MESSAGE_CONTROL2(ChromeViewMsg_SetSearchURLs, // Tells listeners that a detailed message was reported to the console by // WebKit. IPC_MESSAGE_ROUTED4(ChromeViewHostMsg_DetailedConsoleMessageAdded, - string16 /* message */, - string16 /* source */, + base::string16 /* message */, + base::string16 /* source */, extensions::StackTrace /* stack trace */, int32 /* severity level */) diff --git a/chrome/common/service_process_util_unittest.cc b/chrome/common/service_process_util_unittest.cc index 5e89256..f7153fe 100644 --- a/chrome/common/service_process_util_unittest.cc +++ b/chrome/common/service_process_util_unittest.cc @@ -124,7 +124,7 @@ TEST_F(ServiceProcessStateTest, AutoRun) { scoped_ptr<CommandLine> autorun_command_line; #if defined(OS_WIN) std::string value_name = GetServiceProcessScopedName("_service_run"); - string16 value; + base::string16 value; EXPECT_TRUE(base::win::ReadCommandFromAutoRun(HKEY_CURRENT_USER, UTF8ToWide(value_name), &value)); diff --git a/chrome/common/service_process_util_win.cc b/chrome/common/service_process_util_win.cc index ad8832d..7e7754d 100644 --- a/chrome/common/service_process_util_win.cc +++ b/chrome/common/service_process_util_win.cc @@ -22,12 +22,12 @@ namespace { const char* kTerminateEventSuffix = "_service_terminate_evt"; -string16 GetServiceProcessReadyEventName() { +base::string16 GetServiceProcessReadyEventName() { return UTF8ToWide( GetServiceProcessScopedVersionedName("_service_ready")); } -string16 GetServiceProcessTerminateEventName() { +base::string16 GetServiceProcessTerminateEventName() { return UTF8ToWide( GetServiceProcessScopedVersionedName(kTerminateEventSuffix)); } @@ -55,7 +55,7 @@ class ServiceProcessTerminateMonitor : terminate_task_(terminate_task) { } void Start() { - string16 event_name = GetServiceProcessTerminateEventName(); + base::string16 event_name = GetServiceProcessTerminateEventName(); DCHECK(event_name.length() <= MAX_PATH); terminate_event_.Set(CreateEvent(NULL, TRUE, FALSE, event_name.c_str())); watcher_.StartWatching(terminate_event_.Get(), this); @@ -87,7 +87,7 @@ bool ForceServiceProcessShutdown(const std::string& version, base::win::ScopedHandle terminate_event; std::string versioned_name = version; versioned_name.append(kTerminateEventSuffix); - string16 event_name = + base::string16 event_name = UTF8ToWide(GetServiceProcessScopedName(versioned_name)); terminate_event.Set(OpenEvent(EVENT_MODIFY_STATE, FALSE, event_name.c_str())); if (!terminate_event.IsValid()) @@ -97,7 +97,7 @@ bool ForceServiceProcessShutdown(const std::string& version, } bool CheckServiceProcessReady() { - string16 event_name = GetServiceProcessReadyEventName(); + base::string16 event_name = GetServiceProcessReadyEventName(); base::win::ScopedHandle event( OpenEvent(SYNCHRONIZE | READ_CONTROL, false, event_name.c_str())); if (!event.IsValid()) @@ -119,7 +119,7 @@ void ServiceProcessState::CreateState() { bool ServiceProcessState::TakeSingletonLock() { DCHECK(state_); - string16 event_name = GetServiceProcessReadyEventName(); + base::string16 event_name = GetServiceProcessReadyEventName(); DCHECK(event_name.length() <= MAX_PATH); base::win::ScopedHandle service_process_ready_event; service_process_ready_event.Set( diff --git a/chrome/common/spellcheck_messages.h b/chrome/common/spellcheck_messages.h index dc794ca..ac4e2f0 100644 --- a/chrome/common/spellcheck_messages.h +++ b/chrome/common/spellcheck_messages.h @@ -67,9 +67,9 @@ IPC_MESSAGE_CONTROL1(SpellCheckHostMsg_RespondDocumentMarkers, // If the service is not available, the 4th parameter should be false and the // 5th parameter should contain the requested sentence. IPC_MESSAGE_ROUTED4(SpellCheckMsg_RespondSpellingService, - int /* request identifier given by WebKit */, - bool /* succeeded calling service */, - string16 /* sentence */, + int /* request identifier given by WebKit */, + bool /* succeeded calling service */, + base::string16 /* sentence */, std::vector<SpellCheckResult>) #endif @@ -97,7 +97,7 @@ IPC_MESSAGE_CONTROL0(SpellCheckHostMsg_RequestDictionary) // Tracks spell checking occurrence to collect histogram. IPC_MESSAGE_ROUTED2(SpellCheckHostMsg_NotifyChecked, - string16 /* word */, + base::string16 /* word */, bool /* true if checked word is misspelled */) #if !defined(OS_MACOSX) @@ -107,7 +107,7 @@ IPC_MESSAGE_ROUTED2(SpellCheckHostMsg_NotifyChecked, IPC_MESSAGE_CONTROL4(SpellCheckHostMsg_CallSpellingService, int /* route_id for response */, int /* request identifier given by WebKit */, - string16 /* sentence */, + base::string16 /* sentence */, std::vector<SpellCheckMarker> /* markers */) #endif @@ -118,22 +118,22 @@ IPC_MESSAGE_ROUTED1(SpellCheckHostMsg_ShowSpellingPanel, // Tells the browser to update the spelling panel with the given word. IPC_MESSAGE_ROUTED1(SpellCheckHostMsg_UpdateSpellingPanelWithMisspelledWord, - string16 /* the word to update the panel with */) + base::string16 /* the word to update the panel with */) // TODO(groby): This needs to originate from SpellcheckProvider. IPC_SYNC_MESSAGE_CONTROL2_1(SpellCheckHostMsg_CheckSpelling, - string16 /* word */, + base::string16 /* word */, int /* route_id */, bool /* correct */) IPC_SYNC_MESSAGE_CONTROL1_1(SpellCheckHostMsg_FillSuggestionList, - string16 /* word */, - std::vector<string16> /* suggestions */) + base::string16 /* word */, + std::vector<base::string16> /* suggestions */) IPC_MESSAGE_CONTROL4(SpellCheckHostMsg_RequestTextCheck, int /* route_id for response */, int /* request identifier given by WebKit */, - string16 /* sentence */, + base::string16 /* sentence */, std::vector<SpellCheckMarker> /* markers */) IPC_MESSAGE_ROUTED2(SpellCheckHostMsg_ToggleSpellCheck, diff --git a/chrome/common/spellcheck_result.h b/chrome/common/spellcheck_result.h index 2ef3fa7..cbd4a8b 100644 --- a/chrome/common/spellcheck_result.h +++ b/chrome/common/spellcheck_result.h @@ -28,7 +28,7 @@ struct SpellCheckResult { Decoration d = SPELLING, int loc = 0, int len = 0, - const string16& rep = string16(), + const base::string16& rep = base::string16(), uint32 h = 0) : decoration(d), location(loc), length(len), replacement(rep), hash(h) { } @@ -36,7 +36,7 @@ struct SpellCheckResult { Decoration decoration; int location; int length; - string16 replacement; + base::string16 replacement; uint32 hash; }; diff --git a/chrome/common/time_format_browsertest.cc b/chrome/common/time_format_browsertest.cc index 1431031..9269652 100644 --- a/chrome/common/time_format_browsertest.cc +++ b/chrome/common/time_format_browsertest.cc @@ -34,7 +34,7 @@ IN_PROC_BROWSER_TEST_F(TimeFormatBrowserTest, DecimalPointNotDot) { // This showed up on the browser on estimated download time, for example. // http://crbug.com/60476 - string16 one_min = + base::string16 one_min = ui::TimeFormat::TimeRemainingShort(TimeDelta::FromMinutes(1)); EXPECT_EQ(ASCIIToUTF16("1 min"), one_min); } diff --git a/chrome/common/translate/language_detection_details.h b/chrome/common/translate/language_detection_details.h index c05374c..066a27e 100644 --- a/chrome/common/translate/language_detection_details.h +++ b/chrome/common/translate/language_detection_details.h @@ -37,7 +37,7 @@ struct LanguageDetectionDetails { std::string adopted_language; // The contents which is used for detection. - string16 contents; + base::string16 contents; }; #endif // CHROME_COMMON_TRANSLATE_LANGUAGE_DETECTION_DETAILS_H_ diff --git a/chrome/common/validation_message_messages.h b/chrome/common/validation_message_messages.h index 94472b3..26540b1 100644 --- a/chrome/common/validation_message_messages.h +++ b/chrome/common/validation_message_messages.h @@ -11,8 +11,8 @@ IPC_MESSAGE_CONTROL4(ValidationMessageMsg_ShowValidationMessage, int /* route id */, gfx::Rect /* anchor rectangle in root view coordinate */, - string16 /* validation message */, - string16 /* supplemental text */) + base::string16 /* validation message */, + base::string16 /* supplemental text */) IPC_MESSAGE_CONTROL0(ValidationMessageMsg_HideValidationMessage) diff --git a/chrome/common/web_application_info.h b/chrome/common/web_application_info.h index 6e642f4..f02f9f2 100644 --- a/chrome/common/web_application_info.h +++ b/chrome/common/web_application_info.h @@ -38,10 +38,10 @@ struct WebApplicationInfo { bool is_bookmark_app; // Title of the application. - string16 title; + base::string16 title; // Description of the application. - string16 description; + base::string16 description; // The launch URL for the app. GURL app_url; |