| 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 "chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.
h" | 5 #include "chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.
h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/base64.h" | 10 #include "base/base64.h" |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 #include "components/content_settings/core/browser/host_content_settings_map.h" | 36 #include "components/content_settings/core/browser/host_content_settings_map.h" |
| 37 #include "components/google/core/browser/google_util.h" | 37 #include "components/google/core/browser/google_util.h" |
| 38 #include "components/variations/net/variations_http_header_provider.h" | 38 #include "components/variations/net/variations_http_header_provider.h" |
| 39 #include "content/public/browser/browser_thread.h" | 39 #include "content/public/browser/browser_thread.h" |
| 40 #include "content/public/browser/notification_service.h" | 40 #include "content/public/browser/notification_service.h" |
| 41 #include "content/public/browser/render_process_host.h" | 41 #include "content/public/browser/render_process_host.h" |
| 42 #include "content/public/browser/render_view_host.h" | 42 #include "content/public/browser/render_view_host.h" |
| 43 #include "content/public/browser/resource_context.h" | 43 #include "content/public/browser/resource_context.h" |
| 44 #include "content/public/browser/resource_dispatcher_host.h" | 44 #include "content/public/browser/resource_dispatcher_host.h" |
| 45 #include "content/public/browser/resource_request_info.h" | 45 #include "content/public/browser/resource_request_info.h" |
| 46 #include "content/public/browser/service_worker_context.h" |
| 46 #include "content/public/browser/stream_info.h" | 47 #include "content/public/browser/stream_info.h" |
| 47 #include "content/public/browser/web_contents.h" | 48 #include "content/public/browser/web_contents.h" |
| 48 #include "content/public/common/resource_response.h" | 49 #include "content/public/common/resource_response.h" |
| 49 #include "net/base/load_flags.h" | 50 #include "net/base/load_flags.h" |
| 50 #include "net/base/load_timing_info.h" | 51 #include "net/base/load_timing_info.h" |
| 51 #include "net/base/request_priority.h" | 52 #include "net/base/request_priority.h" |
| 52 #include "net/http/http_response_headers.h" | 53 #include "net/http/http_response_headers.h" |
| 53 #include "net/url_request/url_request.h" | 54 #include "net/url_request/url_request.h" |
| 54 | 55 |
| 55 #if !defined(DISABLE_NACL) | 56 #if !defined(DISABLE_NACL) |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 261 } // namespace | 262 } // namespace |
| 262 | 263 |
| 263 ChromeResourceDispatcherHostDelegate::ChromeResourceDispatcherHostDelegate( | 264 ChromeResourceDispatcherHostDelegate::ChromeResourceDispatcherHostDelegate( |
| 264 prerender::PrerenderTracker* prerender_tracker) | 265 prerender::PrerenderTracker* prerender_tracker) |
| 265 : download_request_limiter_(g_browser_process->download_request_limiter()), | 266 : download_request_limiter_(g_browser_process->download_request_limiter()), |
| 266 safe_browsing_(g_browser_process->safe_browsing_service()), | 267 safe_browsing_(g_browser_process->safe_browsing_service()), |
| 267 #if defined(ENABLE_EXTENSIONS) | 268 #if defined(ENABLE_EXTENSIONS) |
| 268 user_script_listener_(new extensions::UserScriptListener()), | 269 user_script_listener_(new extensions::UserScriptListener()), |
| 269 #endif | 270 #endif |
| 270 prerender_tracker_(prerender_tracker) { | 271 prerender_tracker_(prerender_tracker) { |
| 272 content::ServiceWorkerContext::AddExcludedHeadersForFetchEvent( |
| 273 variations::VariationsHttpHeaderProvider::GetInstance() |
| 274 ->GetExcludedHeadersForFetchEvent()); |
| 271 } | 275 } |
| 272 | 276 |
| 273 ChromeResourceDispatcherHostDelegate::~ChromeResourceDispatcherHostDelegate() { | 277 ChromeResourceDispatcherHostDelegate::~ChromeResourceDispatcherHostDelegate() { |
| 274 #if defined(ENABLE_EXTENSIONS) | 278 #if defined(ENABLE_EXTENSIONS) |
| 275 CHECK(stream_target_info_.empty()); | 279 CHECK(stream_target_info_.empty()); |
| 276 #endif | 280 #endif |
| 277 } | 281 } |
| 278 | 282 |
| 279 bool ChromeResourceDispatcherHostDelegate::ShouldBeginRequest( | 283 bool ChromeResourceDispatcherHostDelegate::ShouldBeginRequest( |
| 280 const std::string& method, | 284 const std::string& method, |
| (...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 751 url_request->GetTotalReceivedBytes())); | 755 url_request->GetTotalReceivedBytes())); |
| 752 } | 756 } |
| 753 } | 757 } |
| 754 | 758 |
| 755 // static | 759 // static |
| 756 void ChromeResourceDispatcherHostDelegate:: | 760 void ChromeResourceDispatcherHostDelegate:: |
| 757 SetExternalProtocolHandlerDelegateForTesting( | 761 SetExternalProtocolHandlerDelegateForTesting( |
| 758 ExternalProtocolHandler::Delegate* delegate) { | 762 ExternalProtocolHandler::Delegate* delegate) { |
| 759 g_external_protocol_handler_delegate = delegate; | 763 g_external_protocol_handler_delegate = delegate; |
| 760 } | 764 } |
| OLD | NEW |