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/renderer/chrome_content_renderer_client.h" | 5 #include "chrome/renderer/chrome_content_renderer_client.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 #include "chrome/renderer/net_benchmarking_extension.h" | 50 #include "chrome/renderer/net_benchmarking_extension.h" |
51 #include "chrome/renderer/page_load_metrics/metrics_render_frame_observer.h" | 51 #include "chrome/renderer/page_load_metrics/metrics_render_frame_observer.h" |
52 #include "chrome/renderer/pepper/pepper_helper.h" | 52 #include "chrome/renderer/pepper/pepper_helper.h" |
53 #include "chrome/renderer/plugins/non_loadable_plugin_placeholder.h" | 53 #include "chrome/renderer/plugins/non_loadable_plugin_placeholder.h" |
54 #include "chrome/renderer/plugins/plugin_preroller.h" | 54 #include "chrome/renderer/plugins/plugin_preroller.h" |
55 #include "chrome/renderer/plugins/plugin_uma.h" | 55 #include "chrome/renderer/plugins/plugin_uma.h" |
56 #include "chrome/renderer/prerender/prerender_dispatcher.h" | 56 #include "chrome/renderer/prerender/prerender_dispatcher.h" |
57 #include "chrome/renderer/prerender/prerender_helper.h" | 57 #include "chrome/renderer/prerender/prerender_helper.h" |
58 #include "chrome/renderer/prerender/prerenderer_client.h" | 58 #include "chrome/renderer/prerender/prerenderer_client.h" |
59 #include "chrome/renderer/safe_browsing/phishing_classifier_delegate.h" | 59 #include "chrome/renderer/safe_browsing/phishing_classifier_delegate.h" |
60 #include "chrome/renderer/safe_browsing/safe_browsing_url_loader_throttle.h" | 60 #include "chrome/renderer/safe_browsing/renderer_url_loader_throttle.h" |
61 #include "chrome/renderer/searchbox/search_bouncer.h" | 61 #include "chrome/renderer/searchbox/search_bouncer.h" |
62 #include "chrome/renderer/searchbox/searchbox.h" | 62 #include "chrome/renderer/searchbox/searchbox.h" |
63 #include "chrome/renderer/searchbox/searchbox_extension.h" | 63 #include "chrome/renderer/searchbox/searchbox_extension.h" |
64 #include "chrome/renderer/tts_dispatcher.h" | 64 #include "chrome/renderer/tts_dispatcher.h" |
65 #include "chrome/renderer/worker_content_settings_client.h" | 65 #include "chrome/renderer/worker_content_settings_client.h" |
66 #include "components/autofill/content/renderer/autofill_agent.h" | 66 #include "components/autofill/content/renderer/autofill_agent.h" |
67 #include "components/autofill/content/renderer/password_autofill_agent.h" | 67 #include "components/autofill/content/renderer/password_autofill_agent.h" |
68 #include "components/autofill/content/renderer/password_generation_agent.h" | 68 #include "components/autofill/content/renderer/password_generation_agent.h" |
69 #include "components/content_settings/core/common/content_settings_pattern.h" | 69 #include "components/content_settings/core/common/content_settings_pattern.h" |
70 #include "components/contextual_search/renderer/overlay_js_render_frame_observer
.h" | 70 #include "components/contextual_search/renderer/overlay_js_render_frame_observer
.h" |
(...skipping 1135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1206 std::vector<std::unique_ptr<content::URLLoaderThrottle>>* throttles, | 1206 std::vector<std::unique_ptr<content::URLLoaderThrottle>>* throttles, |
1207 GURL* new_url) { | 1207 GURL* new_url) { |
1208 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | 1208 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
1209 switches::kEnableNetworkService)) { | 1209 switches::kEnableNetworkService)) { |
1210 if (!safe_browsing_) { | 1210 if (!safe_browsing_) { |
1211 RenderThread::Get()->GetConnector()->BindInterface( | 1211 RenderThread::Get()->GetConnector()->BindInterface( |
1212 content::mojom::kBrowserServiceName, &safe_browsing_); | 1212 content::mojom::kBrowserServiceName, &safe_browsing_); |
1213 } | 1213 } |
1214 RenderFrame* render_frame = content::RenderFrame::FromWebFrame(frame); | 1214 RenderFrame* render_frame = content::RenderFrame::FromWebFrame(frame); |
1215 throttles->push_back( | 1215 throttles->push_back( |
1216 base::MakeUnique<safe_browsing::SafeBrowsingURLLoaderThrottle>( | 1216 base::MakeUnique<safe_browsing::RendererURLLoaderThrottle>( |
1217 safe_browsing_.get(), render_frame->GetRoutingID())); | 1217 safe_browsing_.get(), render_frame->GetRoutingID())); |
1218 } | 1218 } |
1219 | 1219 |
1220 // Check whether the request should be allowed. If not allowed, we reset the | 1220 // Check whether the request should be allowed. If not allowed, we reset the |
1221 // URL to something invalid to prevent the request and cause an error. | 1221 // URL to something invalid to prevent the request and cause an error. |
1222 #if BUILDFLAG(ENABLE_EXTENSIONS) | 1222 #if BUILDFLAG(ENABLE_EXTENSIONS) |
1223 if (ChromeExtensionsRendererClient::GetInstance()->WillSendRequest( | 1223 if (ChromeExtensionsRendererClient::GetInstance()->WillSendRequest( |
1224 frame, transition_type, url, new_url)) { | 1224 frame, transition_type, url, new_url)) { |
1225 return true; | 1225 return true; |
1226 } | 1226 } |
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1593 | 1593 |
1594 RecordYouTubeRewriteUMA(result); | 1594 RecordYouTubeRewriteUMA(result); |
1595 return corrected_url.ReplaceComponents(r); | 1595 return corrected_url.ReplaceComponents(r); |
1596 } | 1596 } |
1597 | 1597 |
1598 std::unique_ptr<base::TaskScheduler::InitParams> | 1598 std::unique_ptr<base::TaskScheduler::InitParams> |
1599 ChromeContentRendererClient::GetTaskSchedulerInitParams() { | 1599 ChromeContentRendererClient::GetTaskSchedulerInitParams() { |
1600 return task_scheduler_util:: | 1600 return task_scheduler_util:: |
1601 GetRendererTaskSchedulerInitParamsFromCommandLine(); | 1601 GetRendererTaskSchedulerInitParamsFromCommandLine(); |
1602 } | 1602 } |
OLD | NEW |