summaryrefslogtreecommitdiffstats
path: root/chrome/common/extensions
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-24 20:27:04 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-24 20:27:04 +0000
commit5f0cebb46d66ef0a1996594d0846c0067a8cf475 (patch)
tree5b3204961a403e7396fe48b45930b5b6528839f0 /chrome/common/extensions
parent20023a76c3ffa049c35f86263fbf6ee4bbf00ade (diff)
downloadchromium_src-5f0cebb46d66ef0a1996594d0846c0067a8cf475.zip
chromium_src-5f0cebb46d66ef0a1996594d0846c0067a8cf475.tar.gz
chromium_src-5f0cebb46d66ef0a1996594d0846c0067a8cf475.tar.bz2
Add utf_string_conversions to base namespace.
This adds "using"s for all functions so those can be fixed in a separate pass. This converts the "Wide" versions of the functions in the Chrome directory as a first pass on the changeover. BUG= Review URL: https://codereview.chromium.org/12314090 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@184352 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/extensions')
-rw-r--r--chrome/common/extensions/extension.cc16
-rw-r--r--chrome/common/extensions/extension_file_util.cc2
-rw-r--r--chrome/common/extensions/extension_file_util_unittest.cc2
-rw-r--r--chrome/common/extensions/manifest_tests/extension_manifests_initvalue_unittest.cc2
4 files changed, 12 insertions, 10 deletions
diff --git a/chrome/common/extensions/extension.cc b/chrome/common/extensions/extension.cc
index b8f18f7..a3fa24b 100644
--- a/chrome/common/extensions/extension.cc
+++ b/chrome/common/extensions/extension.cc
@@ -387,7 +387,7 @@ ExtensionResource Extension::GetResource(
#if defined(OS_POSIX)
base::FilePath relative_file_path(new_path);
#elif defined(OS_WIN)
- base::FilePath relative_file_path(UTF8ToWide(new_path));
+ base::FilePath relative_file_path(base::UTF8ToWide(new_path));
#endif
ExtensionResource r(id(), path(), relative_file_path);
if ((creation_flags() & Extension::FOLLOW_SYMLINKS_ANYWHERE)) {
@@ -790,14 +790,14 @@ bool Extension::ShowConfigureContextMenus() const {
std::set<base::FilePath> Extension::GetBrowserImages() const {
std::set<base::FilePath> image_paths;
- // TODO(viettrungluu): These |FilePath::FromWStringHack(UTF8ToWide())|
+ // TODO(viettrungluu): These |FilePath::FromWStringHack(base::UTF8ToWide())|
// indicate that we're doing something wrong.
// Extension icons.
for (ExtensionIconSet::IconMap::const_iterator iter = icons().map().begin();
iter != icons().map().end(); ++iter) {
image_paths.insert(
- base::FilePath::FromWStringHack(UTF8ToWide(iter->second)));
+ base::FilePath::FromWStringHack(base::UTF8ToWide(iter->second)));
}
// Theme images.
@@ -806,8 +806,10 @@ std::set<base::FilePath> Extension::GetBrowserImages() const {
for (DictionaryValue::Iterator it(*theme_images); !it.IsAtEnd();
it.Advance()) {
std::string val;
- if (it.value().GetAsString(&val))
- image_paths.insert(base::FilePath::FromWStringHack(UTF8ToWide(val)));
+ if (it.value().GetAsString(&val)) {
+ image_paths.insert(base::FilePath::FromWStringHack(
+ base::UTF8ToWide(val)));
+ }
}
}
@@ -818,7 +820,7 @@ std::set<base::FilePath> Extension::GetBrowserImages() const {
iter != page_action_info->default_icon.map().end();
++iter) {
image_paths.insert(
- base::FilePath::FromWStringHack(UTF8ToWide(iter->second)));
+ base::FilePath::FromWStringHack(base::UTF8ToWide(iter->second)));
}
}
@@ -829,7 +831,7 @@ std::set<base::FilePath> Extension::GetBrowserImages() const {
iter != browser_action->default_icon.map().end();
++iter) {
image_paths.insert(
- base::FilePath::FromWStringHack(UTF8ToWide(iter->second)));
+ base::FilePath::FromWStringHack(base::UTF8ToWide(iter->second)));
}
}
diff --git a/chrome/common/extensions/extension_file_util.cc b/chrome/common/extensions/extension_file_util.cc
index 0a3a36b..589c8a2 100644
--- a/chrome/common/extensions/extension_file_util.cc
+++ b/chrome/common/extensions/extension_file_util.cc
@@ -707,7 +707,7 @@ base::FilePath ExtensionURLToRelativeFilePath(const GURL& url) {
#if defined(OS_POSIX)
base::FilePath(file_path);
#elif defined(OS_WIN)
- base::FilePath(UTF8ToWide(file_path));
+ base::FilePath(base::UTF8ToWide(file_path));
#else
base::FilePath();
NOTIMPLEMENTED();
diff --git a/chrome/common/extensions/extension_file_util_unittest.cc b/chrome/common/extensions/extension_file_util_unittest.cc
index dc3fd3b..231dfd76 100644
--- a/chrome/common/extensions/extension_file_util_unittest.cc
+++ b/chrome/common/extensions/extension_file_util_unittest.cc
@@ -300,7 +300,7 @@ TEST_F(ExtensionFileUtilTest, ExtensionURLToRelativeFilePath) {
base::FilePath expected_path(test_cases[i].expected_relative_path);
#elif defined(OS_WIN)
base::FilePath expected_path(
- UTF8ToWide(test_cases[i].expected_relative_path));
+ base::UTF8ToWide(test_cases[i].expected_relative_path));
#endif
base::FilePath actual_path =
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 656dd0f..347a899 100644
--- a/chrome/common/extensions/manifest_tests/extension_manifests_initvalue_unittest.cc
+++ b/chrome/common/extensions/manifest_tests/extension_manifests_initvalue_unittest.cc
@@ -164,7 +164,7 @@ TEST_F(InitValueManifestTest, InitFromValueValidNameInRTL) {
// Strong RTL characters in name.
extension = LoadAndExpectSuccess("init_valid_name_strong_rtl.json");
- localized_name = WideToUTF16(L"Dictionary (\x05D1\x05D2"L" Google)");
+ localized_name = base::WideToUTF16(L"Dictionary (\x05D1\x05D2"L" Google)");
base::i18n::AdjustStringForLocaleDirection(&localized_name);
EXPECT_EQ(localized_name, UTF8ToUTF16(extension->name()));