summaryrefslogtreecommitdiffstats
path: root/content/browser
diff options
context:
space:
mode:
authoravi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-25 07:29:24 +0000
committeravi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-25 07:29:24 +0000
commit3295612b187d98b8e64d508fc41595dcc614e8e8 (patch)
tree00ae8d654e8c9102c6e15188a625ce57580f0e0c /content/browser
parent0ea152b98ef30f08442d8f6c74c820f6d0db85bd (diff)
downloadchromium_src-3295612b187d98b8e64d508fc41595dcc614e8e8.zip
chromium_src-3295612b187d98b8e64d508fc41595dcc614e8e8.tar.gz
chromium_src-3295612b187d98b8e64d508fc41595dcc614e8e8.tar.bz2
Update uses of UTF conversions in content/ to use the base:: namespace.
BUG=330556 TEST=no change TBR=ben@chromium.org Review URL: https://codereview.chromium.org/121033002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@242483 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser')
-rw-r--r--content/browser/accessibility/accessibility_tree_formatter.cc12
-rw-r--r--content/browser/accessibility/accessibility_tree_formatter_android.cc4
-rw-r--r--content/browser/accessibility/accessibility_tree_formatter_gtk.cc2
-rw-r--r--content/browser/accessibility/accessibility_tree_formatter_mac.mm4
-rw-r--r--content/browser/accessibility/accessibility_tree_formatter_win.cc16
-rw-r--r--content/browser/accessibility/accessibility_ui.cc7
-rw-r--r--content/browser/accessibility/accessibility_win_browsertest.cc5
-rw-r--r--content/browser/accessibility/browser_accessibility.cc6
-rw-r--r--content/browser/accessibility/browser_accessibility_android.cc8
-rw-r--r--content/browser/accessibility/browser_accessibility_cocoa.mm2
-rw-r--r--content/browser/accessibility/browser_accessibility_win.cc37
-rw-r--r--content/browser/accessibility/browser_accessibility_win_unittest.cc2
-rw-r--r--content/browser/accessibility/dump_accessibility_tree_browsertest.cc18
-rw-r--r--content/browser/android/content_view_core_impl.cc2
-rw-r--r--content/browser/browser_plugin/browser_plugin_guest.cc14
-rw-r--r--content/browser/browser_plugin/browser_plugin_host_browsertest.cc13
-rw-r--r--content/browser/dom_storage/dom_storage_area_unittest.cc3
-rw-r--r--content/browser/dom_storage/dom_storage_context_impl_unittest.cc2
-rw-r--r--content/browser/dom_storage/dom_storage_database_unittest.cc2
-rw-r--r--content/browser/dom_storage/session_storage_database.cc11
-rw-r--r--content/browser/dom_storage/session_storage_database_unittest.cc14
-rw-r--r--content/browser/download/download_item_impl.cc2
-rw-r--r--content/browser/download/drag_download_util.cc5
-rw-r--r--content/browser/download/save_package.cc2
-rw-r--r--content/browser/download/save_package_unittest.cc14
-rw-r--r--content/browser/fileapi/file_system_dir_url_request_job_unittest.cc2
-rw-r--r--content/browser/frame_host/debug_urls.cc3
-rw-r--r--content/browser/frame_host/navigation_controller_impl_unittest.cc12
-rw-r--r--content/browser/frame_host/navigation_entry_impl_unittest.cc2
-rw-r--r--content/browser/frame_host/render_frame_host_manager_browsertest.cc2
-rw-r--r--content/browser/frame_host/render_frame_host_manager_unittest.cc6
-rw-r--r--content/browser/gamepad/gamepad_platform_data_fetcher_linux.cc2
-rw-r--r--content/browser/geolocation/network_location_provider.cc2
-rw-r--r--content/browser/geolocation/network_location_provider_unittest.cc8
-rw-r--r--content/browser/geolocation/network_location_request.cc2
-rw-r--r--content/browser/geolocation/wifi_data_provider_chromeos.cc4
-rw-r--r--content/browser/geolocation/wifi_data_provider_chromeos_unittest.cc3
-rw-r--r--content/browser/geolocation/wifi_data_provider_common.cc14
-rw-r--r--content/browser/geolocation/wifi_data_provider_common_unittest.cc4
-rw-r--r--content/browser/geolocation/wifi_data_provider_common_win.cc6
-rw-r--r--content/browser/geolocation/wifi_data_provider_linux.cc4
-rw-r--r--content/browser/geolocation/wifi_data_provider_linux_unittest.cc5
-rw-r--r--content/browser/geolocation/wifi_data_provider_mac.cc7
-rw-r--r--content/browser/geolocation/wifi_data_provider_win.cc6
-rw-r--r--content/browser/indexed_db/indexed_db_backing_store_unittest.cc2
-rw-r--r--content/browser/indexed_db/indexed_db_browsertest.cc1
-rw-r--r--content/browser/indexed_db/indexed_db_database.cc1
-rw-r--r--content/browser/indexed_db/indexed_db_database_error.h2
-rw-r--r--content/browser/indexed_db/indexed_db_database_unittest.cc2
-rw-r--r--content/browser/indexed_db/indexed_db_factory.cc2
-rw-r--r--content/browser/indexed_db/indexed_db_factory_unittest.cc2
-rw-r--r--content/browser/indexed_db/indexed_db_index_writer.cc2
-rw-r--r--content/browser/indexed_db/indexed_db_leveldb_coding_unittest.cc1
-rw-r--r--content/browser/indexed_db/indexed_db_transaction.cc2
-rw-r--r--content/browser/indexed_db/indexed_db_transaction_unittest.cc2
-rw-r--r--content/browser/indexed_db/indexed_db_unittest.cc2
-rw-r--r--content/browser/loader/resource_dispatcher_host_browsertest.cc2
-rw-r--r--content/browser/media/encrypted_media_browsertest.cc4
-rw-r--r--content/browser/media/media_browsertest.cc8
-rw-r--r--content/browser/media/webrtc_aecdump_browsertest.cc2
-rw-r--r--content/browser/media/webrtc_browsertest.cc2
-rw-r--r--content/browser/media/webrtc_internals_browsertest.cc2
-rw-r--r--content/browser/plugin_browsertest.cc2
-rw-r--r--content/browser/plugin_data_remover_impl.cc2
-rw-r--r--content/browser/plugin_loader_posix_unittest.cc2
-rw-r--r--content/browser/plugin_service_impl.cc4
-rw-r--r--content/browser/power_save_blocker_win.cc2
-rw-r--r--content/browser/ppapi_plugin_process_host.cc2
-rw-r--r--content/browser/renderer_host/database_message_filter.cc2
-rw-r--r--content/browser/renderer_host/gtk_im_context_wrapper.cc2
-rw-r--r--content/browser/renderer_host/pepper/pepper_truetype_font_list_win.cc6
-rw-r--r--content/browser/renderer_host/render_view_host_impl.cc11
-rw-r--r--content/browser/renderer_host/render_view_host_unittest.cc2
-rw-r--r--content/browser/renderer_host/render_widget_host_view_android.cc2
-rw-r--r--content/browser/renderer_host/render_widget_host_view_aura_unittest.cc2
-rw-r--r--content/browser/renderer_host/render_widget_host_view_gtk.cc4
-rw-r--r--content/browser/renderer_host/render_widget_host_view_mac.mm2
-rw-r--r--content/browser/renderer_host/render_widget_host_view_mac_unittest.mm2
-rw-r--r--content/browser/safe_util_win.cc2
-rw-r--r--content/browser/service_worker/service_worker_dispatcher_host.cc6
-rw-r--r--content/browser/service_worker/service_worker_registration_status.cc4
-rw-r--r--content/browser/session_history_browsertest.cc2
-rw-r--r--content/browser/speech/google_one_shot_remote_engine_unittest.cc6
-rw-r--r--content/browser/speech/google_streaming_remote_engine.cc2
-rw-r--r--content/browser/speech/google_streaming_remote_engine_unittest.cc18
-rw-r--r--content/browser/speech/speech_recognition_browsertest.cc2
-rw-r--r--content/browser/utility_process_host_impl.cc2
-rw-r--r--content/browser/web_contents/web_contents_drag_win.cc4
-rw-r--r--content/browser/web_contents/web_contents_impl.cc2
-rw-r--r--content/browser/web_contents/web_contents_impl_unittest.cc12
-rw-r--r--content/browser/web_contents/web_contents_view_aura.cc9
-rw-r--r--content/browser/web_contents/web_contents_view_aura_browsertest.cc12
-rw-r--r--content/browser/web_contents/web_contents_view_gtk.cc2
-rw-r--r--content/browser/web_contents/web_drag_dest_gtk.cc12
-rw-r--r--content/browser/web_contents/web_drag_dest_mac_unittest.mm2
-rw-r--r--content/browser/web_contents/web_drag_source_gtk.cc6
-rw-r--r--content/browser/web_contents/web_drag_source_mac.mm4
-rw-r--r--content/browser/webui/web_ui_data_source_unittest.cc4
-rw-r--r--content/browser/webui/web_ui_impl.cc8
-rw-r--r--content/browser/webui/web_ui_message_handler_unittest.cc14
-rw-r--r--content/browser/worker_host/test/worker_browsertest.cc4
-rw-r--r--content/browser/worker_host/worker_process_host.cc2
102 files changed, 290 insertions, 242 deletions
diff --git a/content/browser/accessibility/accessibility_tree_formatter.cc b/content/browser/accessibility/accessibility_tree_formatter.cc
index af33a42..999476f 100644
--- a/content/browser/accessibility/accessibility_tree_formatter.cc
+++ b/content/browser/accessibility/accessibility_tree_formatter.cc
@@ -79,7 +79,7 @@ void AccessibilityTreeFormatter::RecursiveFormatAccessibilityTree(
const base::DictionaryValue& dict, base::string16* contents, int depth) {
base::string16 line =
ToString(dict, base::string16(depth * kIndentSpaces, ' '));
- if (line.find(ASCIIToUTF16(kSkipString)) != base::string16::npos)
+ if (line.find(base::ASCIIToUTF16(kSkipString)) != base::string16::npos)
return;
*contents += line;
@@ -105,7 +105,7 @@ base::string16 AccessibilityTreeFormatter::ToString(
int id_value;
node.GetInteger("id", &id_value);
return indent + base::IntToString16(id_value) +
- ASCIIToUTF16("\n");
+ base::ASCIIToUTF16("\n");
}
void AccessibilityTreeFormatter::Initialize() {}
@@ -152,7 +152,7 @@ bool AccessibilityTreeFormatter::MatchesFilters(
if (iter->type == Filter::ALLOW_EMPTY)
allow = true;
else if (iter->type == Filter::ALLOW)
- allow = (!MatchPattern(text, UTF8ToUTF16("*=''")));
+ allow = (!MatchPattern(text, base::UTF8ToUTF16("*=''")));
else
allow = false;
}
@@ -168,12 +168,12 @@ base::string16 AccessibilityTreeFormatter::FormatCoordinates(
value.GetInteger(y_name, &y);
std::string xy_str(base::StringPrintf("%s=(%d, %d)", name, x, y));
- return UTF8ToUTF16(xy_str);
+ return base::UTF8ToUTF16(xy_str);
}
void AccessibilityTreeFormatter::WriteAttribute(
bool include_by_default, const std::string& attr, base::string16* line) {
- WriteAttribute(include_by_default, UTF8ToUTF16(attr), line);
+ WriteAttribute(include_by_default, base::UTF8ToUTF16(attr), line);
}
void AccessibilityTreeFormatter::WriteAttribute(
@@ -183,7 +183,7 @@ void AccessibilityTreeFormatter::WriteAttribute(
if (!MatchesFilters(attr, include_by_default))
return;
if (!line->empty())
- *line += ASCIIToUTF16(" ");
+ *line += base::ASCIIToUTF16(" ");
*line += attr;
}
diff --git a/content/browser/accessibility/accessibility_tree_formatter_android.cc b/content/browser/accessibility/accessibility_tree_formatter_android.cc
index 8ec3ecf..33b5196 100644
--- a/content/browser/accessibility/accessibility_tree_formatter_android.cc
+++ b/content/browser/accessibility/accessibility_tree_formatter_android.cc
@@ -122,7 +122,7 @@ base::string16 AccessibilityTreeFormatter::ToString(
base::string16 class_value;
dict.GetString("class", &class_value);
- WriteAttribute(true, UTF16ToUTF8(class_value), &line);
+ WriteAttribute(true, base::UTF16ToUTF8(class_value), &line);
for (unsigned i = 0; i < arraysize(BOOL_ATTRIBUTES); i++) {
const char* attribute_name = BOOL_ATTRIBUTES[i];
@@ -151,7 +151,7 @@ base::string16 AccessibilityTreeFormatter::ToString(
&line);
}
- return indent + line + ASCIIToUTF16("\n");
+ return indent + line + base::ASCIIToUTF16("\n");
}
// static
diff --git a/content/browser/accessibility/accessibility_tree_formatter_gtk.cc b/content/browser/accessibility/accessibility_tree_formatter_gtk.cc
index c930e0d..3891182 100644
--- a/content/browser/accessibility/accessibility_tree_formatter_gtk.cc
+++ b/content/browser/accessibility/accessibility_tree_formatter_gtk.cc
@@ -74,7 +74,7 @@ base::string16 AccessibilityTreeFormatter::ToString(
base::StringPrintf("id=%d", id_value),
&line);
- return indent + line + ASCIIToUTF16("\n");
+ return indent + line + base::ASCIIToUTF16("\n");
}
void AccessibilityTreeFormatter::Initialize() {}
diff --git a/content/browser/accessibility/accessibility_tree_formatter_mac.mm b/content/browser/accessibility/accessibility_tree_formatter_mac.mm
index 021b5fd..230cd8d 100644
--- a/content/browser/accessibility/accessibility_tree_formatter_mac.mm
+++ b/content/browser/accessibility/accessibility_tree_formatter_mac.mm
@@ -171,7 +171,7 @@ base::string16 AccessibilityTreeFormatter::ToString(
nil];
string s_value;
dict.GetString(SysNSStringToUTF8(NSAccessibilityRoleAttribute), &s_value);
- WriteAttribute(true, UTF8ToUTF16(s_value), &line);
+ WriteAttribute(true, base::UTF8ToUTF16(s_value), &line);
string subroleAttribute = SysNSStringToUTF8(NSAccessibilitySubroleAttribute);
if (dict.GetString(subroleAttribute, &s_value)) {
@@ -218,7 +218,7 @@ base::string16 AccessibilityTreeFormatter::ToString(
&line);
}
- return indent + line + ASCIIToUTF16("\n");
+ return indent + line + base::ASCIIToUTF16("\n");
}
// static
diff --git a/content/browser/accessibility/accessibility_tree_formatter_win.cc b/content/browser/accessibility/accessibility_tree_formatter_win.cc
index c50b526..401f89b 100644
--- a/content/browser/accessibility/accessibility_tree_formatter_win.cc
+++ b/content/browser/accessibility/accessibility_tree_formatter_win.cc
@@ -90,7 +90,7 @@ void AccessibilityTreeFormatter::AddProperties(
for (std::vector<base::string16>::const_iterator it = state_strings.begin();
it != state_strings.end();
++it) {
- states->AppendString(UTF16ToUTF8(*it));
+ states->AppendString(base::UTF16ToUTF8(*it));
}
dict->Set("states", states);
@@ -99,7 +99,7 @@ void AccessibilityTreeFormatter::AddProperties(
for (std::vector<base::string16>::const_iterator it = ia2_attributes.begin();
it != ia2_attributes.end();
++it) {
- attributes->AppendString(UTF16ToUTF8(*it));
+ attributes->AppendString(base::UTF16ToUTF8(*it));
}
dict->Set("attributes", attributes);
@@ -206,7 +206,7 @@ base::string16 AccessibilityTreeFormatter::ToString(
base::string16 role_value;
dict.GetString("role", &role_value);
- WriteAttribute(true, UTF16ToUTF8(role_value), &line);
+ WriteAttribute(true, base::UTF16ToUTF8(role_value), &line);
base::string16 name_value;
dict.GetString("name", &name_value);
@@ -225,7 +225,7 @@ base::string16 AccessibilityTreeFormatter::ToString(
value->GetAsString(&string_value);
WriteAttribute(false,
StringPrintf(L"%ls='%ls'",
- UTF8ToUTF16(attribute_name).c_str(),
+ base::UTF8ToUTF16(attribute_name).c_str(),
string_value.c_str()),
&line);
break;
@@ -235,7 +235,8 @@ base::string16 AccessibilityTreeFormatter::ToString(
value->GetAsInteger(&int_value);
WriteAttribute(false,
base::StringPrintf(L"%ls=%d",
- UTF8ToUTF16(attribute_name).c_str(),
+ base::UTF8ToUTF16(
+ attribute_name).c_str(),
int_value),
&line);
break;
@@ -245,7 +246,8 @@ base::string16 AccessibilityTreeFormatter::ToString(
value->GetAsDouble(&double_value);
WriteAttribute(false,
base::StringPrintf(L"%ls=%.2f",
- UTF8ToUTF16(attribute_name).c_str(),
+ base::UTF8ToUTF16(
+ attribute_name).c_str(),
double_value),
&line);
break;
@@ -287,7 +289,7 @@ base::string16 AccessibilityTreeFormatter::ToString(
}
}
- return indent + line + ASCIIToUTF16("\n");
+ return indent + line + base::ASCIIToUTF16("\n");
}
// static
diff --git a/content/browser/accessibility/accessibility_ui.cc b/content/browser/accessibility/accessibility_ui.cc
index 5203af6..2937838 100644
--- a/content/browser/accessibility/accessibility_ui.cc
+++ b/content/browser/accessibility/accessibility_ui.cc
@@ -75,7 +75,7 @@ base::DictionaryValue* BuildTargetDescriptor(RenderViewHost* rvh) {
// TODO(nasko): Fix the following code to use a consistent set of data
// across the URL, title, and favicon.
url = web_contents->GetURL();
- title = UTF16ToUTF8(web_contents->GetTitle());
+ title = base::UTF16ToUTF8(web_contents->GetTitle());
NavigationController& controller = web_contents->GetController();
NavigationEntry* entry = controller.GetVisibleEntry();
if (entry != NULL && entry->GetURL().is_valid())
@@ -244,13 +244,14 @@ void AccessibilityUI::RequestAccessibilityTree(const base::ListValue* args) {
}
std::vector<AccessibilityTreeFormatter::Filter> filters;
filters.push_back(AccessibilityTreeFormatter::Filter(
- ASCIIToUTF16("*"),
+ base::ASCIIToUTF16("*"),
AccessibilityTreeFormatter::Filter::ALLOW));
formatter->SetFilters(filters);
formatter->FormatAccessibilityTree(&accessibility_contents_utf16);
result->Set("tree",
- new base::StringValue(UTF16ToUTF8(accessibility_contents_utf16)));
+ new base::StringValue(
+ base::UTF16ToUTF8(accessibility_contents_utf16)));
web_ui()->CallJavascriptFunction("accessibility.showTree", *(result.get()));
}
diff --git a/content/browser/accessibility/accessibility_win_browsertest.cc b/content/browser/accessibility/accessibility_win_browsertest.cc
index bb35348..b94e145 100644
--- a/content/browser/accessibility/accessibility_win_browsertest.cc
+++ b/content/browser/accessibility/accessibility_win_browsertest.cc
@@ -91,7 +91,7 @@ void RecursiveFindNodeInAccessibilityTree(IAccessible* node,
// on the bots, this is really helpful in figuring out why.
for (int i = 0; i < depth; i++)
printf(" ");
- printf("role=%d name=%s\n", V_I4(&role), WideToUTF8(name).c_str());
+ printf("role=%d name=%s\n", V_I4(&role), base::WideToUTF8(name).c_str());
if (expected_role == V_I4(&role) && expected_name == name) {
*found = true;
@@ -286,7 +286,8 @@ void AccessibleChecker::AppendExpectedChild(
}
void AccessibleChecker::CheckAccessible(IAccessible* accessible) {
- SCOPED_TRACE("while checking " + UTF16ToUTF8(RoleVariantToString(role_)));
+ SCOPED_TRACE("while checking " +
+ base::UTF16ToUTF8(RoleVariantToString(role_)));
CheckAccessibleName(accessible);
CheckAccessibleRole(accessible);
CheckIA2Role(accessible);
diff --git a/content/browser/accessibility/browser_accessibility.cc b/content/browser/accessibility/browser_accessibility.cc
index 8429664..1fa15e0 100644
--- a/content/browser/accessibility/browser_accessibility.cc
+++ b/content/browser/accessibility/browser_accessibility.cc
@@ -481,7 +481,7 @@ base::string16 BrowserAccessibility::GetString16Attribute(
std::string value_utf8;
if (!GetStringAttribute(attribute, &value_utf8))
return base::string16();
- return UTF8ToUTF16(value_utf8);
+ return base::UTF8ToUTF16(value_utf8);
}
bool BrowserAccessibility::GetString16Attribute(
@@ -490,7 +490,7 @@ bool BrowserAccessibility::GetString16Attribute(
std::string value_utf8;
if (!GetStringAttribute(attribute, &value_utf8))
return false;
- *value = UTF8ToUTF16(value_utf8);
+ *value = base::UTF8ToUTF16(value_utf8);
return true;
}
@@ -558,7 +558,7 @@ bool BrowserAccessibility::GetHtmlAttribute(
std::string value_utf8;
if (!GetHtmlAttribute(html_attr, &value_utf8))
return false;
- *value = UTF8ToUTF16(value_utf8);
+ *value = base::UTF8ToUTF16(value_utf8);
return true;
}
diff --git a/content/browser/accessibility/browser_accessibility_android.cc b/content/browser/accessibility/browser_accessibility_android.cc
index 444aee2..b070475 100644
--- a/content/browser/accessibility/browser_accessibility_android.cc
+++ b/content/browser/accessibility/browser_accessibility_android.cc
@@ -284,13 +284,13 @@ base::string16 BrowserAccessibilityAndroid::GetText() const {
case blink::WebAXRoleImageMapLink:
case blink::WebAXRoleLink:
if (!text.empty())
- text += ASCIIToUTF16(" ");
- text += ASCIIToUTF16("Link");
+ text += base::ASCIIToUTF16(" ");
+ text += base::ASCIIToUTF16("Link");
break;
case blink::WebAXRoleHeading:
// Only append "heading" if this node already has text.
if (!text.empty())
- text += ASCIIToUTF16(" Heading");
+ text += base::ASCIIToUTF16(" Heading");
break;
}
@@ -562,7 +562,7 @@ bool BrowserAccessibilityAndroid::HasOnlyStaticTextChildren() const {
bool BrowserAccessibilityAndroid::IsIframe() const {
base::string16 html_tag = GetString16Attribute(
AccessibilityNodeData::ATTR_HTML_TAG);
- return html_tag == ASCIIToUTF16("iframe");
+ return html_tag == base::ASCIIToUTF16("iframe");
}
void BrowserAccessibilityAndroid::PostInitialize() {
diff --git a/content/browser/accessibility/browser_accessibility_cocoa.mm b/content/browser/accessibility/browser_accessibility_cocoa.mm
index 9364dbb..6164f8a 100644
--- a/content/browser/accessibility/browser_accessibility_cocoa.mm
+++ b/content/browser/accessibility/browser_accessibility_cocoa.mm
@@ -1299,7 +1299,7 @@ NSDictionary* attributeToMethodNameMap = nil;
base::string16 parentRole;
browserAccessibility_->parent()->GetHtmlAttribute(
"role", &parentRole);
- const base::string16 treegridRole(ASCIIToUTF16("treegrid"));
+ const base::string16 treegridRole(base::ASCIIToUTF16("treegrid"));
if (parentRole == treegridRole) {
[ret addObjectsFromArray:[NSArray arrayWithObjects:
NSAccessibilityDisclosingAttribute,
diff --git a/content/browser/accessibility/browser_accessibility_win.cc b/content/browser/accessibility/browser_accessibility_win.cc
index f3520da..8b3098d 100644
--- a/content/browser/accessibility/browser_accessibility_win.cc
+++ b/content/browser/accessibility/browser_accessibility_win.cc
@@ -480,7 +480,7 @@ STDMETHODIMP BrowserAccessibilityWin::get_accName(VARIANT var_id, BSTR* name) {
if (name_str.empty())
return S_FALSE;
- *name = SysAllocString(UTF8ToUTF16(name_str).c_str());
+ *name = SysAllocString(base::UTF8ToUTF16(name_str).c_str());
DCHECK(*name);
return S_OK;
@@ -591,7 +591,7 @@ STDMETHODIMP BrowserAccessibilityWin::get_accValue(VARIANT var_id,
return S_OK;
}
- *value = SysAllocString(UTF8ToUTF16(target->value()).c_str());
+ *value = SysAllocString(base::UTF8ToUTF16(target->value()).c_str());
DCHECK(*value);
return S_OK;
}
@@ -905,7 +905,7 @@ STDMETHODIMP BrowserAccessibilityWin::get_appName(BSTR* app_name) {
DCHECK_EQ(2U, product_components.size());
if (product_components.size() != 2)
return E_FAIL;
- *app_name = SysAllocString(UTF8ToUTF16(product_components[0]).c_str());
+ *app_name = SysAllocString(base::UTF8ToUTF16(product_components[0]).c_str());
DCHECK(*app_name);
return *app_name ? S_OK : E_FAIL;
}
@@ -924,7 +924,8 @@ STDMETHODIMP BrowserAccessibilityWin::get_appVersion(BSTR* app_version) {
DCHECK_EQ(2U, product_components.size());
if (product_components.size() != 2)
return E_FAIL;
- *app_version = SysAllocString(UTF8ToUTF16(product_components[1]).c_str());
+ *app_version =
+ SysAllocString(base::UTF8ToUTF16(product_components[1]).c_str());
DCHECK(*app_version);
return *app_version ? S_OK : E_FAIL;
}
@@ -953,7 +954,7 @@ STDMETHODIMP BrowserAccessibilityWin::get_toolkitVersion(
return E_INVALIDARG;
std::string user_agent = GetContentClient()->GetUserAgent();
- *toolkit_version = SysAllocString(UTF8ToUTF16(user_agent).c_str());
+ *toolkit_version = SysAllocString(base::UTF8ToUTF16(user_agent).c_str());
DCHECK(*toolkit_version);
return *toolkit_version ? S_OK : E_FAIL;
}
@@ -2435,7 +2436,7 @@ STDMETHODIMP BrowserAccessibilityWin::get_nodeInfo(
*node_name = NULL;
*name_space_id = 0;
- *node_value = SysAllocString(UTF8ToUTF16(value()).c_str());
+ *node_value = SysAllocString(base::UTF8ToUTF16(value()).c_str());
*num_children = PlatformChildCount();
*unique_id = unique_id_win_;
@@ -2469,10 +2470,10 @@ STDMETHODIMP BrowserAccessibilityWin::get_attributes(
for (unsigned short i = 0; i < *num_attribs; ++i) {
attrib_names[i] = SysAllocString(
- UTF8ToUTF16(html_attributes()[i].first).c_str());
+ base::UTF8ToUTF16(html_attributes()[i].first).c_str());
name_space_id[i] = 0;
attrib_values[i] = SysAllocString(
- UTF8ToUTF16(html_attributes()[i].second).c_str());
+ base::UTF8ToUTF16(html_attributes()[i].second).c_str());
}
return S_OK;
}
@@ -2491,11 +2492,11 @@ STDMETHODIMP BrowserAccessibilityWin::get_attributesForNames(
for (unsigned short i = 0; i < num_attribs; ++i) {
name_space_id[i] = 0;
bool found = false;
- std::string name = UTF16ToUTF8((LPCWSTR)attrib_names[i]);
+ std::string name = base::UTF16ToUTF8((LPCWSTR)attrib_names[i]);
for (unsigned int j = 0; j < html_attributes().size(); ++j) {
if (html_attributes()[j].first == name) {
attrib_values[i] = SysAllocString(
- UTF8ToUTF16(html_attributes()[j].second).c_str());
+ base::UTF8ToUTF16(html_attributes()[j].second).c_str());
found = true;
break;
}
@@ -3081,7 +3082,7 @@ void BrowserAccessibilityWin::PostInitialize() {
for (unsigned int i = 0; i < PlatformChildCount(); ++i) {
BrowserAccessibility* child = PlatformGetChild(i);
if (child->role() == blink::WebAXRoleStaticText) {
- hypertext_ += UTF8ToUTF16(child->name());
+ hypertext_ += base::UTF8ToUTF16(child->name());
} else {
hyperlink_offset_to_index_[hypertext_.size()] = hyperlinks_.size();
hypertext_ += kEmbeddedCharacter;
@@ -3216,7 +3217,7 @@ void BrowserAccessibilityWin::StringAttributeToIA2(
const char* ia2_attr) {
base::string16 value;
if (GetString16Attribute(attribute, &value))
- ia2_attributes_.push_back(ASCIIToUTF16(ia2_attr) + L":" + value);
+ ia2_attributes_.push_back(base::ASCIIToUTF16(ia2_attr) + L":" + value);
}
void BrowserAccessibilityWin::BoolAttributeToIA2(
@@ -3224,7 +3225,7 @@ void BrowserAccessibilityWin::BoolAttributeToIA2(
const char* ia2_attr) {
bool value;
if (GetBoolAttribute(attribute, &value)) {
- ia2_attributes_.push_back((ASCIIToUTF16(ia2_attr) + L":") +
+ ia2_attributes_.push_back((base::ASCIIToUTF16(ia2_attr) + L":") +
(value ? L"true" : L"false"));
}
}
@@ -3234,27 +3235,27 @@ void BrowserAccessibilityWin::IntAttributeToIA2(
const char* ia2_attr) {
int value;
if (GetIntAttribute(attribute, &value)) {
- ia2_attributes_.push_back(ASCIIToUTF16(ia2_attr) + L":" +
+ ia2_attributes_.push_back(base::ASCIIToUTF16(ia2_attr) + L":" +
base::IntToString16(value));
}
}
base::string16 BrowserAccessibilityWin::GetValueText() {
float fval;
- base::string16 value = UTF8ToUTF16(this->value());
+ base::string16 value = base::UTF8ToUTF16(this->value());
if (value.empty() &&
GetFloatAttribute(AccessibilityNodeData::ATTR_VALUE_FOR_RANGE, &fval)) {
- value = UTF8ToUTF16(base::DoubleToString(fval));
+ value = base::UTF8ToUTF16(base::DoubleToString(fval));
}
return value;
}
base::string16 BrowserAccessibilityWin::TextForIAccessibleText() {
if (IsEditableText())
- return UTF8ToUTF16(value());
+ return base::UTF8ToUTF16(value());
return (blink_role() == blink::WebAXRoleStaticText) ?
- UTF8ToUTF16(name()) : hypertext_;
+ base::UTF8ToUTF16(name()) : hypertext_;
}
void BrowserAccessibilityWin::HandleSpecialTextOffset(
diff --git a/content/browser/accessibility/browser_accessibility_win_unittest.cc b/content/browser/accessibility/browser_accessibility_win_unittest.cc
index 408fb4df..53d0076 100644
--- a/content/browser/accessibility/browser_accessibility_win_unittest.cc
+++ b/content/browser/accessibility/browser_accessibility_win_unittest.cc
@@ -549,7 +549,7 @@ TEST_F(BrowserAccessibilityTest, TestComplexHypertext) {
const std::string embed = base::UTF16ToUTF8(
BrowserAccessibilityWin::kEmbeddedCharacter);
EXPECT_EQ(text1_name + embed + text2_name + embed,
- UTF16ToUTF8(base::string16(text)));
+ base::UTF16ToUTF8(base::string16(text)));
text.Reset();
long hyperlink_count;
diff --git a/content/browser/accessibility/dump_accessibility_tree_browsertest.cc b/content/browser/accessibility/dump_accessibility_tree_browsertest.cc
index 8cceea7..cfb0a27 100644
--- a/content/browser/accessibility/dump_accessibility_tree_browsertest.cc
+++ b/content/browser/accessibility/dump_accessibility_tree_browsertest.cc
@@ -88,9 +88,9 @@ class DumpAccessibilityTreeTest : public ContentBrowserTest {
}
void AddDefaultFilters(std::vector<Filter>* filters) {
- filters->push_back(Filter(ASCIIToUTF16("FOCUSABLE"), Filter::ALLOW));
- filters->push_back(Filter(ASCIIToUTF16("READONLY"), Filter::ALLOW));
- filters->push_back(Filter(ASCIIToUTF16("*=''"), Filter::DENY));
+ filters->push_back(Filter(base::ASCIIToUTF16("FOCUSABLE"), Filter::ALLOW));
+ filters->push_back(Filter(base::ASCIIToUTF16("READONLY"), Filter::ALLOW));
+ filters->push_back(Filter(base::ASCIIToUTF16("*=''"), Filter::DENY));
}
void ParseFilters(const std::string& test_html,
@@ -109,13 +109,15 @@ class DumpAccessibilityTreeTest : public ContentBrowserTest {
AccessibilityTreeFormatter::GetDenyString();
if (StartsWithASCII(line, allow_empty_str, true)) {
filters->push_back(
- Filter(UTF8ToUTF16(line.substr(allow_empty_str.size())),
+ Filter(base::UTF8ToUTF16(line.substr(allow_empty_str.size())),
Filter::ALLOW_EMPTY));
} else if (StartsWithASCII(line, allow_str, true)) {
- filters->push_back(Filter(UTF8ToUTF16(line.substr(allow_str.size())),
+ filters->push_back(Filter(base::UTF8ToUTF16(
+ line.substr(allow_str.size())),
Filter::ALLOW));
} else if (StartsWithASCII(line, deny_str, true)) {
- filters->push_back(Filter(UTF8ToUTF16(line.substr(deny_str.size())),
+ filters->push_back(Filter(base::UTF8ToUTF16(
+ line.substr(deny_str.size())),
Filter::DENY));
}
}
@@ -170,7 +172,7 @@ void DumpAccessibilityTreeTest::RunTest(
// Load the page.
base::string16 html_contents16;
- html_contents16 = UTF8ToUTF16(html_contents);
+ html_contents16 = base::UTF8ToUTF16(html_contents);
GURL url = GetTestUrl("accessibility",
html_file.BaseName().MaybeAsASCII().c_str());
AccessibilityNotificationWaiter waiter(
@@ -193,7 +195,7 @@ void DumpAccessibilityTreeTest::RunTest(
// Perform a diff (or write the initial baseline).
base::string16 actual_contents_utf16;
formatter.FormatAccessibilityTree(&actual_contents_utf16);
- std::string actual_contents = UTF16ToUTF8(actual_contents_utf16);
+ std::string actual_contents = base::UTF16ToUTF8(actual_contents_utf16);
std::vector<std::string> actual_lines, expected_lines;
Tokenize(actual_contents, "\n", &actual_lines);
Tokenize(expected_contents, "\n", &expected_lines);
diff --git a/content/browser/android/content_view_core_impl.cc b/content/browser/android/content_view_core_impl.cc
index fd808fe..c5a833d 100644
--- a/content/browser/android/content_view_core_impl.cc
+++ b/content/browser/android/content_view_core_impl.cc
@@ -427,7 +427,7 @@ void ContentViewCoreImpl::SetTitle(const base::string16& title) {
if (obj.is_null())
return;
ScopedJavaLocalRef<jstring> jtitle =
- ConvertUTF8ToJavaString(env, UTF16ToUTF8(title));
+ ConvertUTF8ToJavaString(env, base::UTF16ToUTF8(title));
Java_ContentViewCore_setTitle(env, obj.obj(), jtitle.obj());
}
diff --git a/content/browser/browser_plugin/browser_plugin_guest.cc b/content/browser/browser_plugin/browser_plugin_guest.cc
index f2ac061..065dcec 100644
--- a/content/browser/browser_plugin/browser_plugin_guest.cc
+++ b/content/browser/browser_plugin/browser_plugin_guest.cc
@@ -221,7 +221,7 @@ class BrowserPluginGuest::JavaScriptDialogRequest : public PermissionRequest {
virtual void Respond(bool should_allow,
const std::string& user_input) OVERRIDE {
- callback_.Run(should_allow, UTF8ToUTF16(user_input));
+ callback_.Run(should_allow, base::UTF8ToUTF16(user_input));
}
private:
@@ -829,7 +829,7 @@ void BrowserPluginGuest::WebContentsCreated(WebContents* source_contents,
static_cast<WebContentsImpl*>(new_contents);
BrowserPluginGuest* guest = new_contents_impl->GetBrowserPluginGuest();
guest->opener_ = AsWeakPtr();
- std::string guest_name = UTF16ToUTF8(frame_name);
+ std::string guest_name = base::UTF16ToUTF8(frame_name);
guest->name_ = guest_name;
// Take ownership of the new guest until it is attached to the embedder's DOM
// tree to avoid leaking a guest if this guest is destroyed before attaching
@@ -1078,7 +1078,7 @@ void BrowserPluginGuest::DidStopLoading(RenderViewHost* render_view_host) {
" window.event.preventDefault(); "
"});";
render_view_host->ExecuteJavascriptInWebFrame(base::string16(),
- ASCIIToUTF16(script));
+ base::ASCIIToUTF16(script));
}
}
@@ -1308,7 +1308,7 @@ void BrowserPluginGuest::OnImeSetComposition(
int selection_start,
int selection_end) {
Send(new ViewMsg_ImeSetComposition(routing_id(),
- UTF8ToUTF16(text), underlines,
+ base::UTF8ToUTF16(text), underlines,
selection_start, selection_end));
}
@@ -1317,7 +1317,7 @@ void BrowserPluginGuest::OnImeConfirmComposition(
const std::string& text,
bool keep_selection) {
Send(new ViewMsg_ImeConfirmComposition(routing_id(),
- UTF8ToUTF16(text),
+ base::UTF8ToUTF16(text),
gfx::Range::InvalidRange(),
keep_selection));
}
@@ -1715,10 +1715,10 @@ void BrowserPluginGuest::RunJavaScriptDialog(
base::DictionaryValue request_info;
request_info.Set(
browser_plugin::kDefaultPromptText,
- base::Value::CreateStringValue(UTF16ToUTF8(default_prompt_text)));
+ base::Value::CreateStringValue(base::UTF16ToUTF8(default_prompt_text)));
request_info.Set(
browser_plugin::kMessageText,
- base::Value::CreateStringValue(UTF16ToUTF8(message_text)));
+ base::Value::CreateStringValue(base::UTF16ToUTF8(message_text)));
request_info.Set(
browser_plugin::kMessageType,
base::Value::CreateStringValue(
diff --git a/content/browser/browser_plugin/browser_plugin_host_browsertest.cc b/content/browser/browser_plugin/browser_plugin_host_browsertest.cc
index 5096aef..90fdfe9 100644
--- a/content/browser/browser_plugin/browser_plugin_host_browsertest.cc
+++ b/content/browser/browser_plugin/browser_plugin_host_browsertest.cc
@@ -39,6 +39,7 @@
#include "net/test/spawned_test_server/spawned_test_server.h"
#include "third_party/WebKit/public/web/WebInputEvent.h"
+using base::ASCIIToUTF16;
using blink::WebInputEvent;
using blink::WebMouseEvent;
using content::BrowserPluginEmbedder;
@@ -953,7 +954,7 @@ IN_PROC_BROWSER_TEST_F(BrowserPluginHostTest, InputMethod) {
{
ExecuteSyncJSFunction(guest_rvh,
"document.getElementById('input1').focus();");
- base::string16 expected_title = UTF8ToUTF16("InputTest123");
+ base::string16 expected_title = base::UTF8ToUTF16("InputTest123");
content::TitleWatcher title_watcher(test_guest()->web_contents(),
expected_title);
embedder_rvh->Send(
@@ -967,7 +968,7 @@ IN_PROC_BROWSER_TEST_F(BrowserPluginHostTest, InputMethod) {
}
// A composition is committed via IME.
{
- base::string16 expected_title = UTF8ToUTF16("InputTest456");
+ base::string16 expected_title = base::UTF8ToUTF16("InputTest456");
content::TitleWatcher title_watcher(test_guest()->web_contents(),
expected_title);
embedder_rvh->Send(
@@ -984,7 +985,7 @@ IN_PROC_BROWSER_TEST_F(BrowserPluginHostTest, InputMethod) {
{
ExecuteSyncJSFunction(guest_rvh,
"document.getElementById('input1').value = '';");
- base::string16 composition = UTF8ToUTF16("InputTest789");
+ base::string16 composition = base::UTF8ToUTF16("InputTest789");
content::TitleWatcher title_watcher(test_guest()->web_contents(),
composition);
embedder_rvh->Send(
@@ -1005,7 +1006,7 @@ IN_PROC_BROWSER_TEST_F(BrowserPluginHostTest, InputMethod) {
guest_rvh, "document.getElementById('input1').value");
std::string result;
ASSERT_TRUE(value->GetAsString(&result));
- EXPECT_EQ(UTF16ToUTF8(composition), result);
+ EXPECT_EQ(base::UTF16ToUTF8(composition), result);
}
// Tests ExtendSelectionAndDelete message works in browser_plugin.
{
@@ -1016,7 +1017,7 @@ IN_PROC_BROWSER_TEST_F(BrowserPluginHostTest, InputMethod) {
"i.value = 'InputTestABC';"
"i.selectionStart=6;"
"i.selectionEnd=6;");
- base::string16 expected_value = UTF8ToUTF16("InputABC");
+ base::string16 expected_value = base::UTF8ToUTF16("InputABC");
content::TitleWatcher title_watcher(test_guest()->web_contents(),
expected_value);
// Delete 'Test' in 'InputTestABC', as the caret is after 'T':
@@ -1032,7 +1033,7 @@ IN_PROC_BROWSER_TEST_F(BrowserPluginHostTest, InputMethod) {
guest_rvh, "document.getElementById('input1').value");
std::string actual_value;
ASSERT_TRUE(value->GetAsString(&actual_value));
- EXPECT_EQ(UTF16ToUTF8(expected_value), actual_value);
+ EXPECT_EQ(base::UTF16ToUTF8(expected_value), actual_value);
}
}
diff --git a/content/browser/dom_storage/dom_storage_area_unittest.cc b/content/browser/dom_storage/dom_storage_area_unittest.cc
index 697f625..c4d290c 100644
--- a/content/browser/dom_storage/dom_storage_area_unittest.cc
+++ b/content/browser/dom_storage/dom_storage_area_unittest.cc
@@ -18,8 +18,9 @@
#include "content/common/dom_storage/dom_storage_types.h"
#include "testing/gtest/include/gtest/gtest.h"
-namespace content {
+using base::ASCIIToUTF16;
+namespace content {
class DOMStorageAreaTest : public testing::Test {
public:
diff --git a/content/browser/dom_storage/dom_storage_context_impl_unittest.cc b/content/browser/dom_storage/dom_storage_context_impl_unittest.cc
index ba8d8e9..7e33b73 100644
--- a/content/browser/dom_storage/dom_storage_context_impl_unittest.cc
+++ b/content/browser/dom_storage/dom_storage_context_impl_unittest.cc
@@ -20,6 +20,8 @@
#include "testing/gtest/include/gtest/gtest.h"
#include "webkit/browser/quota/mock_special_storage_policy.h"
+using base::ASCIIToUTF16;
+
namespace content {
class DOMStorageContextImplTest : public testing::Test {
diff --git a/content/browser/dom_storage/dom_storage_database_unittest.cc b/content/browser/dom_storage/dom_storage_database_unittest.cc
index f3ba0b6..76d5726 100644
--- a/content/browser/dom_storage/dom_storage_database_unittest.cc
+++ b/content/browser/dom_storage/dom_storage_database_unittest.cc
@@ -14,6 +14,8 @@
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/sqlite/sqlite3.h"
+using base::ASCIIToUTF16;
+
namespace content {
void CreateV1Table(sql::Connection* db) {
diff --git a/content/browser/dom_storage/session_storage_database.cc b/content/browser/dom_storage/session_storage_database.cc
index 7fa6d5e..8dc8b91 100644
--- a/content/browser/dom_storage/session_storage_database.cc
+++ b/content/browser/dom_storage/session_storage_database.cc
@@ -77,7 +77,7 @@ class SessionStorageDatabase::DBOperation {
session_storage_database_->db_.reset();
#if defined(OS_WIN)
leveldb::DestroyDB(
- WideToUTF8(session_storage_database_->file_path_.value()),
+ base::WideToUTF8(session_storage_database_->file_path_.value()),
leveldb::Options());
#else
leveldb::DestroyDB(session_storage_database_->file_path_.value(),
@@ -377,7 +377,7 @@ leveldb::Status SessionStorageDatabase::TryToOpen(leveldb::DB** db) {
options.max_open_files = 0; // Use minimum.
options.create_if_missing = true;
#if defined(OS_WIN)
- return leveldb::DB::Open(options, WideToUTF8(file_path_.value()), db);
+ return leveldb::DB::Open(options, base::WideToUTF8(file_path_.value()), db);
#elif defined(OS_POSIX)
return leveldb::DB::Open(options, file_path_.value(), db);
#endif
@@ -571,7 +571,8 @@ bool SessionStorageDatabase::ReadMap(const std::string& map_id,
break;
}
// Key is of the form "map-<mapid>-<key>".
- base::string16 key16 = UTF8ToUTF16(key.substr(map_start_key.length()));
+ base::string16 key16 =
+ base::UTF8ToUTF16(key.substr(map_start_key.length()));
if (only_keys) {
(*result)[key16] = base::NullableString16();
} else {
@@ -594,7 +595,7 @@ void SessionStorageDatabase::WriteValuesToMap(const std::string& map_id,
it != values.end();
++it) {
base::NullableString16 value = it->second;
- std::string key = MapKey(map_id, UTF16ToUTF8(it->first));
+ std::string key = MapKey(map_id, base::UTF16ToUTF8(it->first));
if (value.is_null()) {
batch->Delete(key);
} else {
@@ -656,7 +657,7 @@ bool SessionStorageDatabase::ClearMap(const std::string& map_id,
return false;
for (DOMStorageValuesMap::const_iterator it = values.begin();
it != values.end(); ++it)
- batch->Delete(MapKey(map_id, UTF16ToUTF8(it->first)));
+ batch->Delete(MapKey(map_id, base::UTF16ToUTF8(it->first)));
return true;
}
diff --git a/content/browser/dom_storage/session_storage_database_unittest.cc b/content/browser/dom_storage/session_storage_database_unittest.cc
index 2f86c3b..414fbe6 100644
--- a/content/browser/dom_storage/session_storage_database_unittest.cc
+++ b/content/browser/dom_storage/session_storage_database_unittest.cc
@@ -87,13 +87,13 @@ SessionStorageDatabaseTest::SessionStorageDatabaseTest()
kNamespace1("namespace1"),
kNamespace2("namespace2"),
kNamespaceClone("wascloned"),
- kKey1(ASCIIToUTF16("key1")),
- kKey2(ASCIIToUTF16("key2")),
- kKey3(ASCIIToUTF16("key3")),
- kValue1(ASCIIToUTF16("value1"), false),
- kValue2(ASCIIToUTF16("value2"), false),
- kValue3(ASCIIToUTF16("value3"), false),
- kValue4(ASCIIToUTF16("value4"), false) { }
+ kKey1(base::ASCIIToUTF16("key1")),
+ kKey2(base::ASCIIToUTF16("key2")),
+ kKey3(base::ASCIIToUTF16("key3")),
+ kValue1(base::ASCIIToUTF16("value1"), false),
+ kValue2(base::ASCIIToUTF16("value2"), false),
+ kValue3(base::ASCIIToUTF16("value3"), false),
+ kValue4(base::ASCIIToUTF16("value4"), false) { }
SessionStorageDatabaseTest::~SessionStorageDatabaseTest() { }
diff --git a/content/browser/download/download_item_impl.cc b/content/browser/download/download_item_impl.cc
index a9b27f5..380a219 100644
--- a/content/browser/download/download_item_impl.cc
+++ b/content/browser/download/download_item_impl.cc
@@ -165,7 +165,7 @@ DownloadItemImpl::DownloadItemImpl(
TARGET_DISPOSITION_PROMPT : TARGET_DISPOSITION_OVERWRITE),
url_chain_(info.url_chain),
referrer_url_(info.referrer_url),
- suggested_filename_(UTF16ToUTF8(info.save_info->suggested_name)),
+ suggested_filename_(base::UTF16ToUTF8(info.save_info->suggested_name)),
forced_file_path_(info.save_info->file_path),
transition_type_(info.transition_type),
has_user_gesture_(info.has_user_gesture),
diff --git a/content/browser/download/drag_download_util.cc b/content/browser/download/drag_download_util.cc
index 0850c3b..7a22662 100644
--- a/content/browser/download/drag_download_util.cc
+++ b/content/browser/download/drag_download_util.cc
@@ -49,7 +49,7 @@ bool ParseDownloadMetadata(const base::string16& metadata,
#if defined(OS_WIN)
*file_name = base::FilePath(file_name_str);
#else
- *file_name = base::FilePath(UTF16ToUTF8(file_name_str));
+ *file_name = base::FilePath(base::UTF16ToUTF8(file_name_str));
#endif
}
if (url)
@@ -70,7 +70,8 @@ FileStream* CreateFileStreamForDrop(base::FilePath* file_path,
new_file_path = *file_path;
} else {
#if defined(OS_WIN)
- base::string16 suffix = ASCIIToUTF16("-") + base::IntToString16(seq);
+ base::string16 suffix =
+ base::ASCIIToUTF16("-") + base::IntToString16(seq);
#else
std::string suffix = std::string("-") + base::IntToString(seq);
#endif
diff --git a/content/browser/download/save_package.cc b/content/browser/download/save_package.cc
index 5961e6b..33dd5d0 100644
--- a/content/browser/download/save_package.cc
+++ b/content/browser/download/save_package.cc
@@ -1299,7 +1299,7 @@ const base::FilePath::CharType* SavePackage::ExtensionForMimeType(
#if defined(OS_POSIX)
base::FilePath::StringType mime_type(contents_mime_type);
#elif defined(OS_WIN)
- base::FilePath::StringType mime_type(UTF8ToWide(contents_mime_type));
+ base::FilePath::StringType mime_type(base::UTF8ToWide(contents_mime_type));
#endif // OS_WIN
for (uint32 i = 0; i < ARRAYSIZE_UNSAFE(extensions); ++i) {
if (mime_type == extensions[i].mime_type)
diff --git a/content/browser/download/save_package_unittest.cc b/content/browser/download/save_package_unittest.cc
index 47fd1b4..b0e38c0 100644
--- a/content/browser/download/save_package_unittest.cc
+++ b/content/browser/download/save_package_unittest.cc
@@ -244,7 +244,7 @@ TEST_F(SavePackageTest, MAYBE_TestLongSafePureFilename) {
const base::FilePath::StringType ext(FPL_HTML_EXTENSION);
base::FilePath::StringType filename =
#if defined(OS_WIN)
- ASCIIToWide(long_file_name);
+ base::ASCIIToWide(long_file_name);
#else
long_file_name;
#endif
@@ -352,38 +352,38 @@ static const struct SuggestedSaveNameTestCase {
} kSuggestedSaveNames[] = {
// Title overrides the URL.
{ "http://foo.com",
- ASCIIToUTF16("A page title"),
+ base::ASCIIToUTF16("A page title"),
FPL("A page title") FPL_HTML_EXTENSION,
true
},
// Extension is preserved.
{ "http://foo.com",
- ASCIIToUTF16("A page title with.ext"),
+ base::ASCIIToUTF16("A page title with.ext"),
FPL("A page title with.ext"),
false
},
// If the title matches the URL, use the last component of the URL.
{ "http://foo.com/bar",
- ASCIIToUTF16("foo.com/bar"),
+ base::ASCIIToUTF16("foo.com/bar"),
FPL("bar"),
false
},
// If the title matches the URL, but there is no "filename" component,
// use the domain.
{ "http://foo.com",
- ASCIIToUTF16("foo.com"),
+ base::ASCIIToUTF16("foo.com"),
FPL("foo.com"),
false
},
// Make sure fuzzy matching works.
{ "http://foo.com/bar",
- ASCIIToUTF16("foo.com/bar"),
+ base::ASCIIToUTF16("foo.com/bar"),
FPL("bar"),
false
},
// A URL-like title that does not match the title is respected in full.
{ "http://foo.com",
- ASCIIToUTF16("http://www.foo.com/path/title.txt"),
+ base::ASCIIToUTF16("http://www.foo.com/path/title.txt"),
FPL("http www.foo.com path title.txt"),
false
},
diff --git a/content/browser/fileapi/file_system_dir_url_request_job_unittest.cc b/content/browser/fileapi/file_system_dir_url_request_job_unittest.cc
index 874e61b..dd7a536 100644
--- a/content/browser/fileapi/file_system_dir_url_request_job_unittest.cc
+++ b/content/browser/fileapi/file_system_dir_url_request_job_unittest.cc
@@ -180,7 +180,7 @@ class FileSystemDirURLRequestJobTest : public testing::Test {
base::Time date;
icu::UnicodeString date_ustr(match.group(5, status));
std::string date_str;
- UTF16ToUTF8(date_ustr.getBuffer(), date_ustr.length(), &date_str);
+ base::UTF16ToUTF8(date_ustr.getBuffer(), date_ustr.length(), &date_str);
EXPECT_TRUE(base::Time::FromString(date_str.c_str(), &date));
EXPECT_FALSE(date.is_null());
}
diff --git a/content/browser/frame_host/debug_urls.cc b/content/browser/frame_host/debug_urls.cc
index 7cb11e8..3322e51 100644
--- a/content/browser/frame_host/debug_urls.cc
+++ b/content/browser/frame_host/debug_urls.cc
@@ -24,7 +24,8 @@ void HandlePpapiFlashDebugURL(const GURL& url) {
bool crash = url == GURL(kChromeUIPpapiFlashCrashURL);
std::vector<PpapiPluginProcessHost*> hosts;
- PpapiPluginProcessHost::FindByName(UTF8ToUTF16(kFlashPluginName), &hosts);
+ PpapiPluginProcessHost::FindByName(
+ base::UTF8ToUTF16(kFlashPluginName), &hosts);
for (std::vector<PpapiPluginProcessHost*>::iterator iter = hosts.begin();
iter != hosts.end(); ++iter) {
if (crash)
diff --git a/content/browser/frame_host/navigation_controller_impl_unittest.cc b/content/browser/frame_host/navigation_controller_impl_unittest.cc
index 68f753a..e13573e 100644
--- a/content/browser/frame_host/navigation_controller_impl_unittest.cc
+++ b/content/browser/frame_host/navigation_controller_impl_unittest.cc
@@ -1125,7 +1125,7 @@ TEST_F(NavigationControllerTest, Reload) {
EXPECT_EQ(1U, navigation_entry_committed_counter_);
navigation_entry_committed_counter_ = 0;
ASSERT_TRUE(controller.GetVisibleEntry());
- controller.GetVisibleEntry()->SetTitle(ASCIIToUTF16("Title"));
+ controller.GetVisibleEntry()->SetTitle(base::ASCIIToUTF16("Title"));
controller.Reload(true);
EXPECT_EQ(0U, notifications.size());
@@ -1249,7 +1249,7 @@ TEST_F(NavigationControllerTest, ReloadOriginalRequestURL) {
EXPECT_EQ(final_url, controller.GetVisibleEntry()->GetURL());
// Reload using the original URL.
- controller.GetVisibleEntry()->SetTitle(ASCIIToUTF16("Title"));
+ controller.GetVisibleEntry()->SetTitle(base::ASCIIToUTF16("Title"));
controller.ReloadOriginalRequestURL(false);
EXPECT_EQ(0U, notifications.size());
@@ -2292,7 +2292,7 @@ TEST_F(NavigationControllerTest, RestoreNavigate) {
url, Referrer(), PAGE_TRANSITION_RELOAD, false, std::string(),
browser_context());
entry->SetPageID(0);
- entry->SetTitle(ASCIIToUTF16("Title"));
+ entry->SetTitle(base::ASCIIToUTF16("Title"));
entry->SetPageState(PageState::CreateFromEncodedData("state"));
const base::Time timestamp = base::Time::Now();
entry->SetTimestamp(timestamp);
@@ -2371,7 +2371,7 @@ TEST_F(NavigationControllerTest, RestoreNavigateAfterFailure) {
url, Referrer(), PAGE_TRANSITION_RELOAD, false, std::string(),
browser_context());
entry->SetPageID(0);
- entry->SetTitle(ASCIIToUTF16("Title"));
+ entry->SetTitle(base::ASCIIToUTF16("Title"));
entry->SetPageState(PageState::CreateFromEncodedData("state"));
entries.push_back(entry);
scoped_ptr<WebContentsImpl> our_contents(static_cast<WebContentsImpl*>(
@@ -2965,7 +2965,7 @@ TEST_F(NavigationControllerTest, CloneAndGoBack) {
NavigationControllerImpl& controller = controller_impl();
const GURL url1("http://foo1");
const GURL url2("http://foo2");
- const base::string16 title(ASCIIToUTF16("Title"));
+ const base::string16 title(base::ASCIIToUTF16("Title"));
NavigateAndCommit(url1);
controller.GetVisibleEntry()->SetTitle(title);
@@ -2990,7 +2990,7 @@ TEST_F(NavigationControllerTest, CloneAndReload) {
NavigationControllerImpl& controller = controller_impl();
const GURL url1("http://foo1");
const GURL url2("http://foo2");
- const base::string16 title(ASCIIToUTF16("Title"));
+ const base::string16 title(base::ASCIIToUTF16("Title"));
NavigateAndCommit(url1);
controller.GetVisibleEntry()->SetTitle(title);
diff --git a/content/browser/frame_host/navigation_entry_impl_unittest.cc b/content/browser/frame_host/navigation_entry_impl_unittest.cc
index 488106f..2c38da1 100644
--- a/content/browser/frame_host/navigation_entry_impl_unittest.cc
+++ b/content/browser/frame_host/navigation_entry_impl_unittest.cc
@@ -11,6 +11,8 @@
#include "content/public/common/ssl_status.h"
#include "testing/gtest/include/gtest/gtest.h"
+using base::ASCIIToUTF16;
+
namespace content {
class NavigationEntryTest : public testing::Test {
diff --git a/content/browser/frame_host/render_frame_host_manager_browsertest.cc b/content/browser/frame_host/render_frame_host_manager_browsertest.cc
index 0a00e9f..576e138 100644
--- a/content/browser/frame_host/render_frame_host_manager_browsertest.cc
+++ b/content/browser/frame_host/render_frame_host_manager_browsertest.cc
@@ -32,6 +32,8 @@
#include "net/base/net_util.h"
#include "net/test/spawned_test_server/spawned_test_server.h"
+using base::ASCIIToUTF16;
+
namespace content {
class RenderFrameHostManagerTest : public ContentBrowserTest {
diff --git a/content/browser/frame_host/render_frame_host_manager_unittest.cc b/content/browser/frame_host/render_frame_host_manager_unittest.cc
index 630262c..214c62d 100644
--- a/content/browser/frame_host/render_frame_host_manager_unittest.cc
+++ b/content/browser/frame_host/render_frame_host_manager_unittest.cc
@@ -260,7 +260,7 @@ TEST_F(RenderFrameHostManagerTest, FilterMessagesWhileSwappedOut) {
contents()->GetRenderManagerForTesting()->current_host());
// Send an update title message and make sure it works.
- const base::string16 ntp_title = ASCIIToUTF16("NTP Title");
+ const base::string16 ntp_title = base::ASCIIToUTF16("NTP Title");
blink::WebTextDirection direction = blink::WebTextDirectionLeftToRight;
EXPECT_TRUE(ntp_rvh->OnMessageReceived(
ViewHostMsg_UpdateTitle(rvh()->GetRoutingID(), 0, ntp_title, direction)));
@@ -288,7 +288,7 @@ TEST_F(RenderFrameHostManagerTest, FilterMessagesWhileSwappedOut) {
dest_rvh->SendNavigate(101, kDestUrl);
// The new RVH should be able to update its title.
- const base::string16 dest_title = ASCIIToUTF16("Google");
+ const base::string16 dest_title = base::ASCIIToUTF16("Google");
EXPECT_TRUE(dest_rvh->OnMessageReceived(
ViewHostMsg_UpdateTitle(rvh()->GetRoutingID(), 101, dest_title,
direction)));
@@ -308,7 +308,7 @@ TEST_F(RenderFrameHostManagerTest, FilterMessagesWhileSwappedOut) {
MockRenderProcessHost* ntp_process_host =
static_cast<MockRenderProcessHost*>(ntp_rvh->GetProcess());
ntp_process_host->sink().ClearMessages();
- const base::string16 msg = ASCIIToUTF16("Message");
+ const base::string16 msg = base::ASCIIToUTF16("Message");
bool result = false;
base::string16 unused;
ViewHostMsg_RunBeforeUnloadConfirm before_unload_msg(
diff --git a/content/browser/gamepad/gamepad_platform_data_fetcher_linux.cc b/content/browser/gamepad/gamepad_platform_data_fetcher_linux.cc
index d466dde..63733b2 100644
--- a/content/browser/gamepad/gamepad_platform_data_fetcher_linux.cc
+++ b/content/browser/gamepad/gamepad_platform_data_fetcher_linux.cc
@@ -187,7 +187,7 @@ void GamepadPlatformDataFetcherLinux::RefreshDevice(udev_device* dev) {
vendor_id,
product_id);
base::TruncateUTF8ToByteSize(id, WebGamepad::idLengthCap - 1, &id);
- base::string16 tmp16 = UTF8ToUTF16(id);
+ base::string16 tmp16 = base::UTF8ToUTF16(id);
memset(pad.id, 0, sizeof(pad.id));
tmp16.copy(pad.id, arraysize(pad.id) - 1);
diff --git a/content/browser/geolocation/network_location_provider.cc b/content/browser/geolocation/network_location_provider.cc
index efc68a7..2a9d7c8 100644
--- a/content/browser/geolocation/network_location_provider.cc
+++ b/content/browser/geolocation/network_location_provider.cc
@@ -77,7 +77,7 @@ bool NetworkLocationProvider::PositionCache::MakeKey(
key->clear();
const size_t kCharsPerMacAddress = 6 * 3 + 1; // e.g. "11:22:33:44:55:66|"
key->reserve(wifi_data.access_point_data.size() * kCharsPerMacAddress);
- const base::string16 separator(ASCIIToUTF16("|"));
+ const base::string16 separator(base::ASCIIToUTF16("|"));
for (WifiData::AccessPointDataSet::const_iterator iter =
wifi_data.access_point_data.begin();
iter != wifi_data.access_point_data.end();
diff --git a/content/browser/geolocation/network_location_provider_unittest.cc b/content/browser/geolocation/network_location_provider_unittest.cc
index f7c7320..4bd9348 100644
--- a/content/browser/geolocation/network_location_provider_unittest.cc
+++ b/content/browser/geolocation/network_location_provider_unittest.cc
@@ -162,11 +162,11 @@ class GeolocationNetworkProviderTest : public testing::Test {
for (int i = 0; i < ap_count; ++i) {
AccessPointData ap;
ap.mac_address =
- ASCIIToUTF16(base::StringPrintf("%02d-34-56-78-54-32", i));
+ base::ASCIIToUTF16(base::StringPrintf("%02d-34-56-78-54-32", i));
ap.radio_signal_strength = ap_count - i;
ap.channel = IndexToChannel(i);
ap.signal_to_noise = i + 42;
- ap.ssid = ASCIIToUTF16("Some nice+network|name\\");
+ ap.ssid = base::ASCIIToUTF16("Some nice+network|name\\");
data.access_point_data.insert(ap);
}
return data;
@@ -421,7 +421,7 @@ TEST_F(GeolocationNetworkProviderTest, MultipleWifiScansComplete) {
EXPECT_TRUE(position.Validate());
// Token should be in the store.
- EXPECT_EQ(UTF8ToUTF16(REFERENCE_ACCESS_TOKEN),
+ EXPECT_EQ(base::UTF8ToUTF16(REFERENCE_ACCESS_TOKEN),
access_token_store_->access_token_set_[test_server_url_]);
// Wifi updated again, with one less AP. This is 'close enough' to the
@@ -517,7 +517,7 @@ TEST_F(GeolocationNetworkProviderTest, NetworkRequestDeferredForPermission) {
TEST_F(GeolocationNetworkProviderTest,
NetworkRequestWithWifiDataDeferredForPermission) {
access_token_store_->access_token_set_[test_server_url_] =
- UTF8ToUTF16(REFERENCE_ACCESS_TOKEN);
+ base::UTF8ToUTF16(REFERENCE_ACCESS_TOKEN);
scoped_ptr<LocationProvider> provider(CreateProvider(false));
EXPECT_TRUE(provider->StartProvider(false));
net::TestURLFetcher* fetcher = get_url_fetcher_and_advance_id();
diff --git a/content/browser/geolocation/network_location_request.cc b/content/browser/geolocation/network_location_request.cc
index 3ed7092..8fb6e6a 100644
--- a/content/browser/geolocation/network_location_request.cc
+++ b/content/browser/geolocation/network_location_request.cc
@@ -262,7 +262,7 @@ void AddWifiData(const WifiData& wifi_data,
iter != access_points_by_signal_strength.end();
++iter) {
base::DictionaryValue* wifi_dict = new base::DictionaryValue();
- AddString("macAddress", UTF16ToUTF8((*iter)->mac_address), wifi_dict);
+ AddString("macAddress", base::UTF16ToUTF8((*iter)->mac_address), wifi_dict);
AddInteger("signalStrength", (*iter)->radio_signal_strength, wifi_dict);
AddInteger("age", age_milliseconds, wifi_dict);
AddInteger("channel", (*iter)->channel, wifi_dict);
diff --git a/content/browser/geolocation/wifi_data_provider_chromeos.cc b/content/browser/geolocation/wifi_data_provider_chromeos.cc
index a8b2041..49edb23 100644
--- a/content/browser/geolocation/wifi_data_provider_chromeos.cc
+++ b/content/browser/geolocation/wifi_data_provider_chromeos.cc
@@ -151,11 +151,11 @@ bool WifiDataProviderChromeOs::GetAccessPointData(
= access_points.begin();
i != access_points.end(); ++i) {
AccessPointData ap_data;
- ap_data.mac_address = ASCIIToUTF16(i->mac_address);
+ ap_data.mac_address = base::ASCIIToUTF16(i->mac_address);
ap_data.radio_signal_strength = i->signal_strength;
ap_data.channel = i->channel;
ap_data.signal_to_noise = i->signal_to_noise;
- ap_data.ssid = UTF8ToUTF16(i->ssid);
+ ap_data.ssid = base::UTF8ToUTF16(i->ssid);
result->insert(ap_data);
}
// If the age is significantly longer than our long polling time, assume the
diff --git a/content/browser/geolocation/wifi_data_provider_chromeos_unittest.cc b/content/browser/geolocation/wifi_data_provider_chromeos_unittest.cc
index f9deb66..f282f31 100644
--- a/content/browser/geolocation/wifi_data_provider_chromeos_unittest.cc
+++ b/content/browser/geolocation/wifi_data_provider_chromeos_unittest.cc
@@ -84,7 +84,8 @@ TEST_F(GeolocationChromeOsWifiDataProviderTest, GetOneAccessPoint) {
AddAccessPoints(1, 1);
EXPECT_TRUE(GetAccessPointData());
ASSERT_EQ(1u, ap_data_.size());
- EXPECT_EQ("00:00:03:04:05:06", UTF16ToUTF8(ap_data_.begin()->mac_address));
+ EXPECT_EQ("00:00:03:04:05:06",
+ base::UTF16ToUTF8(ap_data_.begin()->mac_address));
}
TEST_F(GeolocationChromeOsWifiDataProviderTest, GetManyAccessPoints) {
diff --git a/content/browser/geolocation/wifi_data_provider_common.cc b/content/browser/geolocation/wifi_data_provider_common.cc
index 9c2cbae..388a17e 100644
--- a/content/browser/geolocation/wifi_data_provider_common.cc
+++ b/content/browser/geolocation/wifi_data_provider_common.cc
@@ -15,13 +15,13 @@ base::string16 MacAddressAsString16(const uint8 mac_as_int[6]) {
// Format is XX-XX-XX-XX-XX-XX.
static const char* const kMacFormatString =
"%02x-%02x-%02x-%02x-%02x-%02x";
- return ASCIIToUTF16(base::StringPrintf(kMacFormatString,
- mac_as_int[0],
- mac_as_int[1],
- mac_as_int[2],
- mac_as_int[3],
- mac_as_int[4],
- mac_as_int[5]));
+ return base::ASCIIToUTF16(base::StringPrintf(kMacFormatString,
+ mac_as_int[0],
+ mac_as_int[1],
+ mac_as_int[2],
+ mac_as_int[3],
+ mac_as_int[4],
+ mac_as_int[5]));
}
WifiDataProviderCommon::WifiDataProviderCommon()
diff --git a/content/browser/geolocation/wifi_data_provider_common_unittest.cc b/content/browser/geolocation/wifi_data_provider_common_unittest.cc
index 61e236f..9c55dfd 100644
--- a/content/browser/geolocation/wifi_data_provider_common_unittest.cc
+++ b/content/browser/geolocation/wifi_data_provider_common_unittest.cc
@@ -173,7 +173,7 @@ TEST_F(GeolocationWifiDataProviderCommonTest, IntermittentWifi){
single_access_point.mac_address = 3;
single_access_point.radio_signal_strength = 4;
single_access_point.signal_to_noise = 5;
- single_access_point.ssid = ASCIIToUTF16("foossid");
+ single_access_point.ssid = base::ASCIIToUTF16("foossid");
wlan_api_->data_out_.insert(single_access_point);
provider_->StartDataProvider();
@@ -204,7 +204,7 @@ TEST_F(GeolocationWifiDataProviderCommonTest, DoScanWithResults) {
single_access_point.mac_address = 3;
single_access_point.radio_signal_strength = 4;
single_access_point.signal_to_noise = 5;
- single_access_point.ssid = ASCIIToUTF16("foossid");
+ single_access_point.ssid = base::ASCIIToUTF16("foossid");
wlan_api_->data_out_.insert(single_access_point);
provider_->StartDataProvider();
diff --git a/content/browser/geolocation/wifi_data_provider_common_win.cc b/content/browser/geolocation/wifi_data_provider_common_win.cc
index a0d334f..aac728d 100644
--- a/content/browser/geolocation/wifi_data_provider_common_win.cc
+++ b/content/browser/geolocation/wifi_data_provider_common_win.cc
@@ -19,9 +19,9 @@ bool ConvertToAccessPointData(const NDIS_WLAN_BSSID& data,
access_point_data->mac_address = MacAddressAsString16(data.MacAddress);
access_point_data->radio_signal_strength = data.Rssi;
// Note that _NDIS_802_11_SSID::Ssid::Ssid is not null-terminated.
- UTF8ToUTF16(reinterpret_cast<const char*>(data.Ssid.Ssid),
- data.Ssid.SsidLength,
- &access_point_data->ssid);
+ base::UTF8ToUTF16(reinterpret_cast<const char*>(data.Ssid.Ssid),
+ data.Ssid.SsidLength,
+ &access_point_data->ssid);
return true;
}
diff --git a/content/browser/geolocation/wifi_data_provider_linux.cc b/content/browser/geolocation/wifi_data_provider_linux.cc
index a8d2135..1e43658 100644
--- a/content/browser/geolocation/wifi_data_provider_linux.cc
+++ b/content/browser/geolocation/wifi_data_provider_linux.cc
@@ -254,7 +254,7 @@ bool NetworkManagerWlanApi::GetAccessPointsForAdapter(
continue;
}
std::string ssid(ssid_bytes, ssid_bytes + ssid_length);
- access_point_data.ssid = UTF8ToUTF16(ssid);
+ access_point_data.ssid = base::UTF8ToUTF16(ssid);
}
{ // Read the mac address
@@ -275,7 +275,7 @@ bool NetworkManagerWlanApi::GetAccessPointsForAdapter(
if (!base::HexStringToBytes(mac, &mac_bytes) || mac_bytes.size() != 6) {
LOG(WARNING) << "Can't parse mac address (found " << mac_bytes.size()
<< " bytes) so using raw string: " << mac;
- access_point_data.mac_address = UTF8ToUTF16(mac);
+ access_point_data.mac_address = base::UTF8ToUTF16(mac);
} else {
access_point_data.mac_address = MacAddressAsString16(&mac_bytes[0]);
}
diff --git a/content/browser/geolocation/wifi_data_provider_linux_unittest.cc b/content/browser/geolocation/wifi_data_provider_linux_unittest.cc
index 2e72470..498b230 100644
--- a/content/browser/geolocation/wifi_data_provider_linux_unittest.cc
+++ b/content/browser/geolocation/wifi_data_provider_linux_unittest.cc
@@ -222,8 +222,9 @@ TEST_F(GeolocationWifiDataProviderLinuxTest, GetAccessPointData) {
// Check the contents of the access point data.
// The expected values come from CreateAccessPointProxyResponse() above.
- EXPECT_EQ("test", UTF16ToUTF8(access_point_data.ssid));
- EXPECT_EQ("00-11-22-33-44-55", UTF16ToUTF8(access_point_data.mac_address));
+ EXPECT_EQ("test", base::UTF16ToUTF8(access_point_data.ssid));
+ EXPECT_EQ("00-11-22-33-44-55",
+ base::UTF16ToUTF8(access_point_data.mac_address));
EXPECT_EQ(-50, access_point_data.radio_signal_strength);
EXPECT_EQ(4, access_point_data.channel);
}
diff --git a/content/browser/geolocation/wifi_data_provider_mac.cc b/content/browser/geolocation/wifi_data_provider_mac.cc
index e7d8e82..6a87801 100644
--- a/content/browser/geolocation/wifi_data_provider_mac.cc
+++ b/content/browser/geolocation/wifi_data_provider_mac.cc
@@ -140,9 +140,10 @@ bool Apple80211Api::GetAccessPointData(WifiData::AccessPointDataSet* data) {
// WirelessNetworkInfo::noise appears to be noise floor in dBm.
access_point_data.signal_to_noise = access_point_info->signal -
access_point_info->noise;
- if (!UTF8ToUTF16(reinterpret_cast<const char*>(access_point_info->name),
- access_point_info->nameLen,
- &access_point_data.ssid)) {
+ if (!base::UTF8ToUTF16(reinterpret_cast<const char*>(
+ access_point_info->name),
+ access_point_info->nameLen,
+ &access_point_data.ssid)) {
access_point_data.ssid.clear();
}
data->insert(access_point_data);
diff --git a/content/browser/geolocation/wifi_data_provider_win.cc b/content/browser/geolocation/wifi_data_provider_win.cc
index ed69865..a4e6e74 100644
--- a/content/browser/geolocation/wifi_data_provider_win.cc
+++ b/content/browser/geolocation/wifi_data_provider_win.cc
@@ -520,9 +520,9 @@ bool GetNetworkData(const WLAN_BSS_ENTRY& bss_entry,
access_point_data->mac_address = MacAddressAsString16(bss_entry.dot11Bssid);
access_point_data->radio_signal_strength = bss_entry.lRssi;
// bss_entry.dot11Ssid.ucSSID is not null-terminated.
- UTF8ToUTF16(reinterpret_cast<const char*>(bss_entry.dot11Ssid.ucSSID),
- static_cast<ULONG>(bss_entry.dot11Ssid.uSSIDLength),
- &access_point_data->ssid);
+ base::UTF8ToUTF16(reinterpret_cast<const char*>(bss_entry.dot11Ssid.ucSSID),
+ static_cast<ULONG>(bss_entry.dot11Ssid.uSSIDLength),
+ &access_point_data->ssid);
// TODO(steveblock): Is it possible to get the following?
// access_point_data->signal_to_noise
// access_point_data->age
diff --git a/content/browser/indexed_db/indexed_db_backing_store_unittest.cc b/content/browser/indexed_db/indexed_db_backing_store_unittest.cc
index d3e8296..74247eb 100644
--- a/content/browser/indexed_db/indexed_db_backing_store_unittest.cc
+++ b/content/browser/indexed_db/indexed_db_backing_store_unittest.cc
@@ -11,6 +11,8 @@
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/WebKit/public/platform/WebIDBTypes.h"
+using base::ASCIIToUTF16;
+
namespace content {
namespace {
diff --git a/content/browser/indexed_db/indexed_db_browsertest.cc b/content/browser/indexed_db/indexed_db_browsertest.cc
index 40a3161..1e2325c 100644
--- a/content/browser/indexed_db/indexed_db_browsertest.cc
+++ b/content/browser/indexed_db/indexed_db_browsertest.cc
@@ -27,6 +27,7 @@
#include "webkit/browser/database/database_util.h"
#include "webkit/browser/quota/quota_manager.h"
+using base::ASCIIToUTF16;
using quota::QuotaManager;
using webkit_database::DatabaseUtil;
diff --git a/content/browser/indexed_db/indexed_db_database.cc b/content/browser/indexed_db/indexed_db_database.cc
index 31d4cc5..ba53e66 100644
--- a/content/browser/indexed_db/indexed_db_database.cc
+++ b/content/browser/indexed_db/indexed_db_database.cc
@@ -24,6 +24,7 @@
#include "content/public/browser/browser_thread.h"
#include "third_party/WebKit/public/platform/WebIDBDatabaseException.h"
+using base::ASCIIToUTF16;
using base::Int64ToString16;
using blink::WebIDBKeyTypeNumber;
diff --git a/content/browser/indexed_db/indexed_db_database_error.h b/content/browser/indexed_db/indexed_db_database_error.h
index 1a4f449..84fee94 100644
--- a/content/browser/indexed_db/indexed_db_database_error.h
+++ b/content/browser/indexed_db/indexed_db_database_error.h
@@ -16,7 +16,7 @@ class IndexedDBDatabaseError {
IndexedDBDatabaseError(uint16 code)
: code_(code) {}
IndexedDBDatabaseError(uint16 code, const char* message)
- : code_(code), message_(ASCIIToUTF16(message)) {}
+ : code_(code), message_(base::ASCIIToUTF16(message)) {}
IndexedDBDatabaseError(uint16 code, const base::string16& message)
: code_(code), message_(message) {}
~IndexedDBDatabaseError() {}
diff --git a/content/browser/indexed_db/indexed_db_database_unittest.cc b/content/browser/indexed_db/indexed_db_database_unittest.cc
index 73a7ec2..902e004 100644
--- a/content/browser/indexed_db/indexed_db_database_unittest.cc
+++ b/content/browser/indexed_db/indexed_db_database_unittest.cc
@@ -21,6 +21,8 @@
#include "content/browser/indexed_db/mock_indexed_db_database_callbacks.h"
#include "testing/gtest/include/gtest/gtest.h"
+using base::ASCIIToUTF16;
+
namespace content {
TEST(IndexedDBDatabaseTest, BackingStoreRetention) {
diff --git a/content/browser/indexed_db/indexed_db_factory.cc b/content/browser/indexed_db/indexed_db_factory.cc
index 4dce7b1..8cf5042 100644
--- a/content/browser/indexed_db/indexed_db_factory.cc
+++ b/content/browser/indexed_db/indexed_db_factory.cc
@@ -14,6 +14,8 @@
#include "third_party/WebKit/public/platform/WebIDBDatabaseException.h"
#include "webkit/common/database/database_identifier.h"
+using base::ASCIIToUTF16;
+
namespace content {
const int64 kBackingStoreGracePeriodMs = 2000;
diff --git a/content/browser/indexed_db/indexed_db_factory_unittest.cc b/content/browser/indexed_db/indexed_db_factory_unittest.cc
index c235139..a7c4fe7 100644
--- a/content/browser/indexed_db/indexed_db_factory_unittest.cc
+++ b/content/browser/indexed_db/indexed_db_factory_unittest.cc
@@ -18,6 +18,8 @@
#include "url/gurl.h"
#include "webkit/common/database/database_identifier.h"
+using base::ASCIIToUTF16;
+
namespace content {
class IndexedDBFactoryTest : public testing::Test {
diff --git a/content/browser/indexed_db/indexed_db_index_writer.cc b/content/browser/indexed_db/indexed_db_index_writer.cc
index 3e8dc3f..0ea24b6 100644
--- a/content/browser/indexed_db/indexed_db_index_writer.cc
+++ b/content/browser/indexed_db/indexed_db_index_writer.cc
@@ -13,6 +13,8 @@
#include "content/common/indexed_db/indexed_db_key_path.h"
#include "content/common/indexed_db/indexed_db_key_range.h"
+using base::ASCIIToUTF16;
+
namespace content {
IndexWriter::IndexWriter(
diff --git a/content/browser/indexed_db/indexed_db_leveldb_coding_unittest.cc b/content/browser/indexed_db/indexed_db_leveldb_coding_unittest.cc
index 44c4ab8..97128ec 100644
--- a/content/browser/indexed_db/indexed_db_leveldb_coding_unittest.cc
+++ b/content/browser/indexed_db/indexed_db_leveldb_coding_unittest.cc
@@ -15,6 +15,7 @@
#include "content/common/indexed_db/indexed_db_key_path.h"
#include "testing/gtest/include/gtest/gtest.h"
+using base::ASCIIToUTF16;
using base::StringPiece;
using blink::WebIDBKeyTypeDate;
using blink::WebIDBKeyTypeNumber;
diff --git a/content/browser/indexed_db/indexed_db_transaction.cc b/content/browser/indexed_db/indexed_db_transaction.cc
index 82e640f..0d8be37 100644
--- a/content/browser/indexed_db/indexed_db_transaction.cc
+++ b/content/browser/indexed_db/indexed_db_transaction.cc
@@ -328,7 +328,7 @@ void IndexedDBTransaction::ProcessTaskQueue() {
void IndexedDBTransaction::Timeout() {
Abort(IndexedDBDatabaseError(
blink::WebIDBDatabaseExceptionTimeoutError,
- ASCIIToUTF16("Transaction timed out due to inactivity.")));
+ base::ASCIIToUTF16("Transaction timed out due to inactivity.")));
}
void IndexedDBTransaction::CloseOpenCursors() {
diff --git a/content/browser/indexed_db/indexed_db_transaction_unittest.cc b/content/browser/indexed_db/indexed_db_transaction_unittest.cc
index 9aa68fa..d0228bc 100644
--- a/content/browser/indexed_db/indexed_db_transaction_unittest.cc
+++ b/content/browser/indexed_db/indexed_db_transaction_unittest.cc
@@ -21,7 +21,7 @@ class IndexedDBTransactionTest : public testing::Test {
IndexedDBTransactionTest() {
IndexedDBFactory* factory = NULL;
backing_store_ = new IndexedDBFakeBackingStore();
- db_ = IndexedDBDatabase::Create(ASCIIToUTF16("db"),
+ db_ = IndexedDBDatabase::Create(base::ASCIIToUTF16("db"),
backing_store_,
factory,
IndexedDBDatabase::Identifier());
diff --git a/content/browser/indexed_db/indexed_db_unittest.cc b/content/browser/indexed_db/indexed_db_unittest.cc
index 7c8f249..d0fe981 100644
--- a/content/browser/indexed_db/indexed_db_unittest.cc
+++ b/content/browser/indexed_db/indexed_db_unittest.cc
@@ -238,7 +238,7 @@ TEST_F(IndexedDBTest, ForceCloseOpenDatabasesOnCommitFailure) {
scoped_refptr<MockIndexedDBDatabaseCallbacks> db_callbacks(
new MockIndexedDBDatabaseCallbacks());
const int64 transaction_id = 1;
- factory->Open(ASCIIToUTF16("db"),
+ factory->Open(base::ASCIIToUTF16("db"),
IndexedDBDatabaseMetadata::DEFAULT_INT_VERSION,
transaction_id,
callbacks,
diff --git a/content/browser/loader/resource_dispatcher_host_browsertest.cc b/content/browser/loader/resource_dispatcher_host_browsertest.cc
index 011c975..23a0cca 100644
--- a/content/browser/loader/resource_dispatcher_host_browsertest.cc
+++ b/content/browser/loader/resource_dispatcher_host_browsertest.cc
@@ -27,6 +27,8 @@
#include "net/test/embedded_test_server/http_request.h"
#include "net/test/embedded_test_server/http_response.h"
+using base::ASCIIToUTF16;
+
namespace content {
class ResourceDispatcherHostBrowserTest : public ContentBrowserTest,
diff --git a/content/browser/media/encrypted_media_browsertest.cc b/content/browser/media/encrypted_media_browsertest.cc
index f4e5eaf..9c0dbac 100644
--- a/content/browser/media/encrypted_media_browsertest.cc
+++ b/content/browser/media/encrypted_media_browsertest.cc
@@ -116,8 +116,8 @@ class EncryptedMediaTest : public content::MediaBrowserTest,
// We want to fail quickly when a test fails because an error is encountered.
virtual void AddWaitForTitles(content::TitleWatcher* title_watcher) OVERRIDE {
MediaBrowserTest::AddWaitForTitles(title_watcher);
- title_watcher->AlsoWaitForTitle(ASCIIToUTF16(kEmeNotSupportedError));
- title_watcher->AlsoWaitForTitle(ASCIIToUTF16(kEmeKeyError));
+ title_watcher->AlsoWaitForTitle(base::ASCIIToUTF16(kEmeNotSupportedError));
+ title_watcher->AlsoWaitForTitle(base::ASCIIToUTF16(kEmeKeyError));
}
#if defined(OS_ANDROID)
diff --git a/content/browser/media/media_browsertest.cc b/content/browser/media/media_browsertest.cc
index 34546b0..c14c362 100644
--- a/content/browser/media/media_browsertest.cc
+++ b/content/browser/media/media_browsertest.cc
@@ -59,7 +59,7 @@ void MediaBrowserTest::RunMediaTestPage(
}
void MediaBrowserTest::RunTest(const GURL& gurl, const char* expected) {
- const base::string16 expected_title = ASCIIToUTF16(expected);
+ const base::string16 expected_title = base::ASCIIToUTF16(expected);
DVLOG(1) << "Running test URL: " << gurl;
TitleWatcher title_watcher(shell()->web_contents(), expected_title);
AddWaitForTitles(&title_watcher);
@@ -70,9 +70,9 @@ void MediaBrowserTest::RunTest(const GURL& gurl, const char* expected) {
}
void MediaBrowserTest::AddWaitForTitles(content::TitleWatcher* title_watcher) {
- title_watcher->AlsoWaitForTitle(ASCIIToUTF16(kEnded));
- title_watcher->AlsoWaitForTitle(ASCIIToUTF16(kError));
- title_watcher->AlsoWaitForTitle(ASCIIToUTF16(kFailed));
+ title_watcher->AlsoWaitForTitle(base::ASCIIToUTF16(kEnded));
+ title_watcher->AlsoWaitForTitle(base::ASCIIToUTF16(kError));
+ title_watcher->AlsoWaitForTitle(base::ASCIIToUTF16(kFailed));
}
// Tests playback and seeking of an audio or video file over file or http based
diff --git a/content/browser/media/webrtc_aecdump_browsertest.cc b/content/browser/media/webrtc_aecdump_browsertest.cc
index 5ba5a85..bda90c9 100644
--- a/content/browser/media/webrtc_aecdump_browsertest.cc
+++ b/content/browser/media/webrtc_aecdump_browsertest.cc
@@ -53,7 +53,7 @@ class WebrtcAecDumpBrowserTest : public ContentBrowserTest {
}
void ExpectTitle(const std::string& expected_title) const {
- base::string16 expected_title16(ASCIIToUTF16(expected_title));
+ base::string16 expected_title16(base::ASCIIToUTF16(expected_title));
TitleWatcher title_watcher(shell()->web_contents(), expected_title16);
EXPECT_EQ(expected_title16, title_watcher.WaitAndGetTitle());
}
diff --git a/content/browser/media/webrtc_browsertest.cc b/content/browser/media/webrtc_browsertest.cc
index 5e3666c..af7b087 100644
--- a/content/browser/media/webrtc_browsertest.cc
+++ b/content/browser/media/webrtc_browsertest.cc
@@ -224,7 +224,7 @@ class WebrtcBrowserTest: public ContentBrowserTest {
}
void ExpectTitle(const std::string& expected_title) const {
- base::string16 expected_title16(ASCIIToUTF16(expected_title));
+ base::string16 expected_title16(base::ASCIIToUTF16(expected_title));
TitleWatcher title_watcher(shell()->web_contents(), expected_title16);
EXPECT_EQ(expected_title16, title_watcher.WaitAndGetTitle());
}
diff --git a/content/browser/media/webrtc_internals_browsertest.cc b/content/browser/media/webrtc_internals_browsertest.cc
index 0d279b3..9750073 100644
--- a/content/browser/media/webrtc_internals_browsertest.cc
+++ b/content/browser/media/webrtc_internals_browsertest.cc
@@ -145,7 +145,7 @@ class MAYBE_WebRTCInternalsBrowserTest: public ContentBrowserTest {
}
void ExpectTitle(const std::string& expected_title) const {
- base::string16 expected_title16(ASCIIToUTF16(expected_title));
+ base::string16 expected_title16(base::ASCIIToUTF16(expected_title));
TitleWatcher title_watcher(shell()->web_contents(), expected_title16);
EXPECT_EQ(expected_title16, title_watcher.WaitAndGetTitle());
}
diff --git a/content/browser/plugin_browsertest.cc b/content/browser/plugin_browsertest.cc
index 204a143..9c37d50 100644
--- a/content/browser/plugin_browsertest.cc
+++ b/content/browser/plugin_browsertest.cc
@@ -33,6 +33,8 @@
#define MAYBE(x) x
#endif
+using base::ASCIIToUTF16;
+
namespace content {
namespace {
diff --git a/content/browser/plugin_data_remover_impl.cc b/content/browser/plugin_data_remover_impl.cc
index 79e291f..31d3e27 100644
--- a/content/browser/plugin_data_remover_impl.cc
+++ b/content/browser/plugin_data_remover_impl.cc
@@ -208,7 +208,7 @@ class PluginDataRemoverImpl::Context
// the browser).
#if defined(OS_WIN)
base::FilePath plugin_data_path =
- profile_path.Append(base::FilePath(UTF8ToUTF16(plugin_name_)));
+ profile_path.Append(base::FilePath(base::UTF8ToUTF16(plugin_name_)));
#else
base::FilePath plugin_data_path =
profile_path.Append(base::FilePath(plugin_name_));
diff --git a/content/browser/plugin_loader_posix_unittest.cc b/content/browser/plugin_loader_posix_unittest.cc
index 13620f7..4690768 100644
--- a/content/browser/plugin_loader_posix_unittest.cc
+++ b/content/browser/plugin_loader_posix_unittest.cc
@@ -14,6 +14,8 @@
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
+using base::ASCIIToUTF16;
+
namespace content {
class MockPluginLoaderPosix : public PluginLoaderPosix {
diff --git a/content/browser/plugin_service_impl.cc b/content/browser/plugin_service_impl.cc
index cb0a7b4..b65704b 100644
--- a/content/browser/plugin_service_impl.cc
+++ b/content/browser/plugin_service_impl.cc
@@ -292,7 +292,7 @@ PluginProcessHost* PluginServiceImpl::FindOrStartNpapiPluginProcess(
// Record when NPAPI Flash process is started for the first time.
static bool counted = false;
- if (!counted && UTF16ToUTF8(info.name) == kFlashPluginName) {
+ if (!counted && base::UTF16ToUTF8(info.name) == kFlashPluginName) {
counted = true;
UMA_HISTOGRAM_ENUMERATION("Plugin.FlashUsage",
START_NPAPI_FLASH_AT_LEAST_ONCE,
@@ -574,7 +574,7 @@ base::string16 PluginServiceImpl::GetPluginDisplayNameByPath(
// Many plugins on the Mac have .plugin in the actual name, which looks
// terrible, so look for that and strip it off if present.
const std::string kPluginExtension = ".plugin";
- if (EndsWith(plugin_name, ASCIIToUTF16(kPluginExtension), true))
+ if (EndsWith(plugin_name, base::ASCIIToUTF16(kPluginExtension), true))
plugin_name.erase(plugin_name.length() - kPluginExtension.length());
#endif // OS_MACOSX
}
diff --git a/content/browser/power_save_blocker_win.cc b/content/browser/power_save_blocker_win.cc
index cf9bb02..727600d 100644
--- a/content/browser/power_save_blocker_win.cc
+++ b/content/browser/power_save_blocker_win.cc
@@ -39,7 +39,7 @@ HANDLE CreatePowerRequest(POWER_REQUEST_TYPE type, const std::string& reason) {
if (!PowerCreateRequestFn || !PowerSetRequestFn)
return INVALID_HANDLE_VALUE;
}
- base::string16 wide_reason = ASCIIToUTF16(reason);
+ base::string16 wide_reason = base::ASCIIToUTF16(reason);
REASON_CONTEXT context = {0};
context.Version = POWER_REQUEST_CONTEXT_VERSION;
context.Flags = POWER_REQUEST_CONTEXT_SIMPLE_STRING;
diff --git a/content/browser/ppapi_plugin_process_host.cc b/content/browser/ppapi_plugin_process_host.cc
index 131b074..7e17d46 100644
--- a/content/browser/ppapi_plugin_process_host.cc
+++ b/content/browser/ppapi_plugin_process_host.cc
@@ -253,7 +253,7 @@ bool PpapiPluginProcessHost::Init(const PepperPluginInfo& info) {
if (info.name.empty()) {
process_->SetName(plugin_path_.BaseName().LossyDisplayName());
} else {
- process_->SetName(UTF8ToUTF16(info.name));
+ process_->SetName(base::UTF8ToUTF16(info.name));
}
std::string channel_id = process_->GetHost()->CreateChannel();
diff --git a/content/browser/renderer_host/database_message_filter.cc b/content/browser/renderer_host/database_message_filter.cc
index 55ea305..720cf20 100644
--- a/content/browser/renderer_host/database_message_filter.cc
+++ b/content/browser/renderer_host/database_message_filter.cc
@@ -186,7 +186,7 @@ void DatabaseMessageFilter::DatabaseDeleteFile(
// In order to delete a journal file in incognito mode, we only need to
// close the open handle to it that's stored in the database tracker.
if (db_tracker_->IsIncognitoProfile()) {
- const base::string16 wal_suffix(ASCIIToUTF16("-wal"));
+ const base::string16 wal_suffix(base::ASCIIToUTF16("-wal"));
base::string16 sqlite_suffix;
// WAL files can be deleted without having previously been opened.
diff --git a/content/browser/renderer_host/gtk_im_context_wrapper.cc b/content/browser/renderer_host/gtk_im_context_wrapper.cc
index d4b7789..3601b8d 100644
--- a/content/browser/renderer_host/gtk_im_context_wrapper.cc
+++ b/content/browser/renderer_host/gtk_im_context_wrapper.cc
@@ -623,7 +623,7 @@ void GtkIMContextWrapper::SendFakeCompositionKeyEvent(
void GtkIMContextWrapper::HandleCommitThunk(
GtkIMContext* context, gchar* text, GtkIMContextWrapper* self) {
- self->HandleCommit(UTF8ToUTF16(text));
+ self->HandleCommit(base::UTF8ToUTF16(text));
}
void GtkIMContextWrapper::HandlePreeditStartThunk(
diff --git a/content/browser/renderer_host/pepper/pepper_truetype_font_list_win.cc b/content/browser/renderer_host/pepper/pepper_truetype_font_list_win.cc
index 3530e1e..c52ee96 100644
--- a/content/browser/renderer_host/pepper/pepper_truetype_font_list_win.cc
+++ b/content/browser/renderer_host/pepper/pepper_truetype_font_list_win.cc
@@ -27,7 +27,7 @@ static int CALLBACK EnumFontFamiliesProc(ENUMLOGFONTEXW* logical_font,
const LOGFONTW& lf = logical_font->elfLogFont;
if (lf.lfFaceName[0] && lf.lfFaceName[0] != '@' &&
lf.lfOutPrecision == OUT_STROKE_PRECIS) { // Outline fonts only.
- std::string face_name(UTF16ToUTF8(lf.lfFaceName));
+ std::string face_name(base::UTF16ToUTF8(lf.lfFaceName));
font_families->push_back(face_name);
}
}
@@ -44,7 +44,7 @@ static int CALLBACK EnumFontsInFamilyProc(ENUMLOGFONTEXW* logical_font,
if (lf.lfFaceName[0] && lf.lfFaceName[0] != '@' &&
lf.lfOutPrecision == OUT_STROKE_PRECIS) { // Outline fonts only.
ppapi::proxy::SerializedTrueTypeFontDesc desc;
- desc.family = UTF16ToUTF8(lf.lfFaceName);
+ desc.family = base::UTF16ToUTF8(lf.lfFaceName);
if (lf.lfItalic)
desc.style = PP_TRUETYPEFONTSTYLE_ITALIC;
desc.weight = static_cast<PP_TrueTypeFontWeight_Dev>(lf.lfWeight);
@@ -73,7 +73,7 @@ void GetFontsInFamily_SlowBlocking(const std::string& family,
LOGFONTW logfont;
memset(&logfont, 0, sizeof(logfont));
logfont.lfCharSet = DEFAULT_CHARSET;
- base::string16 family16 = UTF8ToUTF16(family);
+ base::string16 family16 = base::UTF8ToUTF16(family);
memcpy(&logfont.lfFaceName, &family16[0], sizeof(logfont.lfFaceName));
base::win::ScopedCreateDC hdc(::CreateCompatibleDC(NULL));
::EnumFontFamiliesExW(hdc, &logfont, (FONTENUMPROCW)&EnumFontsInFamilyProc,
diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc
index 7577b59..a393053 100644
--- a/content/browser/renderer_host/render_view_host_impl.cc
+++ b/content/browser/renderer_host/render_view_host_impl.cc
@@ -899,15 +899,15 @@ void RenderViewHostImpl::DragTargetDragEnter(
// and request permissions to the specific file to cover both cases.
// We do not give it the permission to request all file:// URLs.
base::FilePath path =
- base::FilePath::FromUTF8Unsafe(UTF16ToUTF8(iter->path));
+ base::FilePath::FromUTF8Unsafe(base::UTF16ToUTF8(iter->path));
// Make sure we have the same display_name as the one we register.
if (iter->display_name.empty()) {
std::string name;
files.AddPath(path, &name);
- iter->display_name = UTF8ToUTF16(name);
+ iter->display_name = base::UTF8ToUTF16(name);
} else {
- files.AddPathWithName(path, UTF16ToUTF8(iter->display_name));
+ files.AddPathWithName(path, base::UTF16ToUTF8(iter->display_name));
}
policy->GrantRequestSpecificFileURL(renderer_id,
@@ -932,7 +932,7 @@ void RenderViewHostImpl::DragTargetDragEnter(
// Grant the permission iff the ID is valid.
policy->GrantReadFileSystem(renderer_id, filesystem_id);
}
- filtered_data.filesystem_id = UTF8ToUTF16(filesystem_id);
+ filtered_data.filesystem_id = base::UTF8ToUTF16(filesystem_id);
Send(new DragMsg_TargetDragEnter(GetRoutingID(), filtered_data, client_pt,
screen_pt, operations_allowed,
@@ -1771,7 +1771,8 @@ void RenderViewHostImpl::OnStartDragging(
for (std::vector<DropData::FileInfo>::const_iterator it =
drop_data.filenames.begin();
it != drop_data.filenames.end(); ++it) {
- base::FilePath path(base::FilePath::FromUTF8Unsafe(UTF16ToUTF8(it->path)));
+ base::FilePath path(
+ base::FilePath::FromUTF8Unsafe(base::UTF16ToUTF8(it->path)));
if (policy->CanReadFile(GetProcess()->GetID(), path))
filtered_data.filenames.push_back(*it);
}
diff --git a/content/browser/renderer_host/render_view_host_unittest.cc b/content/browser/renderer_host/render_view_host_unittest.cc
index 0b56d16..dd50a6c 100644
--- a/content/browser/renderer_host/render_view_host_unittest.cc
+++ b/content/browser/renderer_host/render_view_host_unittest.cc
@@ -200,7 +200,7 @@ TEST_F(RenderViewHostTest, DragEnteredFileURLsStillBlocked) {
GURL sensitive_file_url = net::FilePathToFileURL(sensitive_file_path);
dropped_data.url = highlighted_file_url;
dropped_data.filenames.push_back(DropData::FileInfo(
- UTF8ToUTF16(dragged_file_path.AsUTF8Unsafe()), base::string16()));
+ base::UTF8ToUTF16(dragged_file_path.AsUTF8Unsafe()), base::string16()));
rvh()->DragTargetDragEnter(dropped_data, client_point, screen_point,
blink::WebDragOperationNone, 0);
diff --git a/content/browser/renderer_host/render_widget_host_view_android.cc b/content/browser/renderer_host/render_widget_host_view_android.cc
index 21a5a5d..6a9a341 100644
--- a/content/browser/renderer_host/render_widget_host_view_android.cc
+++ b/content/browser/renderer_host/render_widget_host_view_android.cc
@@ -555,7 +555,7 @@ void RenderWidgetHostViewAndroid::SelectionChanged(const base::string16& text,
return;
}
- std::string utf8_selection = UTF16ToUTF8(text.substr(pos, n));
+ std::string utf8_selection = base::UTF16ToUTF8(text.substr(pos, n));
content_view_core_->OnSelectionChanged(utf8_selection);
}
diff --git a/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc b/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc
index 2198322..2dd76a1 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc
@@ -348,7 +348,7 @@ TEST_F(RenderWidgetHostViewAuraTest, SetCompositionText) {
view_->Show();
ui::CompositionText composition_text;
- composition_text.text = ASCIIToUTF16("|a|b");
+ composition_text.text = base::ASCIIToUTF16("|a|b");
// Focused segment
composition_text.underlines.push_back(
diff --git a/content/browser/renderer_host/render_widget_host_view_gtk.cc b/content/browser/renderer_host/render_widget_host_view_gtk.cc
index 7d74ac2..9e35123 100644
--- a/content/browser/renderer_host/render_widget_host_view_gtk.cc
+++ b/content/browser/renderer_host/render_widget_host_view_gtk.cc
@@ -945,7 +945,7 @@ void RenderWidgetHostViewGtk::SetTooltipText(
gtk_widget_set_has_tooltip(view_.get(), FALSE);
} else {
gtk_widget_set_tooltip_text(view_.get(),
- UTF16ToUTF8(clamped_tooltip).c_str());
+ base::UTF16ToUTF8(clamped_tooltip).c_str());
}
}
@@ -1416,7 +1416,7 @@ bool RenderWidgetHostViewGtk::RetrieveSurrounding(std::string* text,
DCHECK(offset <= selection_text_.length());
if (offset == selection_text_.length()) {
- *text = UTF16ToUTF8(selection_text_);
+ *text = base::UTF16ToUTF8(selection_text_);
*cursor_index = text->length();
return true;
}
diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/content/browser/renderer_host/render_widget_host_view_mac.mm
index 1ad50b3..11eea49 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac.mm
+++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
@@ -1070,7 +1070,7 @@ void RenderWidgetHostViewMac::SelectionChanged(const base::string16& text,
DCHECK(false) << "The text can not cover range.";
return;
}
- selected_text_ = UTF16ToUTF8(text.substr(pos, n));
+ selected_text_ = base::UTF16ToUTF8(text.substr(pos, n));
}
[cocoa_view_ setSelectedRange:range.ToNSRange()];
diff --git a/content/browser/renderer_host/render_widget_host_view_mac_unittest.mm b/content/browser/renderer_host/render_widget_host_view_mac_unittest.mm
index 2515496..92b41dd 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac_unittest.mm
+++ b/content/browser/renderer_host/render_widget_host_view_mac_unittest.mm
@@ -324,7 +324,7 @@ TEST_F(RenderWidgetHostViewMacTest, AcceleratorDestroy) {
}
TEST_F(RenderWidgetHostViewMacTest, GetFirstRectForCharacterRangeCaretCase) {
- const base::string16 kDummyString = UTF8ToUTF16("hogehoge");
+ const base::string16 kDummyString = base::UTF8ToUTF16("hogehoge");
const size_t kDummyOffset = 0;
gfx::Rect caret_rect(10, 11, 0, 10);
diff --git a/content/browser/safe_util_win.cc b/content/browser/safe_util_win.cc
index ac077f1..e5843fd 100644
--- a/content/browser/safe_util_win.cc
+++ b/content/browser/safe_util_win.cc
@@ -81,7 +81,7 @@ HRESULT AVScanFile(const base::FilePath& full_path,
// Note: SetSource looks like it needs to be called, even if empty.
// Docs say it is optional, but it appears not calling it at all sets
// a zone that is too restrictive.
- hr = attachment_services->SetSource(UTF8ToWide(source_url).c_str());
+ hr = attachment_services->SetSource(base::UTF8ToWide(source_url).c_str());
if (FAILED(hr))
return hr;
diff --git a/content/browser/service_worker/service_worker_dispatcher_host.cc b/content/browser/service_worker/service_worker_dispatcher_host.cc
index 76e7ff7..92fe5e7 100644
--- a/content/browser/service_worker/service_worker_dispatcher_host.cc
+++ b/content/browser/service_worker/service_worker_dispatcher_host.cc
@@ -91,7 +91,7 @@ void ServiceWorkerDispatcherHost::OnRegisterServiceWorker(
thread_id,
request_id,
WebServiceWorkerError::DisabledError,
- ASCIIToUTF16(kDisabledErrorMessage)));
+ base::ASCIIToUTF16(kDisabledErrorMessage)));
return;
}
@@ -103,7 +103,7 @@ void ServiceWorkerDispatcherHost::OnRegisterServiceWorker(
thread_id,
request_id,
WebServiceWorkerError::SecurityError,
- ASCIIToUTF16(kDomainMismatchErrorMessage)));
+ base::ASCIIToUTF16(kDomainMismatchErrorMessage)));
return;
}
@@ -128,7 +128,7 @@ void ServiceWorkerDispatcherHost::OnUnregisterServiceWorker(
thread_id,
request_id,
blink::WebServiceWorkerError::DisabledError,
- ASCIIToUTF16(kDisabledErrorMessage)));
+ base::ASCIIToUTF16(kDisabledErrorMessage)));
return;
}
diff --git a/content/browser/service_worker/service_worker_registration_status.cc b/content/browser/service_worker/service_worker_registration_status.cc
index 4556b5f..0ceeb8a 100644
--- a/content/browser/service_worker/service_worker_registration_status.cc
+++ b/content/browser/service_worker/service_worker_registration_status.cc
@@ -28,12 +28,12 @@ void GetServiceWorkerRegistrationStatusResponse(
case REGISTRATION_INSTALL_FAILED:
*error_type = WebServiceWorkerError::InstallError;
- *message = ASCIIToUTF16(kInstallFailedErrorMessage);
+ *message = base::ASCIIToUTF16(kInstallFailedErrorMessage);
return;
case REGISTRATION_ACTIVATE_FAILED:
*error_type = WebServiceWorkerError::ActivateError;
- *message = ASCIIToUTF16(kActivateFailedErrorMessage);
+ *message = base::ASCIIToUTF16(kActivateFailedErrorMessage);
return;
}
NOTREACHED();
diff --git a/content/browser/session_history_browsertest.cc b/content/browser/session_history_browsertest.cc
index bec8293..04d00da 100644
--- a/content/browser/session_history_browsertest.cc
+++ b/content/browser/session_history_browsertest.cc
@@ -99,7 +99,7 @@ class SessionHistoryTest : public ContentBrowserTest {
void NavigateAndCheckTitle(const char* filename,
const std::string& expected_title) {
- base::string16 expected_title16(ASCIIToUTF16(expected_title));
+ base::string16 expected_title16(base::ASCIIToUTF16(expected_title));
TitleWatcher title_watcher(shell()->web_contents(), expected_title16);
NavigateToURL(shell(), GetURL(filename));
ASSERT_EQ(expected_title16, title_watcher.WaitAndGetTitle());
diff --git a/content/browser/speech/google_one_shot_remote_engine_unittest.cc b/content/browser/speech/google_one_shot_remote_engine_unittest.cc
index f7c6561..a16329c 100644
--- a/content/browser/speech/google_one_shot_remote_engine_unittest.cc
+++ b/content/browser/speech/google_one_shot_remote_engine_unittest.cc
@@ -83,7 +83,7 @@ TEST_F(GoogleOneShotRemoteEngineTest, BasicTest) {
"[{\"utterance\":\"123456\",\"confidence\":0.9}]}");
EXPECT_EQ(error_, SPEECH_RECOGNITION_ERROR_NONE);
EXPECT_EQ(1U, result().hypotheses.size());
- EXPECT_EQ(ASCIIToUTF16("123456"), result().hypotheses[0].utterance);
+ EXPECT_EQ(base::ASCIIToUTF16("123456"), result().hypotheses[0].utterance);
EXPECT_EQ(0.9, result().hypotheses[0].confidence);
// Normal success case with multiple results.
@@ -93,9 +93,9 @@ TEST_F(GoogleOneShotRemoteEngineTest, BasicTest) {
"{\"utterance\":\"123456\",\"confidence\":0.5}]}");
EXPECT_EQ(error_, SPEECH_RECOGNITION_ERROR_NONE);
EXPECT_EQ(2u, result().hypotheses.size());
- EXPECT_EQ(ASCIIToUTF16("hello"), result().hypotheses[0].utterance);
+ EXPECT_EQ(base::ASCIIToUTF16("hello"), result().hypotheses[0].utterance);
EXPECT_EQ(0.9, result().hypotheses[0].confidence);
- EXPECT_EQ(ASCIIToUTF16("123456"), result().hypotheses[1].utterance);
+ EXPECT_EQ(base::ASCIIToUTF16("123456"), result().hypotheses[1].utterance);
EXPECT_EQ(0.5, result().hypotheses[1].confidence);
// Zero results.
diff --git a/content/browser/speech/google_streaming_remote_engine.cc b/content/browser/speech/google_streaming_remote_engine.cc
index b6b68d1..a8d034a 100644
--- a/content/browser/speech/google_streaming_remote_engine.cc
+++ b/content/browser/speech/google_streaming_remote_engine.cc
@@ -455,7 +455,7 @@ GoogleStreamingRemoteEngine::ProcessDownstreamResponse(
DCHECK(ws_alternative.has_transcript());
// TODO(hans): Perhaps the transcript should be required in the proto?
if (ws_alternative.has_transcript())
- hypothesis.utterance = UTF8ToUTF16(ws_alternative.transcript());
+ hypothesis.utterance = base::UTF8ToUTF16(ws_alternative.transcript());
result.hypotheses.push_back(hypothesis);
}
diff --git a/content/browser/speech/google_streaming_remote_engine_unittest.cc b/content/browser/speech/google_streaming_remote_engine_unittest.cc
index dd0ef89..c484670 100644
--- a/content/browser/speech/google_streaming_remote_engine_unittest.cc
+++ b/content/browser/speech/google_streaming_remote_engine_unittest.cc
@@ -112,9 +112,9 @@ TEST_F(GoogleStreamingRemoteEngineTest, SingleDefinitiveResult) {
SpeechRecognitionResult& result = results.back();
result.is_provisional = false;
result.hypotheses.push_back(
- SpeechRecognitionHypothesis(UTF8ToUTF16("hypothesis 1"), 0.1F));
+ SpeechRecognitionHypothesis(base::UTF8ToUTF16("hypothesis 1"), 0.1F));
result.hypotheses.push_back(
- SpeechRecognitionHypothesis(UTF8ToUTF16("hypothesis 2"), 0.2F));
+ SpeechRecognitionHypothesis(base::UTF8ToUTF16("hypothesis 2"), 0.2F));
ProvideMockResultDownstream(result);
ExpectResultsReceived(results);
@@ -142,8 +142,8 @@ TEST_F(GoogleStreamingRemoteEngineTest, SeveralStreamingResults) {
SpeechRecognitionResult& result = results.back();
result.is_provisional = (i % 2 == 0); // Alternate result types.
float confidence = result.is_provisional ? 0.0F : (i * 0.1F);
- result.hypotheses.push_back(
- SpeechRecognitionHypothesis(UTF8ToUTF16("hypothesis"), confidence));
+ result.hypotheses.push_back(SpeechRecognitionHypothesis(
+ base::UTF8ToUTF16("hypothesis"), confidence));
ProvideMockResultDownstream(result);
ExpectResultsReceived(results);
@@ -161,7 +161,7 @@ TEST_F(GoogleStreamingRemoteEngineTest, SeveralStreamingResults) {
SpeechRecognitionResult& result = results.back();
result.is_provisional = false;
result.hypotheses.push_back(
- SpeechRecognitionHypothesis(UTF8ToUTF16("The final result"), 1.0F));
+ SpeechRecognitionHypothesis(base::UTF8ToUTF16("The final result"), 1.0F));
ProvideMockResultDownstream(result);
ExpectResultsReceived(results);
ASSERT_TRUE(engine_under_test_->IsRecognitionPending());
@@ -188,7 +188,7 @@ TEST_F(GoogleStreamingRemoteEngineTest, NoFinalResultAfterAudioChunksEnded) {
results.push_back(SpeechRecognitionResult());
SpeechRecognitionResult& result = results.back();
result.hypotheses.push_back(
- SpeechRecognitionHypothesis(UTF8ToUTF16("hypothesis"), 1.0F));
+ SpeechRecognitionHypothesis(base::UTF8ToUTF16("hypothesis"), 1.0F));
ProvideMockResultDownstream(result);
ExpectResultsReceived(results);
ASSERT_TRUE(engine_under_test_->IsRecognitionPending());
@@ -228,7 +228,7 @@ TEST_F(GoogleStreamingRemoteEngineTest, NoMatchError) {
SpeechRecognitionResult& result = results.back();
result.is_provisional = true;
result.hypotheses.push_back(
- SpeechRecognitionHypothesis(UTF8ToUTF16("The final result"), 0.0F));
+ SpeechRecognitionHypothesis(base::UTF8ToUTF16("The final result"), 0.0F));
ProvideMockResultDownstream(result);
ExpectResultsReceived(results);
ASSERT_TRUE(engine_under_test_->IsRecognitionPending());
@@ -305,7 +305,7 @@ TEST_F(GoogleStreamingRemoteEngineTest, Stability) {
SpeechRecognitionResult& result = results.back();
result.is_provisional = true;
result.hypotheses.push_back(
- SpeechRecognitionHypothesis(UTF8ToUTF16("foo"), 0.5));
+ SpeechRecognitionHypothesis(base::UTF8ToUTF16("foo"), 0.5));
// Check that the protobuf generated the expected result.
ExpectResultsReceived(results);
@@ -425,7 +425,7 @@ void GoogleStreamingRemoteEngineTest::ProvideMockResultDownstream(
proto_result->add_alternative();
const SpeechRecognitionHypothesis& hypothesis = result.hypotheses[i];
proto_alternative->set_confidence(hypothesis.confidence);
- proto_alternative->set_transcript(UTF16ToUTF8(hypothesis.utterance));
+ proto_alternative->set_transcript(base::UTF16ToUTF8(hypothesis.utterance));
}
ProvideMockProtoResultDownstream(proto_event);
}
diff --git a/content/browser/speech/speech_recognition_browsertest.cc b/content/browser/speech/speech_recognition_browsertest.cc
index 82daf32..f97d222 100644
--- a/content/browser/speech/speech_recognition_browsertest.cc
+++ b/content/browser/speech/speech_recognition_browsertest.cc
@@ -172,7 +172,7 @@ class SpeechRecognitionBrowserTest :
SpeechRecognitionResult GetGoodSpeechResult() {
SpeechRecognitionResult result;
result.hypotheses.push_back(SpeechRecognitionHypothesis(
- UTF8ToUTF16("Pictures of the moon"), 1.0F));
+ base::UTF8ToUTF16("Pictures of the moon"), 1.0F));
return result;
}
diff --git a/content/browser/utility_process_host_impl.cc b/content/browser/utility_process_host_impl.cc
index ed53fe8..e2f45245 100644
--- a/content/browser/utility_process_host_impl.cc
+++ b/content/browser/utility_process_host_impl.cc
@@ -142,7 +142,7 @@ bool UtilityProcessHostImpl::StartProcess() {
// Name must be set or metrics_service will crash in any test which
// launches a UtilityProcessHost.
process_.reset(new BrowserChildProcessHostImpl(PROCESS_TYPE_UTILITY, this));
- process_->SetName(ASCIIToUTF16("utility process"));
+ process_->SetName(base::ASCIIToUTF16("utility process"));
std::string channel_id = process_->GetHost()->CreateChannel();
if (channel_id.empty())
diff --git a/content/browser/web_contents/web_contents_drag_win.cc b/content/browser/web_contents/web_contents_drag_win.cc
index ffc8713..d319190 100644
--- a/content/browser/web_contents/web_contents_drag_win.cc
+++ b/content/browser/web_contents/web_contents_drag_win.cc
@@ -243,8 +243,8 @@ void WebContentsDragWin::PrepareDragForDownload(
net::GenerateFileName(download_url,
std::string(),
std::string(),
- UTF16ToUTF8(file_name.value()),
- UTF16ToUTF8(mime_type),
+ base::UTF16ToUTF8(file_name.value()),
+ base::UTF16ToUTF8(mime_type),
default_name);
base::FilePath temp_dir_path;
if (!base::CreateNewTempDirectory(FILE_PATH_LITERAL("chrome_drag"),
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 8e34582..9cd08f8 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -2709,7 +2709,7 @@ bool WebContentsImpl::UpdateTitleForEntry(NavigationEntryImpl* entry,
base::string16 final_title;
bool explicit_set;
if (entry && entry->GetURL().SchemeIsFile() && title.empty()) {
- final_title = UTF8ToUTF16(entry->GetURL().ExtractFileName());
+ final_title = base::UTF8ToUTF16(entry->GetURL().ExtractFileName());
explicit_set = false; // Don't count synthetic titles toward the set limit.
} else {
TrimWhitespace(title, TRIM_ALL, &final_title);
diff --git a/content/browser/web_contents/web_contents_impl_unittest.cc b/content/browser/web_contents/web_contents_impl_unittest.cc
index c9654e2..a44ff44 100644
--- a/content/browser/web_contents/web_contents_impl_unittest.cc
+++ b/content/browser/web_contents/web_contents_impl_unittest.cc
@@ -304,9 +304,10 @@ TEST_F(WebContentsImplTest, UpdateTitle) {
LoadCommittedDetails details;
cont.RendererDidNavigate(params, &details);
- contents()->UpdateTitle(rvh(), 0, ASCIIToUTF16(" Lots O' Whitespace\n"),
+ contents()->UpdateTitle(rvh(), 0,
+ base::ASCIIToUTF16(" Lots O' Whitespace\n"),
base::i18n::LEFT_TO_RIGHT);
- EXPECT_EQ(ASCIIToUTF16("Lots O' Whitespace"), contents()->GetTitle());
+ EXPECT_EQ(base::ASCIIToUTF16("Lots O' Whitespace"), contents()->GetTitle());
}
TEST_F(WebContentsImplTest, DontUseTitleFromPendingEntry) {
@@ -318,7 +319,7 @@ TEST_F(WebContentsImplTest, DontUseTitleFromPendingEntry) {
TEST_F(WebContentsImplTest, UseTitleFromPendingEntryIfSet) {
const GURL kGURL("chrome://blah");
- const base::string16 title = ASCIIToUTF16("My Title");
+ const base::string16 title = base::ASCIIToUTF16("My Title");
controller().LoadURL(
kGURL, Referrer(), PAGE_TRANSITION_TYPED, std::string());
@@ -350,7 +351,7 @@ TEST_F(WebContentsImplTest, NTPViewSource) {
LoadCommittedDetails details;
cont.RendererDidNavigate(params, &details);
// Also check title and url.
- EXPECT_EQ(ASCIIToUTF16(kUrl), contents()->GetTitle());
+ EXPECT_EQ(base::ASCIIToUTF16(kUrl), contents()->GetTitle());
}
// Test to ensure UpdateMaxPageID is working properly.
@@ -2037,7 +2038,8 @@ TEST_F(WebContentsImplTest, NoJSMessageOnInterstitials) {
IPC::Message* dummy_message = new IPC::Message;
bool did_suppress_message = false;
contents()->RunJavaScriptMessage(contents()->GetRenderViewHost(),
- ASCIIToUTF16("This is an informative message"), ASCIIToUTF16("OK"),
+ base::ASCIIToUTF16("This is an informative message"),
+ base::ASCIIToUTF16("OK"),
kGURL, JAVASCRIPT_MESSAGE_TYPE_ALERT, dummy_message,
&did_suppress_message);
EXPECT_TRUE(did_suppress_message);
diff --git a/content/browser/web_contents/web_contents_view_aura.cc b/content/browser/web_contents/web_contents_view_aura.cc
index 685f5b1..e4ef8c0 100644
--- a/content/browser/web_contents/web_contents_view_aura.cc
+++ b/content/browser/web_contents/web_contents_view_aura.cc
@@ -281,8 +281,9 @@ void PrepareDragData(const DropData& drop_data,
it != drop_data.filenames.end(); ++it) {
filenames.push_back(
ui::OSExchangeData::FileInfo(
- base::FilePath::FromUTF8Unsafe(UTF16ToUTF8(it->path)),
- base::FilePath::FromUTF8Unsafe(UTF16ToUTF8(it->display_name))));
+ base::FilePath::FromUTF8Unsafe(base::UTF16ToUTF8(it->path)),
+ base::FilePath::FromUTF8Unsafe(
+ base::UTF16ToUTF8(it->display_name))));
}
provider->SetFilenames(filenames);
}
@@ -323,8 +324,8 @@ void PrepareDropData(DropData* drop_data, const ui::OSExchangeData& data) {
it = files.begin(); it != files.end(); ++it) {
drop_data->filenames.push_back(
DropData::FileInfo(
- UTF8ToUTF16(it->path.AsUTF8Unsafe()),
- UTF8ToUTF16(it->display_name.AsUTF8Unsafe())));
+ base::UTF8ToUTF16(it->path.AsUTF8Unsafe()),
+ base::UTF8ToUTF16(it->display_name.AsUTF8Unsafe())));
}
}
diff --git a/content/browser/web_contents/web_contents_view_aura_browsertest.cc b/content/browser/web_contents/web_contents_view_aura_browsertest.cc
index 687ce57..eb3bdae 100644
--- a/content/browser/web_contents/web_contents_view_aura_browsertest.cc
+++ b/content/browser/web_contents/web_contents_view_aura_browsertest.cc
@@ -196,7 +196,7 @@ class WebContentsViewAuraTest : public ContentBrowserTest {
{
// Do a swipe-right now. That should navigate backwards.
- base::string16 expected_title = ASCIIToUTF16("Title: #1");
+ base::string16 expected_title = base::ASCIIToUTF16("Title: #1");
content::TitleWatcher title_watcher(web_contents, expected_title);
generator.GestureScrollSequence(
gfx::Point(bounds.x() + 2, bounds.y() + 10),
@@ -214,7 +214,7 @@ class WebContentsViewAuraTest : public ContentBrowserTest {
{
// Do a fling-right now. That should navigate backwards.
- base::string16 expected_title = ASCIIToUTF16("Title:");
+ base::string16 expected_title = base::ASCIIToUTF16("Title:");
content::TitleWatcher title_watcher(web_contents, expected_title);
generator.GestureScrollSequence(
gfx::Point(bounds.x() + 2, bounds.y() + 10),
@@ -232,7 +232,7 @@ class WebContentsViewAuraTest : public ContentBrowserTest {
{
// Do a swipe-left now. That should navigate forward.
- base::string16 expected_title = ASCIIToUTF16("Title: #1");
+ base::string16 expected_title = base::ASCIIToUTF16("Title: #1");
content::TitleWatcher title_watcher(web_contents, expected_title);
generator.GestureScrollSequence(
gfx::Point(bounds.right() - 10, bounds.y() + 10),
@@ -438,7 +438,7 @@ IN_PROC_BROWSER_TEST_F(WebContentsViewAuraTest, OverscrollScreenshot) {
{
// Now, swipe right to navigate backwards. This should navigate away from
// index 3 to index 2, and index 3 should have a screenshot.
- base::string16 expected_title = ASCIIToUTF16("Title: #2");
+ base::string16 expected_title = base::ASCIIToUTF16("Title: #2");
content::TitleWatcher title_watcher(web_contents, expected_title);
aura::Window* content = web_contents->GetView()->GetContentNativeView();
gfx::Rect bounds = content->GetBoundsInRootWindow();
@@ -469,7 +469,7 @@ IN_PROC_BROWSER_TEST_F(WebContentsViewAuraTest, OverscrollScreenshot) {
{
// Navigate back in history.
- base::string16 expected_title = ASCIIToUTF16("Title: #3");
+ base::string16 expected_title = base::ASCIIToUTF16("Title: #3");
content::TitleWatcher title_watcher(web_contents, expected_title);
web_contents->GetController().GoBack();
base::string16 actual_title = title_watcher.WaitAndGetTitle();
@@ -641,7 +641,7 @@ IN_PROC_BROWSER_TEST_F(WebContentsViewAuraTest,
// Do a swipe left to start a forward navigation. Then quickly do a swipe
// right.
- base::string16 expected_title = ASCIIToUTF16("Title: #2");
+ base::string16 expected_title = base::ASCIIToUTF16("Title: #2");
content::TitleWatcher title_watcher(web_contents, expected_title);
NavigationWatcher nav_watcher(web_contents);
diff --git a/content/browser/web_contents/web_contents_view_gtk.cc b/content/browser/web_contents/web_contents_view_gtk.cc
index bf4dcb7f..516ada0 100644
--- a/content/browser/web_contents/web_contents_view_gtk.cc
+++ b/content/browser/web_contents/web_contents_view_gtk.cc
@@ -253,7 +253,7 @@ void WebContentsViewGtk::SetPageTitle(const base::string16& title) {
if (content_view) {
GdkWindow* content_window = gtk_widget_get_window(content_view);
if (content_window) {
- gdk_window_set_title(content_window, UTF16ToUTF8(title).c_str());
+ gdk_window_set_title(content_window, base::UTF16ToUTF8(title).c_str());
}
}
}
diff --git a/content/browser/web_contents/web_drag_dest_gtk.cc b/content/browser/web_contents/web_drag_dest_gtk.cc
index 738d6b5..52284a4 100644
--- a/content/browser/web_contents/web_drag_dest_gtk.cc
+++ b/content/browser/web_contents/web_drag_dest_gtk.cc
@@ -186,7 +186,7 @@ void WebDragDestGtk::OnDragDataReceived(
guchar* text = gtk_selection_data_get_text(data);
if (text) {
drop_data_->text = base::NullableString16(
- UTF8ToUTF16(std::string(reinterpret_cast<const char*>(text))),
+ base::UTF8ToUTF16(std::string(reinterpret_cast<const char*>(text))),
false);
g_free(text);
}
@@ -204,7 +204,7 @@ void WebDragDestGtk::OnDragDataReceived(
if (url.SchemeIs(chrome::kFileScheme) &&
net::FileURLToFilePath(url, &file_path)) {
drop_data_->filenames.push_back(
- DropData::FileInfo(UTF8ToUTF16(file_path.value()),
+ DropData::FileInfo(base::UTF8ToUTF16(file_path.value()),
base::string16()));
// This is a hack. Some file managers also populate text/plain with
// a file URL when dragging files, so we clear it to avoid exposing
@@ -220,7 +220,7 @@ void WebDragDestGtk::OnDragDataReceived(
} else if (target == ui::GetAtomForTarget(ui::TEXT_HTML)) {
// TODO(estade): Can the html have a non-UTF8 encoding?
drop_data_->html = base::NullableString16(
- UTF8ToUTF16(std::string(reinterpret_cast<const char*>(raw_data),
+ base::UTF8ToUTF16(std::string(reinterpret_cast<const char*>(raw_data),
data_length)),
false);
// We leave the base URL empty.
@@ -230,8 +230,10 @@ void WebDragDestGtk::OnDragDataReceived(
size_t split = netscape_url.find_first_of('\n');
if (split != std::string::npos) {
drop_data_->url = GURL(netscape_url.substr(0, split));
- if (split < netscape_url.size() - 1)
- drop_data_->url_title = UTF8ToUTF16(netscape_url.substr(split + 1));
+ if (split < netscape_url.size() - 1) {
+ drop_data_->url_title =
+ base::UTF8ToUTF16(netscape_url.substr(split + 1));
+ }
}
} else if (target == ui::GetAtomForTarget(ui::CHROME_NAMED_URL)) {
ui::ExtractNamedURL(data, &drop_data_->url, &drop_data_->url_title);
diff --git a/content/browser/web_contents/web_drag_dest_mac_unittest.mm b/content/browser/web_contents/web_drag_dest_mac_unittest.mm
index a7dcede..c6c7ab5 100644
--- a/content/browser/web_contents/web_drag_dest_mac_unittest.mm
+++ b/content/browser/web_contents/web_drag_dest_mac_unittest.mm
@@ -140,7 +140,7 @@ TEST_F(WebDragDestTest, URL) {
EXPECT_TRUE(ui::PopulateURLAndTitleFromPasteboard(
&result_url, &result_title, pboard, YES));
EXPECT_EQ("file://localhost/bin/sh", result_url.spec());
- EXPECT_EQ("sh", UTF16ToUTF8(result_title));
+ EXPECT_EQ("sh", base::UTF16ToUTF8(result_title));
[pboard releaseGlobally];
}
diff --git a/content/browser/web_contents/web_drag_source_gtk.cc b/content/browser/web_contents/web_drag_source_gtk.cc
index 2f9e587..a515e23 100644
--- a/content/browser/web_contents/web_drag_source_gtk.cc
+++ b/content/browser/web_contents/web_drag_source_gtk.cc
@@ -179,7 +179,7 @@ void WebDragSourceGtk::OnDragDataGet(GtkWidget* sender,
switch (target_type) {
case ui::TEXT_PLAIN: {
- std::string utf8_text = UTF16ToUTF8(drop_data_->text.string());
+ std::string utf8_text = base::UTF16ToUTF8(drop_data_->text.string());
gtk_selection_data_set_text(selection_data, utf8_text.c_str(),
utf8_text.length());
break;
@@ -188,7 +188,7 @@ void WebDragSourceGtk::OnDragDataGet(GtkWidget* sender,
case ui::TEXT_HTML: {
// TODO(estade): change relative links to be absolute using
// |html_base_url|.
- std::string utf8_text = UTF16ToUTF8(drop_data_->html.string());
+ std::string utf8_text = base::UTF16ToUTF8(drop_data_->html.string());
gtk_selection_data_set(selection_data,
ui::GetAtomForTarget(ui::TEXT_HTML),
kBitsPerByte,
@@ -319,7 +319,7 @@ void WebDragSourceGtk::OnDragBegin(GtkWidget* sender,
std::string(),
std::string(),
download_file_name_.value(),
- UTF16ToUTF8(wide_download_mime_type_),
+ base::UTF16ToUTF8(wide_download_mime_type_),
default_name);
// Pass the file name to the drop target by setting the source window's
diff --git a/content/browser/web_contents/web_drag_source_mac.mm b/content/browser/web_contents/web_drag_source_mac.mm
index c667320..a5b51b0 100644
--- a/content/browser/web_contents/web_drag_source_mac.mm
+++ b/content/browser/web_contents/web_drag_source_mac.mm
@@ -147,7 +147,7 @@ void PromiseWriterHelper(const DropData& drop_data,
- (void)lazyWriteToPasteboard:(NSPasteboard*)pboard forType:(NSString*)type {
// NSHTMLPboardType requires the character set to be declared. Otherwise, it
// assumes US-ASCII. Awesome.
- const base::string16 kHtmlHeader = ASCIIToUTF16(
+ const base::string16 kHtmlHeader = base::ASCIIToUTF16(
"<meta http-equiv=\"Content-Type\" content=\"text/html;charset=UTF-8\">");
// Be extra paranoid; avoid crashing.
@@ -397,7 +397,7 @@ void PromiseWriterHelper(const DropData& drop_data,
// name.
std::string defaultName =
content::GetContentClient()->browser()->GetDefaultDownloadName();
- mimeType = UTF16ToUTF8(mimeType16);
+ mimeType = base::UTF16ToUTF8(mimeType16);
downloadFileName_ =
net::GenerateFileName(downloadURL_,
std::string(),
diff --git a/content/browser/webui/web_ui_data_source_unittest.cc b/content/browser/webui/web_ui_data_source_unittest.cc
index a5da7eb..4dc9c81 100644
--- a/content/browser/webui/web_ui_data_source_unittest.cc
+++ b/content/browser/webui/web_ui_data_source_unittest.cc
@@ -27,7 +27,7 @@ class TestClient : public TestContentClient {
virtual base::string16 GetLocalizedString(int message_id) const OVERRIDE {
if (message_id == kDummyStringId)
- return UTF8ToUTF16(kDummyString);
+ return base::UTF8ToUTF16(kDummyString);
return base::string16();
}
@@ -100,7 +100,7 @@ TEST_F(WebUIDataSourceTest, EmptyStrings) {
TEST_F(WebUIDataSourceTest, SomeStrings) {
source()->SetJsonPath("strings.js");
- source()->AddString("planet", ASCIIToUTF16("pluto"));
+ source()->AddString("planet", base::ASCIIToUTF16("pluto"));
source()->AddLocalizedString("button", kDummyStringId);
StartDataRequest("strings.js");
std::string result(reinterpret_cast<const char*>(
diff --git a/content/browser/webui/web_ui_impl.cc b/content/browser/webui/web_ui_impl.cc
index 73c4ebd..0c54523 100644
--- a/content/browser/webui/web_ui_impl.cc
+++ b/content/browser/webui/web_ui_impl.cc
@@ -37,9 +37,9 @@ base::string16 WebUI::GetJavascriptCall(
parameters += char16(',');
base::JSONWriter::Write(arg_list[i], &json);
- parameters += UTF8ToUTF16(json);
+ parameters += base::UTF8ToUTF16(json);
}
- return ASCIIToUTF16(function_name) +
+ return base::ASCIIToUTF16(function_name) +
char16('(') + parameters + char16(')') + char16(';');
}
@@ -144,7 +144,7 @@ void WebUIImpl::SetController(WebUIController* controller) {
void WebUIImpl::CallJavascriptFunction(const std::string& function_name) {
DCHECK(IsStringASCII(function_name));
- base::string16 javascript = ASCIIToUTF16(function_name + "();");
+ base::string16 javascript = base::ASCIIToUTF16(function_name + "();");
ExecuteJavascript(javascript);
}
@@ -233,7 +233,7 @@ void WebUIImpl::AddMessageHandler(WebUIMessageHandler* handler) {
void WebUIImpl::ExecuteJavascript(const base::string16& javascript) {
static_cast<RenderViewHostImpl*>(
web_contents_->GetRenderViewHost())->ExecuteJavascriptInWebFrame(
- ASCIIToUTF16(frame_xpath_), javascript);
+ base::ASCIIToUTF16(frame_xpath_), javascript);
}
} // namespace content
diff --git a/content/browser/webui/web_ui_message_handler_unittest.cc b/content/browser/webui/web_ui_message_handler_unittest.cc
index fe09a7b..cd12a3e 100644
--- a/content/browser/webui/web_ui_message_handler_unittest.cc
+++ b/content/browser/webui/web_ui_message_handler_unittest.cc
@@ -14,9 +14,9 @@ namespace content {
TEST(WebUIMessageHandlerTest, ExtractIntegerValue) {
base::ListValue list;
int value, zero_value = 0, neg_value = -1234, pos_value = 1234;
- base::string16 zero_string(UTF8ToUTF16("0"));
- base::string16 neg_string(UTF8ToUTF16("-1234"));
- base::string16 pos_string(UTF8ToUTF16("1234"));
+ base::string16 zero_string(base::UTF8ToUTF16("0"));
+ base::string16 neg_string(base::UTF8ToUTF16("-1234"));
+ base::string16 pos_string(base::UTF8ToUTF16("1234"));
list.Append(new base::FundamentalValue(zero_value));
EXPECT_TRUE(WebUIMessageHandler::ExtractIntegerValue(&list, &value));
@@ -51,9 +51,9 @@ TEST(WebUIMessageHandlerTest, ExtractIntegerValue) {
TEST(WebUIMessageHandlerTest, ExtractDoubleValue) {
base::ListValue list;
double value, zero_value = 0.0, neg_value = -1234.5, pos_value = 1234.5;
- base::string16 zero_string(UTF8ToUTF16("0"));
- base::string16 neg_string(UTF8ToUTF16("-1234.5"));
- base::string16 pos_string(UTF8ToUTF16("1234.5"));
+ base::string16 zero_string(base::UTF8ToUTF16("0"));
+ base::string16 neg_string(base::UTF8ToUTF16("-1234.5"));
+ base::string16 pos_string(base::UTF8ToUTF16("1234.5"));
list.Append(new base::FundamentalValue(zero_value));
EXPECT_TRUE(WebUIMessageHandler::ExtractDoubleValue(&list, &value));
@@ -87,7 +87,7 @@ TEST(WebUIMessageHandlerTest, ExtractDoubleValue) {
TEST(WebUIMessageHandlerTest, ExtractStringValue) {
base::ListValue list;
- base::string16 in_string(UTF8ToUTF16(
+ base::string16 in_string(base::UTF8ToUTF16(
"The facts, though interesting, are irrelevant."));
list.Append(new base::StringValue(in_string));
base::string16 out_string = WebUIMessageHandler::ExtractStringValue(&list);
diff --git a/content/browser/worker_host/test/worker_browsertest.cc b/content/browser/worker_host/test/worker_browsertest.cc
index f895fb7..4884d03 100644
--- a/content/browser/worker_host/test/worker_browsertest.cc
+++ b/content/browser/worker_host/test/worker_browsertest.cc
@@ -42,7 +42,7 @@ class WorkerTest : public ContentBrowserTest {
const std::string& test_case,
const std::string& query) {
GURL url = GetTestURL(test_case, query);
- const base::string16 expected_title = ASCIIToUTF16("OK");
+ const base::string16 expected_title = base::ASCIIToUTF16("OK");
TitleWatcher title_watcher(window->web_contents(), expected_title);
NavigateToURL(window, url);
base::string16 final_title = title_watcher.WaitAndGetTitle();
@@ -275,7 +275,7 @@ IN_PROC_BROWSER_TEST_F(WorkerTest, WebSocketSharedWorker) {
// Run test.
Shell* window = shell();
- const base::string16 expected_title = ASCIIToUTF16("OK");
+ const base::string16 expected_title = base::ASCIIToUTF16("OK");
TitleWatcher title_watcher(window->web_contents(), expected_title);
NavigateToURL(window, url);
base::string16 final_title = title_watcher.WaitAndGetTitle();
diff --git a/content/browser/worker_host/worker_process_host.cc b/content/browser/worker_host/worker_process_host.cc
index 2707ab6..5782397 100644
--- a/content/browser/worker_host/worker_process_host.cc
+++ b/content/browser/worker_host/worker_process_host.cc
@@ -511,7 +511,7 @@ void WorkerProcessHost::UpdateTitle() {
display_title += *i;
}
- process_->SetName(UTF8ToUTF16(display_title));
+ process_->SetName(base::UTF8ToUTF16(display_title));
}
void WorkerProcessHost::DocumentDetached(WorkerMessageFilter* filter,