| 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 <stdint.h> | 7 #include <stdint.h> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 #include <google/protobuf/repeated_field.h> | 96 #include <google/protobuf/repeated_field.h> |
| 97 #else | 97 #else |
| 98 #include "third_party/protobuf/src/google/protobuf/repeated_field.h" | 98 #include "third_party/protobuf/src/google/protobuf/repeated_field.h" |
| 99 #endif | 99 #endif |
| 100 | 100 |
| 101 #if BUILDFLAG(ANDROID_JAVA_UI) | 101 #if BUILDFLAG(ANDROID_JAVA_UI) |
| 102 #include "chrome/browser/android/intercept_download_resource_throttle.h" | 102 #include "chrome/browser/android/intercept_download_resource_throttle.h" |
| 103 #endif | 103 #endif |
| 104 | 104 |
| 105 #if defined(OS_ANDROID) | 105 #if defined(OS_ANDROID) |
| 106 #include "chrome/browser/android/offline_pages/offline_page_request_handler.h" |
| 106 #include "chrome/browser/renderer_host/data_reduction_proxy_resource_throttle_an
droid.h" | 107 #include "chrome/browser/renderer_host/data_reduction_proxy_resource_throttle_an
droid.h" |
| 107 #include "components/navigation_interception/intercept_navigation_delegate.h" | 108 #include "components/navigation_interception/intercept_navigation_delegate.h" |
| 108 #endif | 109 #endif |
| 109 | 110 |
| 110 #if defined(OS_CHROMEOS) | 111 #if defined(OS_CHROMEOS) |
| 111 #include "chrome/browser/chromeos/login/signin/merge_session_resource_throttle.h
" | 112 #include "chrome/browser/chromeos/login/signin/merge_session_resource_throttle.h
" |
| 112 #include "chrome/browser/chromeos/login/signin/merge_session_throttling_utils.h" | 113 #include "chrome/browser/chromeos/login/signin/merge_session_throttling_utils.h" |
| 113 #endif | 114 #endif |
| 114 | 115 |
| 115 using content::BrowserThread; | 116 using content::BrowserThread; |
| (...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 465 resource_context, | 466 resource_context, |
| 466 resource_type, | 467 resource_type, |
| 467 throttles); | 468 throttles); |
| 468 } | 469 } |
| 469 #endif | 470 #endif |
| 470 | 471 |
| 471 if (io_data->resource_prefetch_predictor_observer()) { | 472 if (io_data->resource_prefetch_predictor_observer()) { |
| 472 io_data->resource_prefetch_predictor_observer()->OnRequestStarted( | 473 io_data->resource_prefetch_predictor_observer()->OnRequestStarted( |
| 473 request, resource_type, info->GetChildID(), info->GetRenderFrameID()); | 474 request, resource_type, info->GetChildID(), info->GetRenderFrameID()); |
| 474 } | 475 } |
| 476 |
| 477 #if defined(OS_ANDROID) |
| 478 if (!io_data->IsOffTheRecord()) { |
| 479 offline_pages::OfflinePageRequestHandler::InitializeHandler( |
| 480 request, resource_type); |
| 481 } |
| 482 #endif |
| 475 } | 483 } |
| 476 | 484 |
| 477 void ChromeResourceDispatcherHostDelegate::DownloadStarting( | 485 void ChromeResourceDispatcherHostDelegate::DownloadStarting( |
| 478 net::URLRequest* request, | 486 net::URLRequest* request, |
| 479 content::ResourceContext* resource_context, | 487 content::ResourceContext* resource_context, |
| 480 int child_id, | 488 int child_id, |
| 481 int route_id, | 489 int route_id, |
| 482 bool is_content_initiated, | 490 bool is_content_initiated, |
| 483 bool must_download, | 491 bool must_download, |
| 484 ScopedVector<content::ResourceThrottle>* throttles) { | 492 ScopedVector<content::ResourceThrottle>* throttles) { |
| (...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 848 data->SetDataReductionProxyData(data_reduction_proxy_data->DeepCopy()); | 856 data->SetDataReductionProxyData(data_reduction_proxy_data->DeepCopy()); |
| 849 return data; | 857 return data; |
| 850 } | 858 } |
| 851 | 859 |
| 852 std::unique_ptr<net::ClientCertStore> | 860 std::unique_ptr<net::ClientCertStore> |
| 853 ChromeResourceDispatcherHostDelegate::CreateClientCertStore( | 861 ChromeResourceDispatcherHostDelegate::CreateClientCertStore( |
| 854 content::ResourceContext* resource_context) { | 862 content::ResourceContext* resource_context) { |
| 855 return ProfileIOData::FromResourceContext(resource_context)-> | 863 return ProfileIOData::FromResourceContext(resource_context)-> |
| 856 CreateClientCertStore(); | 864 CreateClientCertStore(); |
| 857 } | 865 } |
| OLD | NEW |