| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "android_webview/browser/renderer_host/aw_resource_dispatcher_host_dele
gate.h" | 5 #include "android_webview/browser/renderer_host/aw_resource_dispatcher_host_dele
gate.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "android_webview/browser/aw_browser_context.h" | 10 #include "android_webview/browser/aw_browser_context.h" |
| (...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 291 const content::ResourceRequestInfo* request_info = | 291 const content::ResourceRequestInfo* request_info = |
| 292 content::ResourceRequestInfo::ForRequest(request); | 292 content::ResourceRequestInfo::ForRequest(request); |
| 293 | 293 |
| 294 std::unique_ptr<IoThreadClientThrottle> ioThreadThrottle = | 294 std::unique_ptr<IoThreadClientThrottle> ioThreadThrottle = |
| 295 base::MakeUnique<IoThreadClientThrottle>(request_info->GetChildID(), | 295 base::MakeUnique<IoThreadClientThrottle>(request_info->GetChildID(), |
| 296 request_info->GetRenderFrameID(), | 296 request_info->GetRenderFrameID(), |
| 297 request); | 297 request); |
| 298 | 298 |
| 299 if (ioThreadThrottle->GetSafeBrowsingEnabled()) { | 299 if (ioThreadThrottle->GetSafeBrowsingEnabled()) { |
| 300 content::ResourceThrottle* throttle = | 300 content::ResourceThrottle* throttle = |
| 301 AwSafeBrowsingResourceThrottle::MaybeCreate( | 301 MaybeCreateAwSafeBrowsingResourceThrottle( |
| 302 request, resource_type, | 302 request, resource_type, |
| 303 AwBrowserContext::GetDefault()->GetSafeBrowsingDBManager(), | 303 AwBrowserContext::GetDefault()->GetSafeBrowsingDBManager(), |
| 304 AwBrowserContext::GetDefault()->GetSafeBrowsingUIManager()); | 304 AwBrowserContext::GetDefault()->GetSafeBrowsingUIManager()); |
| 305 if (throttle == nullptr) { | 305 if (throttle == nullptr) { |
| 306 // Should not happen | 306 // Should not happen |
| 307 DLOG(WARNING) << "Failed creating safebrowsing throttle"; | 307 DLOG(WARNING) << "Failed creating safebrowsing throttle"; |
| 308 } else { | 308 } else { |
| 309 throttles->push_back(base::WrapUnique(throttle)); | 309 throttles->push_back(base::WrapUnique(throttle)); |
| 310 } | 310 } |
| 311 } | 311 } |
| (...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 514 net::HttpRequestHeaders headers; | 514 net::HttpRequestHeaders headers; |
| 515 headers.AddHeadersFromString(extra_headers); | 515 headers.AddHeadersFromString(extra_headers); |
| 516 for (net::HttpRequestHeaders::Iterator it(headers); it.GetNext(); ) { | 516 for (net::HttpRequestHeaders::Iterator it(headers); it.GetNext(); ) { |
| 517 request->SetExtraRequestHeaderByName(it.name(), it.value(), false); | 517 request->SetExtraRequestHeaderByName(it.name(), it.value(), false); |
| 518 } | 518 } |
| 519 } | 519 } |
| 520 } | 520 } |
| 521 } | 521 } |
| 522 | 522 |
| 523 } // namespace android_webview | 523 } // namespace android_webview |
| OLD | NEW |