Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(453)

Unified Diff: content/child/simple_webmimeregistry_impl.cc

Issue 2469353003: Skip base::string16 if not necessary for WebString <-> ASCII conversion (Closed)
Patch Set: minor fix Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/renderer/cache_storage/cache_storage_dispatcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/simple_webmimeregistry_impl.cc
diff --git a/content/child/simple_webmimeregistry_impl.cc b/content/child/simple_webmimeregistry_impl.cc
index a2ce6281dac867c62809eff26143c68f0217fd87..4603407b72c75fb8239b99edd7c0c3b50b3d6abb 100644
--- a/content/child/simple_webmimeregistry_impl.cc
+++ b/content/child/simple_webmimeregistry_impl.cc
@@ -22,9 +22,7 @@ namespace content {
// static
std::string SimpleWebMimeRegistryImpl::ToASCIIOrEmpty(const WebString& string) {
- return base::IsStringASCII(string)
- ? base::UTF16ToASCII(base::StringPiece16(string))
- : std::string();
+ return string.containsOnlyASCII() ? string.ascii() : std::string();
}
WebMimeRegistry::SupportsType SimpleWebMimeRegistryImpl::supportsMIMEType(
« no previous file with comments | « no previous file | content/renderer/cache_storage/cache_storage_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698