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 | |
9 #include <string> | 8 #include <string> |
| 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/base64.h" | 12 #include "base/base64.h" |
13 #include "base/guid.h" | 13 #include "base/guid.h" |
14 #include "base/logging.h" | 14 #include "base/logging.h" |
15 #include "build/build_config.h" | 15 #include "build/build_config.h" |
16 #include "chrome/browser/browser_process.h" | 16 #include "chrome/browser/browser_process.h" |
17 #include "chrome/browser/chrome_notification_types.h" | 17 #include "chrome/browser/chrome_notification_types.h" |
18 #include "chrome/browser/component_updater/component_updater_resource_throttle.h
" | 18 #include "chrome/browser/component_updater/component_updater_resource_throttle.h
" |
19 #include "chrome/browser/download/download_request_limiter.h" | 19 #include "chrome/browser/download/download_request_limiter.h" |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 return; | 204 return; |
205 } | 205 } |
206 | 206 |
207 Profile* profile = | 207 Profile* profile = |
208 Profile::FromBrowserContext(web_contents->GetBrowserContext()); | 208 Profile::FromBrowserContext(web_contents->GetBrowserContext()); |
209 | 209 |
210 StreamsPrivateAPI* streams_private = StreamsPrivateAPI::Get(profile); | 210 StreamsPrivateAPI* streams_private = StreamsPrivateAPI::Get(profile); |
211 if (!streams_private) | 211 if (!streams_private) |
212 return; | 212 return; |
213 streams_private->ExecuteMimeTypeHandler( | 213 streams_private->ExecuteMimeTypeHandler( |
214 extension_id, web_contents, stream.Pass(), view_id, expected_content_size, | 214 extension_id, web_contents, std::move(stream), view_id, |
215 embedded, render_process_id, render_frame_id); | 215 expected_content_size, embedded, render_process_id, render_frame_id); |
216 } | 216 } |
217 #endif // !defined(ENABLE_EXTENSIONS) | 217 #endif // !defined(ENABLE_EXTENSIONS) |
218 | 218 |
219 void LaunchURL( | 219 void LaunchURL( |
220 const GURL& url, | 220 const GURL& url, |
221 int render_process_id, | 221 int render_process_id, |
222 int render_view_id, | 222 int render_view_id, |
223 ui::PageTransition page_transition, | 223 ui::PageTransition page_transition, |
224 bool has_user_gesture) { | 224 bool has_user_gesture) { |
225 // If there is no longer a WebContents, the request may have raced with tab | 225 // If there is no longer a WebContents, the request may have raced with tab |
(...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
742 return data_reduction_proxy_io_data->ShouldEnableLoFiMode(url_request); | 742 return data_reduction_proxy_io_data->ShouldEnableLoFiMode(url_request); |
743 return false; | 743 return false; |
744 } | 744 } |
745 | 745 |
746 // static | 746 // static |
747 void ChromeResourceDispatcherHostDelegate:: | 747 void ChromeResourceDispatcherHostDelegate:: |
748 SetExternalProtocolHandlerDelegateForTesting( | 748 SetExternalProtocolHandlerDelegateForTesting( |
749 ExternalProtocolHandler::Delegate* delegate) { | 749 ExternalProtocolHandler::Delegate* delegate) { |
750 g_external_protocol_handler_delegate = delegate; | 750 g_external_protocol_handler_delegate = delegate; |
751 } | 751 } |
OLD | NEW |