summaryrefslogtreecommitdiffstats
path: root/chrome/utility
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/utility')
-rw-r--r--chrome/utility/extensions/unpacker.cc6
-rw-r--r--chrome/utility/extensions/unpacker_unittest.cc2
-rw-r--r--chrome/utility/importer/bookmark_html_reader_unittest.cc3
-rw-r--r--chrome/utility/importer/firefox_importer.cc2
-rw-r--r--chrome/utility/importer/firefox_importer_unittest.cc4
-rw-r--r--chrome/utility/importer/ie_importer_win.cc8
-rw-r--r--chrome/utility/importer/nss_decryptor.cc6
-rw-r--r--chrome/utility/importer/safari_importer_unittest.mm6
-rw-r--r--chrome/utility/media_galleries/itunes_library_parser.cc2
9 files changed, 23 insertions, 16 deletions
diff --git a/chrome/utility/extensions/unpacker.cc b/chrome/utility/extensions/unpacker.cc
index 75c3741..795e0c5e 100644
--- a/chrome/utility/extensions/unpacker.cc
+++ b/chrome/utility/extensions/unpacker.cc
@@ -293,10 +293,10 @@ bool Unpacker::ReadMessageCatalog(const base::FilePath& message_path) {
if (error.empty()) {
// If file is missing, Deserialize will fail with empty error.
SetError(base::StringPrintf("%s %s", errors::kLocalesMessagesFileMissing,
- UTF16ToUTF8(messages_file).c_str()));
+ base::UTF16ToUTF8(messages_file).c_str()));
} else {
SetError(base::StringPrintf("%s: %s",
- UTF16ToUTF8(messages_file).c_str(),
+ base::UTF16ToUTF8(messages_file).c_str(),
error.c_str()));
}
return false;
@@ -320,7 +320,7 @@ bool Unpacker::ReadMessageCatalog(const base::FilePath& message_path) {
}
void Unpacker::SetError(const std::string &error) {
- SetUTF16Error(UTF8ToUTF16(error));
+ SetUTF16Error(base::UTF8ToUTF16(error));
}
void Unpacker::SetUTF16Error(const base::string16& error) {
diff --git a/chrome/utility/extensions/unpacker_unittest.cc b/chrome/utility/extensions/unpacker_unittest.cc
index 28a2522..faf89ff 100644
--- a/chrome/utility/extensions/unpacker_unittest.cc
+++ b/chrome/utility/extensions/unpacker_unittest.cc
@@ -16,6 +16,8 @@
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/skia/include/core/SkBitmap.h"
+using base::ASCIIToUTF16;
+
namespace extensions {
namespace errors = manifest_errors;
diff --git a/chrome/utility/importer/bookmark_html_reader_unittest.cc b/chrome/utility/importer/bookmark_html_reader_unittest.cc
index 6bfb16f..47ae53e 100644
--- a/chrome/utility/importer/bookmark_html_reader_unittest.cc
+++ b/chrome/utility/importer/bookmark_html_reader_unittest.cc
@@ -16,6 +16,9 @@
#include "chrome/common/importer/imported_bookmark_entry.h"
#include "testing/gtest/include/gtest/gtest.h"
+using base::ASCIIToUTF16;
+using base::UTF16ToWide;
+
namespace bookmark_html_reader {
TEST(BookmarkHTMLReaderTest, ParseTests) {
diff --git a/chrome/utility/importer/firefox_importer.cc b/chrome/utility/importer/firefox_importer.cc
index 3c826d2..014e8d5 100644
--- a/chrome/utility/importer/firefox_importer.cc
+++ b/chrome/utility/importer/firefox_importer.cc
@@ -310,7 +310,7 @@ void FirefoxImporter::ImportBookmarks() {
if (!item->keyword.empty() && item->url.is_valid()) {
importer::URLKeywordInfo url_keyword_info;
url_keyword_info.url = item->url;
- url_keyword_info.keyword.assign(UTF8ToUTF16(item->keyword));
+ url_keyword_info.keyword.assign(base::UTF8ToUTF16(item->keyword));
url_keyword_info.display_name = item->title;
url_keywords.push_back(url_keyword_info);
}
diff --git a/chrome/utility/importer/firefox_importer_unittest.cc b/chrome/utility/importer/firefox_importer_unittest.cc
index 50372e1..9a415d6 100644
--- a/chrome/utility/importer/firefox_importer_unittest.cc
+++ b/chrome/utility/importer/firefox_importer_unittest.cc
@@ -36,11 +36,11 @@ TEST(FirefoxImporterTest, MAYBE_NSS(Firefox3NSS3Decryptor)) {
ASSERT_TRUE(decryptor_proxy.Setup(nss_path));
ASSERT_TRUE(decryptor_proxy.DecryptorInit(nss_path, db_path));
- EXPECT_EQ(ASCIIToUTF16("hello"),
+ EXPECT_EQ(base::ASCIIToUTF16("hello"),
decryptor_proxy.Decrypt("MDIEEPgAAAAAAAAAAAAAAAAAAAEwFAYIKoZIhvcNAwcECKa"
"jtRg4qFSHBAhv9luFkXgDJA=="));
// Test UTF-16 encoding.
- EXPECT_EQ(WideToUTF16(L"\x4E2D"),
+ EXPECT_EQ(base::WideToUTF16(L"\x4E2D"),
decryptor_proxy.Decrypt("MDIEEPgAAAAAAAAAAAAAAAAAAAEwFAYIKoZIhvcNAwcECLW"
"qqiccfQHWBAie74hxnULxlw=="));
}
diff --git a/chrome/utility/importer/ie_importer_win.cc b/chrome/utility/importer/ie_importer_win.cc
index 6dbe5d8..0779fb3 100644
--- a/chrome/utility/importer/ie_importer_win.cc
+++ b/chrome/utility/importer/ie_importer_win.cc
@@ -290,7 +290,7 @@ GURL ReadURLFromInternetShortcut(IUniformResourceLocator* url_locator) {
base::win::ScopedCoMem<wchar_t> url;
// GetURL can return S_FALSE (FAILED(S_FALSE) is false) when url == NULL.
return (FAILED(url_locator->GetURL(&url)) || !url) ?
- GURL() : GURL(WideToUTF16(std::wstring(url)));
+ GURL() : GURL(base::WideToUTF16(std::wstring(url)));
}
// Reads the URL of the favicon of the internet shortcut.
@@ -315,7 +315,7 @@ GURL ReadFaviconURLFromInternetShortcut(IUniformResourceLocator* url_locator) {
if (FAILED(property_storage->ReadMultiple(1, properties, output.Receive())) ||
output.get().vt != VT_LPWSTR)
return GURL();
- return GURL(WideToUTF16(output.get().pwszVal));
+ return GURL(base::WideToUTF16(output.get().pwszVal));
}
// Reads the favicon imaga data in an NTFS alternate data stream. This is where
@@ -329,7 +329,7 @@ bool ReadFaviconDataFromInternetShortcut(const base::string16& file,
// Reads the favicon imaga data in the Internet cache. IE6 doesn't hold the data
// explicitly, but it might be found in the cache.
bool ReadFaviconDataFromCache(const GURL& favicon_url, std::string* data) {
- std::wstring url_wstring(UTF8ToWide(favicon_url.spec()));
+ std::wstring url_wstring(base::UTF8ToWide(favicon_url.spec()));
DWORD info_size = 0;
GetUrlCacheEntryInfoEx(url_wstring.c_str(), NULL, &info_size, NULL, NULL,
NULL, 0);
@@ -702,7 +702,7 @@ void IEImporter::ImportSearchEngines() {
}
}
- std::string url(WideToUTF8(wide_url));
+ std::string url(base::WideToUTF8(wide_url));
SearchEnginesMap::iterator t_iter = search_engines_map.find(url);
if (t_iter == search_engines_map.end()) {
// First time we see that URL.
diff --git a/chrome/utility/importer/nss_decryptor.cc b/chrome/utility/importer/nss_decryptor.cc
index 652fed7..6b22ae2 100644
--- a/chrome/utility/importer/nss_decryptor.cc
+++ b/chrome/utility/importer/nss_decryptor.cc
@@ -101,7 +101,7 @@ base::string16 NSSDecryptor::Decrypt(const std::string& crypt) const {
base::Base64Decode(crypt.substr(1), &plain);
}
- return UTF8ToUTF16(plain);
+ return base::UTF8ToUTF16(plain);
}
// There are three versions of password files. They store saved user
@@ -205,11 +205,11 @@ void NSSDecryptor::ParseSignons(
// line (contains a dot).
while (begin + 4 < end) {
// The user name.
- form.username_element = UTF8ToUTF16(lines[begin++]);
+ form.username_element = base::UTF8ToUTF16(lines[begin++]);
form.username_value = Decrypt(lines[begin++]);
// The element name has a leading '*'.
if (lines[begin].at(0) == '*') {
- form.password_element = UTF8ToUTF16(lines[begin++].substr(1));
+ form.password_element = base::UTF8ToUTF16(lines[begin++].substr(1));
form.password_value = Decrypt(lines[begin++]);
} else {
// Maybe the file is bad, we skip to next block.
diff --git a/chrome/utility/importer/safari_importer_unittest.mm b/chrome/utility/importer/safari_importer_unittest.mm
index d7f3c65..043e186 100644
--- a/chrome/utility/importer/safari_importer_unittest.mm
+++ b/chrome/utility/importer/safari_importer_unittest.mm
@@ -22,6 +22,8 @@
#include "sql/connection.h"
#include "testing/platform_test.h"
+using base::ASCIIToUTF16;
+
// In order to test the Safari import functionality effectively, we store a
// simulated Library directory containing dummy data files in the same
// structure as ~/Library in the Chrome test data directory.
@@ -57,7 +59,7 @@ TEST_F(SafariImporterTest, HistoryImport) {
ImporterURLRow& it1 = history_items[0];
EXPECT_EQ(it1.url, GURL("http://www.firsthistoryitem.com/"));
- EXPECT_EQ(it1.title, UTF8ToUTF16("First History Item Title"));
+ EXPECT_EQ(it1.title, base::UTF8ToUTF16("First History Item Title"));
EXPECT_EQ(it1.visit_count, 1);
EXPECT_EQ(it1.hidden, 0);
EXPECT_EQ(it1.typed_count, 0);
@@ -68,7 +70,7 @@ TEST_F(SafariImporterTest, HistoryImport) {
std::string second_item_title("http://www.secondhistoryitem.com/");
EXPECT_EQ(it2.url, GURL(second_item_title));
// The second item lacks a title so we expect the URL to be substituted.
- EXPECT_EQ(UTF16ToUTF8(it2.title), second_item_title.c_str());
+ EXPECT_EQ(base::UTF16ToUTF8(it2.title), second_item_title.c_str());
EXPECT_EQ(it2.visit_count, 55);
EXPECT_EQ(it2.hidden, 0);
EXPECT_EQ(it2.typed_count, 0);
diff --git a/chrome/utility/media_galleries/itunes_library_parser.cc b/chrome/utility/media_galleries/itunes_library_parser.cc
index aef27f7..21fa825 100644
--- a/chrome/utility/media_galleries/itunes_library_parser.cc
+++ b/chrome/utility/media_galleries/itunes_library_parser.cc
@@ -79,7 +79,7 @@ bool GetTrackInfoFromDict(XmlReader* reader, TrackInfo* result) {
#else
base::string16 location16(decoded_location.data(),
decoded_location.length());
- std::string location = "/" + UTF16ToUTF8(location16);
+ std::string location = "/" + base::UTF16ToUTF8(location16);
#endif
result->location = base::FilePath(location);
found_location = true;