OLD | NEW |
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 "components/html_viewer/blink_url_request_type_converters.h" | 5 #include "components/html_viewer/blink_url_request_type_converters.h" |
6 | 6 |
| 7 #include <stdint.h> |
| 8 |
7 #include "base/strings/string_util.h" | 9 #include "base/strings/string_util.h" |
8 #include "mojo/public/cpp/system/data_pipe.h" | 10 #include "mojo/public/cpp/system/data_pipe.h" |
9 #include "third_party/WebKit/public/platform/WebHTTPHeaderVisitor.h" | 11 #include "third_party/WebKit/public/platform/WebHTTPHeaderVisitor.h" |
10 #include "third_party/WebKit/public/platform/WebURLRequest.h" | 12 #include "third_party/WebKit/public/platform/WebURLRequest.h" |
11 | 13 |
12 namespace mojo { | 14 namespace mojo { |
13 namespace { | 15 namespace { |
14 | 16 |
15 // Ripped from web_url_loader_impl.cc. | 17 // Ripped from web_url_loader_impl.cc. |
16 class HeaderFlattener : public blink::WebHTTPHeaderVisitor { | 18 class HeaderFlattener : public blink::WebHTTPHeaderVisitor { |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 request.visitHTTPHeaderFields(&flattener); | 104 request.visitHTTPHeaderFields(&flattener); |
103 url_request->headers = flattener.GetBuffer().Pass(); | 105 url_request->headers = flattener.GetBuffer().Pass(); |
104 | 106 |
105 AddRequestBody(url_request.get(), request); | 107 AddRequestBody(url_request.get(), request); |
106 | 108 |
107 return url_request.Pass(); | 109 return url_request.Pass(); |
108 } | 110 } |
109 | 111 |
110 } // namespace mojo | 112 } // namespace mojo |
111 | 113 |
OLD | NEW |