Chromium Code Reviews| 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 offline_pages::OfflinePageRequestHandler::InitializeHandler( | |
| 479 request, resource_type); | |
|
mmenke
2016/08/10 20:27:51
Also, skip in incognito mode?
jianli
2016/08/10 21:37:25
Done.
| |
| 480 #endif | |
| 475 } | 481 } |
| 476 | 482 |
| 477 void ChromeResourceDispatcherHostDelegate::DownloadStarting( | 483 void ChromeResourceDispatcherHostDelegate::DownloadStarting( |
| 478 net::URLRequest* request, | 484 net::URLRequest* request, |
| 479 content::ResourceContext* resource_context, | 485 content::ResourceContext* resource_context, |
| 480 int child_id, | 486 int child_id, |
| 481 int route_id, | 487 int route_id, |
| 482 bool is_content_initiated, | 488 bool is_content_initiated, |
| 483 bool must_download, | 489 bool must_download, |
| 484 ScopedVector<content::ResourceThrottle>* throttles) { | 490 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()); | 854 data->SetDataReductionProxyData(data_reduction_proxy_data->DeepCopy()); |
| 849 return data; | 855 return data; |
| 850 } | 856 } |
| 851 | 857 |
| 852 std::unique_ptr<net::ClientCertStore> | 858 std::unique_ptr<net::ClientCertStore> |
| 853 ChromeResourceDispatcherHostDelegate::CreateClientCertStore( | 859 ChromeResourceDispatcherHostDelegate::CreateClientCertStore( |
| 854 content::ResourceContext* resource_context) { | 860 content::ResourceContext* resource_context) { |
| 855 return ProfileIOData::FromResourceContext(resource_context)-> | 861 return ProfileIOData::FromResourceContext(resource_context)-> |
| 856 CreateClientCertStore(); | 862 CreateClientCertStore(); |
| 857 } | 863 } |
| OLD | NEW |