Index: content/renderer/service_worker/service_worker_type_util.cc |
diff --git a/content/renderer/service_worker/service_worker_type_util.cc b/content/renderer/service_worker/service_worker_type_util.cc |
index 720ea2d32a58d56496c197610ee5bca04a63620d..9e5878f2e5fdaa1a47100590a14b254b2e0c8503 100644 |
--- a/content/renderer/service_worker/service_worker_type_util.cc |
+++ b/content/renderer/service_worker/service_worker_type_util.cc |
@@ -25,10 +25,9 @@ class HeaderVisitor : public blink::WebHTTPHeaderVisitor { |
void visitHeader(const blink::WebString& name, |
const blink::WebString& value) override { |
- const std::string header_name = |
- base::UTF16ToASCII(base::StringPiece16(name)); |
- const std::string header_value = |
- base::UTF16ToASCII(base::StringPiece16(value)); |
+ // Headers are ISO Latin 1. |
+ const std::string& header_name = name.latin1(); |
+ const std::string& header_value = value.latin1(); |
CHECK(header_name.find('\0') == std::string::npos); |
CHECK(header_value.find('\0') == std::string::npos); |
headers_->insert(ServiceWorkerHeaderMap::value_type( |