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

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, 6 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 2987 matching lines...) Expand 10 before | Expand all | Expand 10 after
3074 g_browser_process->rappor_service()), 3076 g_browser_process->rappor_service()),
3075 ui_task_runner); 3077 ui_task_runner);
3076 if (NetBenchmarking::CheckBenchmarkingEnabled()) { 3078 if (NetBenchmarking::CheckBenchmarkingEnabled()) {
3077 Profile* profile = 3079 Profile* profile =
3078 Profile::FromBrowserContext(render_process_host->GetBrowserContext()); 3080 Profile::FromBrowserContext(render_process_host->GetBrowserContext());
3079 net::URLRequestContextGetter* context = 3081 net::URLRequestContextGetter* context =
3080 render_process_host->GetStoragePartition()->GetURLRequestContext(); 3082 render_process_host->GetStoragePartition()->GetURLRequestContext();
3081 registry->AddInterface( 3083 registry->AddInterface(
3082 base::Bind(&NetBenchmarking::Create, profile, context)); 3084 base::Bind(&NetBenchmarking::Create, profile, context));
3083 } 3085 }
3086
3087 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
3088 switches::kEnableNetworkService)) {
3089 registry->AddInterface(
3090 base::Bind(
3091 &safe_browsing::SafeBrowsingImpl::Create,
3092 g_browser_process->safe_browsing_service()->database_manager(),
3093 g_browser_process->safe_browsing_service()->ui_manager(),
3094 render_process_host->GetID()),
3095 BrowserThread::GetTaskRunnerForThread(BrowserThread::IO));
3096 }
3097
3084 #if defined(OS_WIN) 3098 #if defined(OS_WIN)
3085 if (base::FeatureList::IsEnabled(features::kModuleDatabase)) { 3099 if (base::FeatureList::IsEnabled(features::kModuleDatabase)) {
3086 // Add the ModuleDatabase interface. This is the interface used by renderer 3100 // Add the ModuleDatabase interface. This is the interface used by renderer
3087 // processes to notify the browser of modules in their address space. It 3101 // processes to notify the browser of modules in their address space. It
3088 // ultimately drives the chrome://conflicts UI. The process handle is not 3102 // ultimately drives the chrome://conflicts UI. The process handle is not
3089 // yet available at this point so pass in a callback to allow it to be 3103 // yet available at this point so pass in a callback to allow it to be
3090 // retrieved at the time the interface is actually created. It is safe to 3104 // retrieved at the time the interface is actually created. It is safe to
3091 // pass a raw pointer to |render_process_host|: the callback will be invoked 3105 // pass a raw pointer to |render_process_host|: the callback will be invoked
3092 // in the context of ModuleDatabase::GetInstance, which is invoked by Mojo 3106 // in the context of ModuleDatabase::GetInstance, which is invoked by Mojo
3093 // initialization, which occurs while the |render_process_host| is alive. 3107 // initialization, which occurs while the |render_process_host| is alive.
(...skipping 488 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