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

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
« no previous file with comments | « chrome/browser/BUILD.gn ('k') | chrome/browser/chrome_content_browser_manifest_overlay.json » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/mojo_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 2991 matching lines...) Expand 10 before | Expand all | Expand 10 after
3078 g_browser_process->rappor_service()), 3080 g_browser_process->rappor_service()),
3079 ui_task_runner); 3081 ui_task_runner);
3080 if (NetBenchmarking::CheckBenchmarkingEnabled()) { 3082 if (NetBenchmarking::CheckBenchmarkingEnabled()) {
3081 Profile* profile = 3083 Profile* profile =
3082 Profile::FromBrowserContext(render_process_host->GetBrowserContext()); 3084 Profile::FromBrowserContext(render_process_host->GetBrowserContext());
3083 net::URLRequestContextGetter* context = 3085 net::URLRequestContextGetter* context =
3084 render_process_host->GetStoragePartition()->GetURLRequestContext(); 3086 render_process_host->GetStoragePartition()->GetURLRequestContext();
3085 registry->AddInterface( 3087 registry->AddInterface(
3086 base::Bind(&NetBenchmarking::Create, profile, context)); 3088 base::Bind(&NetBenchmarking::Create, profile, context));
3087 } 3089 }
3090
3091 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
3092 switches::kEnableNetworkService)) {
3093 registry->AddInterface(
3094 base::Bind(
3095 &safe_browsing::MojoSafeBrowsingImpl::Create,
3096 g_browser_process->safe_browsing_service()->database_manager(),
3097 g_browser_process->safe_browsing_service()->ui_manager(),
3098 render_process_host->GetID()),
3099 BrowserThread::GetTaskRunnerForThread(BrowserThread::IO));
3100 }
3101
3088 #if defined(OS_WIN) 3102 #if defined(OS_WIN)
3089 if (base::FeatureList::IsEnabled(features::kModuleDatabase)) { 3103 if (base::FeatureList::IsEnabled(features::kModuleDatabase)) {
3090 // Add the ModuleDatabase interface. This is the interface used by renderer 3104 // Add the ModuleDatabase interface. This is the interface used by renderer
3091 // processes to notify the browser of modules in their address space. It 3105 // processes to notify the browser of modules in their address space. It
3092 // ultimately drives the chrome://conflicts UI. The process handle is not 3106 // ultimately drives the chrome://conflicts UI. The process handle is not
3093 // yet available at this point so pass in a callback to allow it to be 3107 // yet available at this point so pass in a callback to allow it to be
3094 // retrieved at the time the interface is actually created. It is safe to 3108 // retrieved at the time the interface is actually created. It is safe to
3095 // pass a raw pointer to |render_process_host|: the callback will be invoked 3109 // pass a raw pointer to |render_process_host|: the callback will be invoked
3096 // in the context of ModuleDatabase::GetInstance, which is invoked by Mojo 3110 // in the context of ModuleDatabase::GetInstance, which is invoked by Mojo
3097 // initialization, which occurs while the |render_process_host| is alive. 3111 // initialization, which occurs while the |render_process_host| is alive.
(...skipping 484 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
« no previous file with comments | « chrome/browser/BUILD.gn ('k') | chrome/browser/chrome_content_browser_manifest_overlay.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698