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

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

Issue 2858483003: [subresource_filter] Move throttle insertion into the client (Closed)
Patch Set: fix rebase 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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 #include "chrome/browser/search/instant_service.h" 77 #include "chrome/browser/search/instant_service.h"
78 #include "chrome/browser/search/instant_service_factory.h" 78 #include "chrome/browser/search/instant_service_factory.h"
79 #include "chrome/browser/search/search.h" 79 #include "chrome/browser/search/search.h"
80 #include "chrome/browser/speech/chrome_speech_recognition_manager_delegate.h" 80 #include "chrome/browser/speech/chrome_speech_recognition_manager_delegate.h"
81 #include "chrome/browser/speech/tts_controller.h" 81 #include "chrome/browser/speech/tts_controller.h"
82 #include "chrome/browser/speech/tts_message_filter.h" 82 #include "chrome/browser/speech/tts_message_filter.h"
83 #include "chrome/browser/ssl/ssl_blocking_page.h" 83 #include "chrome/browser/ssl/ssl_blocking_page.h"
84 #include "chrome/browser/ssl/ssl_cert_reporter.h" 84 #include "chrome/browser/ssl/ssl_cert_reporter.h"
85 #include "chrome/browser/ssl/ssl_client_certificate_selector.h" 85 #include "chrome/browser/ssl/ssl_client_certificate_selector.h"
86 #include "chrome/browser/ssl/ssl_error_handler.h" 86 #include "chrome/browser/ssl/ssl_error_handler.h"
87 #include "chrome/browser/subresource_filter/navigation_throttle_util.h" 87 #include "chrome/browser/subresource_filter/chrome_subresource_filter_client.h"
88 #include "chrome/browser/sync_file_system/local/sync_file_system_backend.h" 88 #include "chrome/browser/sync_file_system/local/sync_file_system_backend.h"
89 #include "chrome/browser/tab_contents/tab_util.h" 89 #include "chrome/browser/tab_contents/tab_util.h"
90 #include "chrome/browser/tracing/chrome_tracing_delegate.h" 90 #include "chrome/browser/tracing/chrome_tracing_delegate.h"
91 #include "chrome/browser/translate/chrome_translate_client.h" 91 #include "chrome/browser/translate/chrome_translate_client.h"
92 #include "chrome/browser/ui/blocked_content/blocked_window_params.h" 92 #include "chrome/browser/ui/blocked_content/blocked_window_params.h"
93 #include "chrome/browser/ui/blocked_content/popup_blocker_tab_helper.h" 93 #include "chrome/browser/ui/blocked_content/popup_blocker_tab_helper.h"
94 #include "chrome/browser/ui/browser_navigator.h" 94 #include "chrome/browser/ui/browser_navigator.h"
95 #include "chrome/browser/ui/browser_navigator_params.h" 95 #include "chrome/browser/ui/browser_navigator_params.h"
96 #include "chrome/browser/ui/chrome_select_file_policy.h" 96 #include "chrome/browser/ui/chrome_select_file_policy.h"
97 #include "chrome/browser/ui/sync/sync_promo_ui.h" 97 #include "chrome/browser/ui/sync/sync_promo_ui.h"
(...skipping 3367 matching lines...) Expand 10 before | Expand all | Expand 10 after
3465 SupervisedUserGoogleAuthNavigationThrottle::MaybeCreate(handle); 3465 SupervisedUserGoogleAuthNavigationThrottle::MaybeCreate(handle);
3466 if (supervised_user_nav_throttle) 3466 if (supervised_user_nav_throttle)
3467 throttles.push_back(std::move(supervised_user_nav_throttle)); 3467 throttles.push_back(std::move(supervised_user_nav_throttle));
3468 #endif 3468 #endif
3469 3469
3470 std::unique_ptr<content::NavigationThrottle> delay_navigation_throttle = 3470 std::unique_ptr<content::NavigationThrottle> delay_navigation_throttle =
3471 DelayNavigationThrottle::MaybeCreateThrottleFor(handle); 3471 DelayNavigationThrottle::MaybeCreateThrottleFor(handle);
3472 if (delay_navigation_throttle) 3472 if (delay_navigation_throttle)
3473 throttles.push_back(std::move(delay_navigation_throttle)); 3473 throttles.push_back(std::move(delay_navigation_throttle));
3474 3474
3475 content::NavigationThrottle* subresource_filter_activation_throttle =
3476 MaybeCreateSubresourceFilterNavigationThrottle(
3477 handle, g_browser_process->safe_browsing_service());
3478 if (subresource_filter_activation_throttle) {
3479 throttles.push_back(
3480 base::WrapUnique(subresource_filter_activation_throttle));
3481 }
3482
3483 // These throttles must come after the
3484 // SubresourceFilterSafeBrowsingActivationThrottle.
3485 content::WebContents* web_contents = handle->GetWebContents(); 3475 content::WebContents* web_contents = handle->GetWebContents();
3486 if (auto* factory = 3476 if (auto* subresource_filter_client =
3487 subresource_filter::ContentSubresourceFilterDriverFactory:: 3477 ChromeSubresourceFilterClient::FromWebContents(web_contents)) {
3488 FromWebContents(web_contents)) { 3478 subresource_filter_client->MaybeAppendNavigationThrottles(handle,
3489 factory->throttle_manager()->MaybeAppendNavigationThrottles(handle, 3479 &throttles);
3490 &throttles);
3491 } 3480 }
3492 3481
3493 return throttles; 3482 return throttles;
3494 } 3483 }
3495 3484
3496 std::unique_ptr<content::NavigationUIData> 3485 std::unique_ptr<content::NavigationUIData>
3497 ChromeContentBrowserClient::GetNavigationUIData( 3486 ChromeContentBrowserClient::GetNavigationUIData(
3498 content::NavigationHandle* navigation_handle) { 3487 content::NavigationHandle* navigation_handle) {
3499 return base::MakeUnique<ChromeNavigationUIData>(navigation_handle); 3488 return base::MakeUnique<ChromeNavigationUIData>(navigation_handle);
3500 } 3489 }
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
3611 RedirectNonUINonIOBrowserThreadsToTaskScheduler() { 3600 RedirectNonUINonIOBrowserThreadsToTaskScheduler() {
3612 return variations::GetVariationParamValue( 3601 return variations::GetVariationParamValue(
3613 "BrowserScheduler", "RedirectNonUINonIOBrowserThreads") == "true"; 3602 "BrowserScheduler", "RedirectNonUINonIOBrowserThreads") == "true";
3614 } 3603 }
3615 3604
3616 // static 3605 // static
3617 void ChromeContentBrowserClient::SetDefaultQuotaSettingsForTesting( 3606 void ChromeContentBrowserClient::SetDefaultQuotaSettingsForTesting(
3618 const storage::QuotaSettings* settings) { 3607 const storage::QuotaSettings* settings) {
3619 g_default_quota_settings = settings; 3608 g_default_quota_settings = settings;
3620 } 3609 }
OLDNEW
« no previous file with comments | « chrome/browser/BUILD.gn ('k') | chrome/browser/subresource_filter/chrome_subresource_filter_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698