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

Side by Side Diff: mojo/services/html_viewer/blink_url_request_type_converters.cc

Issue 1037363002: Remove unnecessary 'virtual' annotation from mojo (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Resolved merge conflicts Created 5 years, 8 months 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "mojo/services/html_viewer/blink_url_request_type_converters.h" 5 #include "mojo/services/html_viewer/blink_url_request_type_converters.h"
6 6
7 #include "base/strings/string_util.h" 7 #include "base/strings/string_util.h"
8 #include "third_party/WebKit/public/platform/WebHTTPHeaderVisitor.h" 8 #include "third_party/WebKit/public/platform/WebHTTPHeaderVisitor.h"
9 #include "third_party/WebKit/public/platform/WebURLRequest.h" 9 #include "third_party/WebKit/public/platform/WebURLRequest.h"
10 #include "third_party/mojo/src/mojo/public/cpp/system/data_pipe.h" 10 #include "third_party/mojo/src/mojo/public/cpp/system/data_pipe.h"
11 11
12 namespace mojo { 12 namespace mojo {
13 namespace { 13 namespace {
14 14
15 // Ripped from web_url_loader_impl.cc. 15 // Ripped from web_url_loader_impl.cc.
16 class HeaderFlattener : public blink::WebHTTPHeaderVisitor { 16 class HeaderFlattener : public blink::WebHTTPHeaderVisitor {
17 public: 17 public:
18 HeaderFlattener() : has_accept_header_(false) {} 18 HeaderFlattener() : has_accept_header_(false) {}
19 19
20 virtual void visitHeader(const blink::WebString& name, 20 void visitHeader(const blink::WebString& name,
21 const blink::WebString& value) { 21 const blink::WebString& value) override {
22 // Headers are latin1. 22 // Headers are latin1.
23 const std::string& name_latin1 = name.latin1(); 23 const std::string& name_latin1 = name.latin1();
24 const std::string& value_latin1 = value.latin1(); 24 const std::string& value_latin1 = value.latin1();
25 25
26 // Skip over referrer headers found in the header map because we already 26 // Skip over referrer headers found in the header map because we already
27 // pulled it out as a separate parameter. 27 // pulled it out as a separate parameter.
28 if (LowerCaseEqualsASCII(name_latin1, "referer")) 28 if (LowerCaseEqualsASCII(name_latin1, "referer"))
29 return; 29 return;
30 30
31 if (LowerCaseEqualsASCII(name_latin1, "accept")) 31 if (LowerCaseEqualsASCII(name_latin1, "accept"))
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 request.visitHTTPHeaderFields(&flattener); 101 request.visitHTTPHeaderFields(&flattener);
102 url_request->headers = flattener.GetBuffer().Pass(); 102 url_request->headers = flattener.GetBuffer().Pass();
103 103
104 AddRequestBody(url_request.get(), request); 104 AddRequestBody(url_request.get(), request);
105 105
106 return url_request.Pass(); 106 return url_request.Pass();
107 } 107 }
108 108
109 } // namespace mojo 109 } // namespace mojo
110 110
OLDNEW
« no previous file with comments | « mojo/services/html_viewer/blink_platform_impl.cc ('k') | mojo/services/html_viewer/html_document.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698