Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(113)

Side by Side Diff: chrome/browser/chrome_content_browser_client.cc

Issue 2900563002: Network service: Safe browsing check for sub-resources from renderer. (Closed)
Patch Set: . Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/chrome_content_browser_client.h" 5 #include "chrome/browser/chrome_content_browser_client.h"
6 6
7 #include <map> 7 #include <map>
8 #include <set> 8 #include <set>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 #include "chrome/browser/prerender/prerender_message_filter.h" 67 #include "chrome/browser/prerender/prerender_message_filter.h"
68 #include "chrome/browser/printing/printing_message_filter.h" 68 #include "chrome/browser/printing/printing_message_filter.h"
69 #include "chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.h" 69 #include "chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.h"
70 #include "chrome/browser/profiles/profile.h" 70 #include "chrome/browser/profiles/profile.h"
71 #include "chrome/browser/profiles/profile_io_data.h" 71 #include "chrome/browser/profiles/profile_io_data.h"
72 #include "chrome/browser/renderer_host/chrome_navigation_ui_data.h" 72 #include "chrome/browser/renderer_host/chrome_navigation_ui_data.h"
73 #include "chrome/browser/renderer_host/chrome_render_message_filter.h" 73 #include "chrome/browser/renderer_host/chrome_render_message_filter.h"
74 #include "chrome/browser/renderer_host/pepper/chrome_browser_pepper_host_factory .h" 74 #include "chrome/browser/renderer_host/pepper/chrome_browser_pepper_host_factory .h"
75 #include "chrome/browser/safe_browsing/certificate_reporting_service.h" 75 #include "chrome/browser/safe_browsing/certificate_reporting_service.h"
76 #include "chrome/browser/safe_browsing/certificate_reporting_service_factory.h" 76 #include "chrome/browser/safe_browsing/certificate_reporting_service_factory.h"
77 #include "chrome/browser/safe_browsing/safe_browsing_impl.h"
78 #include "chrome/browser/safe_browsing/safe_browsing_service.h"
77 #include "chrome/browser/search/instant_service.h" 79 #include "chrome/browser/search/instant_service.h"
78 #include "chrome/browser/search/instant_service_factory.h" 80 #include "chrome/browser/search/instant_service_factory.h"
79 #include "chrome/browser/search/search.h" 81 #include "chrome/browser/search/search.h"
80 #include "chrome/browser/speech/chrome_speech_recognition_manager_delegate.h" 82 #include "chrome/browser/speech/chrome_speech_recognition_manager_delegate.h"
81 #include "chrome/browser/speech/tts_controller.h" 83 #include "chrome/browser/speech/tts_controller.h"
82 #include "chrome/browser/speech/tts_message_filter.h" 84 #include "chrome/browser/speech/tts_message_filter.h"
83 #include "chrome/browser/ssl/ssl_blocking_page.h" 85 #include "chrome/browser/ssl/ssl_blocking_page.h"
84 #include "chrome/browser/ssl/ssl_cert_reporter.h" 86 #include "chrome/browser/ssl/ssl_cert_reporter.h"
85 #include "chrome/browser/ssl/ssl_client_certificate_selector.h" 87 #include "chrome/browser/ssl/ssl_client_certificate_selector.h"
86 #include "chrome/browser/ssl/ssl_error_handler.h" 88 #include "chrome/browser/ssl/ssl_error_handler.h"
(...skipping 3079 matching lines...) Expand 10 before | Expand all | Expand 10 after
3166 registry->AddInterface( 3168 registry->AddInterface(
3167 base::Bind(&password_manager::ContentPasswordManagerDriverFactory:: 3169 base::Bind(&password_manager::ContentPasswordManagerDriverFactory::
3168 BindPasswordManagerDriver, 3170 BindPasswordManagerDriver,
3169 render_frame_host)); 3171 render_frame_host));
3170 3172
3171 registry->AddInterface( 3173 registry->AddInterface(
3172 base::Bind(&password_manager::ContentPasswordManagerDriverFactory:: 3174 base::Bind(&password_manager::ContentPasswordManagerDriverFactory::
3173 BindSensitiveInputVisibilityService, 3175 BindSensitiveInputVisibilityService,
3174 render_frame_host)); 3176 render_frame_host));
3175 3177
3178 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
3179 switches::kEnableNetworkService)) {
3180 registry->AddInterface(
3181 base::Bind(
3182 &safe_browsing::SafeBrowsingImpl::Create,
3183 g_browser_process->safe_browsing_service()->database_manager(),
3184 g_browser_process->safe_browsing_service()->ui_manager(),
3185 render_frame_host->GetProcess()->GetID(),
3186 render_frame_host->GetRoutingID()),
3187 BrowserThread::GetTaskRunnerForThread(BrowserThread::IO));
3188 }
3189
3176 #if defined(OS_ANDROID) 3190 #if defined(OS_ANDROID)
3177 registry->AddInterface( 3191 registry->AddInterface(
3178 render_frame_host->GetJavaInterfaces() 3192 render_frame_host->GetJavaInterfaces()
3179 ->CreateInterfaceFactory<payments::mojom::PaymentRequest>()); 3193 ->CreateInterfaceFactory<payments::mojom::PaymentRequest>());
3180 registry->AddInterface( 3194 registry->AddInterface(
3181 base::Bind(&ForwardInstalledAppProviderRequest, 3195 base::Bind(&ForwardInstalledAppProviderRequest,
3182 render_frame_host->GetJavaInterfaces()->GetWeakPtr())); 3196 render_frame_host->GetJavaInterfaces()->GetWeakPtr()));
3183 content::WebContents* web_contents = 3197 content::WebContents* web_contents =
3184 content::WebContents::FromRenderFrameHost(render_frame_host); 3198 content::WebContents::FromRenderFrameHost(render_frame_host);
3185 if (web_contents) { 3199 if (web_contents) {
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after
3582 RedirectNonUINonIOBrowserThreadsToTaskScheduler() { 3596 RedirectNonUINonIOBrowserThreadsToTaskScheduler() {
3583 return variations::GetVariationParamValue( 3597 return variations::GetVariationParamValue(
3584 "BrowserScheduler", "RedirectNonUINonIOBrowserThreads") == "true"; 3598 "BrowserScheduler", "RedirectNonUINonIOBrowserThreads") == "true";
3585 } 3599 }
3586 3600
3587 // static 3601 // static
3588 void ChromeContentBrowserClient::SetDefaultQuotaSettingsForTesting( 3602 void ChromeContentBrowserClient::SetDefaultQuotaSettingsForTesting(
3589 const storage::QuotaSettings* settings) { 3603 const storage::QuotaSettings* settings) {
3590 g_default_quota_settings = settings; 3604 g_default_quota_settings = settings;
3591 } 3605 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698