| 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/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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 #include "chrome/browser/search/instant_service.h" | 75 #include "chrome/browser/search/instant_service.h" |
| 76 #include "chrome/browser/search/instant_service_factory.h" | 76 #include "chrome/browser/search/instant_service_factory.h" |
| 77 #include "chrome/browser/search/search.h" | 77 #include "chrome/browser/search/search.h" |
| 78 #include "chrome/browser/speech/chrome_speech_recognition_manager_delegate.h" | 78 #include "chrome/browser/speech/chrome_speech_recognition_manager_delegate.h" |
| 79 #include "chrome/browser/speech/tts_controller.h" | 79 #include "chrome/browser/speech/tts_controller.h" |
| 80 #include "chrome/browser/speech/tts_message_filter.h" | 80 #include "chrome/browser/speech/tts_message_filter.h" |
| 81 #include "chrome/browser/ssl/ssl_blocking_page.h" | 81 #include "chrome/browser/ssl/ssl_blocking_page.h" |
| 82 #include "chrome/browser/ssl/ssl_cert_reporter.h" | 82 #include "chrome/browser/ssl/ssl_cert_reporter.h" |
| 83 #include "chrome/browser/ssl/ssl_client_certificate_selector.h" | 83 #include "chrome/browser/ssl/ssl_client_certificate_selector.h" |
| 84 #include "chrome/browser/ssl/ssl_error_handler.h" | 84 #include "chrome/browser/ssl/ssl_error_handler.h" |
| 85 #include "chrome/browser/subresource_filter/navigation_throttle_util.h" |
| 85 #include "chrome/browser/sync_file_system/local/sync_file_system_backend.h" | 86 #include "chrome/browser/sync_file_system/local/sync_file_system_backend.h" |
| 86 #include "chrome/browser/tab_contents/tab_util.h" | 87 #include "chrome/browser/tab_contents/tab_util.h" |
| 87 #include "chrome/browser/tracing/chrome_tracing_delegate.h" | 88 #include "chrome/browser/tracing/chrome_tracing_delegate.h" |
| 88 #include "chrome/browser/translate/chrome_translate_client.h" | 89 #include "chrome/browser/translate/chrome_translate_client.h" |
| 89 #include "chrome/browser/ui/blocked_content/blocked_window_params.h" | 90 #include "chrome/browser/ui/blocked_content/blocked_window_params.h" |
| 90 #include "chrome/browser/ui/blocked_content/popup_blocker_tab_helper.h" | 91 #include "chrome/browser/ui/blocked_content/popup_blocker_tab_helper.h" |
| 91 #include "chrome/browser/ui/browser_navigator.h" | 92 #include "chrome/browser/ui/browser_navigator.h" |
| 92 #include "chrome/browser/ui/browser_navigator_params.h" | 93 #include "chrome/browser/ui/browser_navigator_params.h" |
| 93 #include "chrome/browser/ui/chrome_select_file_policy.h" | 94 #include "chrome/browser/ui/chrome_select_file_policy.h" |
| 94 #include "chrome/browser/ui/sync/sync_promo_ui.h" | 95 #include "chrome/browser/ui/sync/sync_promo_ui.h" |
| (...skipping 3331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3426 #if BUILDFLAG(ENABLE_EXTENSIONS) | 3427 #if BUILDFLAG(ENABLE_EXTENSIONS) |
| 3427 throttles.push_back( | 3428 throttles.push_back( |
| 3428 base::MakeUnique<extensions::ExtensionNavigationThrottle>(handle)); | 3429 base::MakeUnique<extensions::ExtensionNavigationThrottle>(handle)); |
| 3429 #endif | 3430 #endif |
| 3430 | 3431 |
| 3431 std::unique_ptr<content::NavigationThrottle> delay_navigation_throttle = | 3432 std::unique_ptr<content::NavigationThrottle> delay_navigation_throttle = |
| 3432 DelayNavigationThrottle::MaybeCreateThrottleFor(handle); | 3433 DelayNavigationThrottle::MaybeCreateThrottleFor(handle); |
| 3433 if (delay_navigation_throttle) | 3434 if (delay_navigation_throttle) |
| 3434 throttles.push_back(std::move(delay_navigation_throttle)); | 3435 throttles.push_back(std::move(delay_navigation_throttle)); |
| 3435 | 3436 |
| 3437 content::NavigationThrottle* subresource_filter_activation_throttle = |
| 3438 MaybeCreateSubresourceFilterNavigationThrottle( |
| 3439 handle, g_browser_process->safe_browsing_service()); |
| 3440 if (subresource_filter_activation_throttle) { |
| 3441 throttles.push_back( |
| 3442 base::WrapUnique(subresource_filter_activation_throttle)); |
| 3443 } |
| 3444 |
| 3436 return throttles; | 3445 return throttles; |
| 3437 } | 3446 } |
| 3438 | 3447 |
| 3439 std::unique_ptr<content::NavigationUIData> | 3448 std::unique_ptr<content::NavigationUIData> |
| 3440 ChromeContentBrowserClient::GetNavigationUIData( | 3449 ChromeContentBrowserClient::GetNavigationUIData( |
| 3441 content::NavigationHandle* navigation_handle) { | 3450 content::NavigationHandle* navigation_handle) { |
| 3442 return base::MakeUnique<ChromeNavigationUIData>(navigation_handle); | 3451 return base::MakeUnique<ChromeNavigationUIData>(navigation_handle); |
| 3443 } | 3452 } |
| 3444 | 3453 |
| 3445 content::DevToolsManagerDelegate* | 3454 content::DevToolsManagerDelegate* |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3570 RedirectNonUINonIOBrowserThreadsToTaskScheduler() { | 3579 RedirectNonUINonIOBrowserThreadsToTaskScheduler() { |
| 3571 return variations::GetVariationParamValue( | 3580 return variations::GetVariationParamValue( |
| 3572 "BrowserScheduler", "RedirectNonUINonIOBrowserThreads") == "true"; | 3581 "BrowserScheduler", "RedirectNonUINonIOBrowserThreads") == "true"; |
| 3573 } | 3582 } |
| 3574 | 3583 |
| 3575 // static | 3584 // static |
| 3576 void ChromeContentBrowserClient::SetDefaultQuotaSettingsForTesting( | 3585 void ChromeContentBrowserClient::SetDefaultQuotaSettingsForTesting( |
| 3577 const storage::QuotaSettings* settings) { | 3586 const storage::QuotaSettings* settings) { |
| 3578 g_default_quota_settings = settings; | 3587 g_default_quota_settings = settings; |
| 3579 } | 3588 } |
| OLD | NEW |