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

Side by Side Diff: chrome/browser/ui/tab_helpers.cc

Issue 1905033002: PlzNavigate: Move navigation-level mixed content checks to the browser. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@console-security-message
Patch Set: Rebase after 3 spin off CLs landed. Created 4 years 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/ui/tab_helpers.h" 5 #include "chrome/browser/ui/tab_helpers.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
11 #include "build/build_config.h" 11 #include "build/build_config.h"
12 #include "chrome/browser/bookmarks/bookmark_model_factory.h" 12 #include "chrome/browser/bookmarks/bookmark_model_factory.h"
13 #include "chrome/browser/browser_process.h" 13 #include "chrome/browser/browser_process.h"
14 #include "chrome/browser/content_settings/mixed_content_settings.h"
14 #include "chrome/browser/content_settings/tab_specific_content_settings.h" 15 #include "chrome/browser/content_settings/tab_specific_content_settings.h"
15 #include "chrome/browser/data_use_measurement/data_use_web_contents_observer.h" 16 #include "chrome/browser/data_use_measurement/data_use_web_contents_observer.h"
16 #include "chrome/browser/engagement/site_engagement_helper.h" 17 #include "chrome/browser/engagement/site_engagement_helper.h"
17 #include "chrome/browser/engagement/site_engagement_service.h" 18 #include "chrome/browser/engagement/site_engagement_service.h"
18 #include "chrome/browser/external_protocol/external_protocol_observer.h" 19 #include "chrome/browser/external_protocol/external_protocol_observer.h"
19 #include "chrome/browser/favicon/favicon_utils.h" 20 #include "chrome/browser/favicon/favicon_utils.h"
20 #include "chrome/browser/history/history_tab_helper.h" 21 #include "chrome/browser/history/history_tab_helper.h"
21 #include "chrome/browser/history/top_sites_factory.h" 22 #include "chrome/browser/history/top_sites_factory.h"
22 #include "chrome/browser/infobars/infobar_service.h" 23 #include "chrome/browser/infobars/infobar_service.h"
23 #include "chrome/browser/metrics/desktop_session_duration/desktop_session_durati on_observer.h" 24 #include "chrome/browser/metrics/desktop_session_duration/desktop_session_durati on_observer.h"
(...skipping 30 matching lines...) Expand all
54 #include "components/autofill/content/browser/content_autofill_driver_factory.h" 55 #include "components/autofill/content/browser/content_autofill_driver_factory.h"
55 #include "components/autofill/core/browser/autofill_manager.h" 56 #include "components/autofill/core/browser/autofill_manager.h"
56 #include "components/dom_distiller/content/browser/web_contents_main_frame_obser ver.h" 57 #include "components/dom_distiller/content/browser/web_contents_main_frame_obser ver.h"
57 #include "components/dom_distiller/core/dom_distiller_switches.h" 58 #include "components/dom_distiller/core/dom_distiller_switches.h"
58 #include "components/history/content/browser/web_contents_top_sites_observer.h" 59 #include "components/history/content/browser/web_contents_top_sites_observer.h"
59 #include "components/history/core/browser/top_sites.h" 60 #include "components/history/core/browser/top_sites.h"
60 #include "components/password_manager/core/browser/password_manager.h" 61 #include "components/password_manager/core/browser/password_manager.h"
61 #include "components/subresource_filter/content/browser/content_subresource_filt er_driver_factory.h" 62 #include "components/subresource_filter/content/browser/content_subresource_filt er_driver_factory.h"
62 #include "components/tracing/common/tracing_switches.h" 63 #include "components/tracing/common/tracing_switches.h"
63 #include "content/public/browser/web_contents.h" 64 #include "content/public/browser/web_contents.h"
65 #include "content/public/common/browser_side_navigation_policy.h"
64 #include "extensions/features/features.h" 66 #include "extensions/features/features.h"
65 #include "printing/features/features.h" 67 #include "printing/features/features.h"
66 68
67 #if BUILDFLAG(ANDROID_JAVA_UI) 69 #if BUILDFLAG(ANDROID_JAVA_UI)
68 #include "chrome/browser/android/banners/app_banner_manager_android.h" 70 #include "chrome/browser/android/banners/app_banner_manager_android.h"
69 #include "chrome/browser/android/data_usage/data_use_tab_helper.h" 71 #include "chrome/browser/android/data_usage/data_use_tab_helper.h"
70 #include "chrome/browser/android/offline_pages/offline_page_tab_helper.h" 72 #include "chrome/browser/android/offline_pages/offline_page_tab_helper.h"
71 #include "chrome/browser/android/offline_pages/recent_tab_helper.h" 73 #include "chrome/browser/android/offline_pages/recent_tab_helper.h"
72 #include "chrome/browser/android/search_geolocation_disclosure_tab_helper.h" 74 #include "chrome/browser/android/search_geolocation_disclosure_tab_helper.h"
73 #include "chrome/browser/android/voice_search_tab_helper.h" 75 #include "chrome/browser/android/voice_search_tab_helper.h"
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 SecurityStateTabHelper::CreateForWebContents(web_contents); 194 SecurityStateTabHelper::CreateForWebContents(web_contents);
193 if (SiteEngagementService::IsEnabled()) 195 if (SiteEngagementService::IsEnabled())
194 SiteEngagementService::Helper::CreateForWebContents(web_contents); 196 SiteEngagementService::Helper::CreateForWebContents(web_contents);
195 std::unique_ptr<ChromeSubresourceFilterClient> subresource_filter_client( 197 std::unique_ptr<ChromeSubresourceFilterClient> subresource_filter_client(
196 new ChromeSubresourceFilterClient(web_contents)); 198 new ChromeSubresourceFilterClient(web_contents));
197 subresource_filter::ContentSubresourceFilterDriverFactory:: 199 subresource_filter::ContentSubresourceFilterDriverFactory::
198 CreateForWebContents(web_contents, std::move(subresource_filter_client)); 200 CreateForWebContents(web_contents, std::move(subresource_filter_client));
199 // TODO(vabr): Remove TabSpecificContentSettings from here once their function 201 // TODO(vabr): Remove TabSpecificContentSettings from here once their function
200 // is taken over by ChromeContentSettingsClient. http://crbug.com/387075 202 // is taken over by ChromeContentSettingsClient. http://crbug.com/387075
201 TabSpecificContentSettings::CreateForWebContents(web_contents); 203 TabSpecificContentSettings::CreateForWebContents(web_contents);
204 if (content::IsBrowserSideNavigationEnabled())
205 MixedContentSettings::CreateForWebContents(web_contents);
202 206
203 // --- Platform-specific tab helpers --- 207 // --- Platform-specific tab helpers ---
204 208
205 #if BUILDFLAG(ANDROID_JAVA_UI) 209 #if BUILDFLAG(ANDROID_JAVA_UI)
206 banners::AppBannerManagerAndroid::CreateForWebContents(web_contents); 210 banners::AppBannerManagerAndroid::CreateForWebContents(web_contents);
207 ContextMenuHelper::CreateForWebContents(web_contents); 211 ContextMenuHelper::CreateForWebContents(web_contents);
208 DataUseTabHelper::CreateForWebContents(web_contents); 212 DataUseTabHelper::CreateForWebContents(web_contents);
209 213
210 offline_pages::OfflinePageTabHelper::CreateForWebContents(web_contents); 214 offline_pages::OfflinePageTabHelper::CreateForWebContents(web_contents);
211 offline_pages::RecentTabHelper::CreateForWebContents(web_contents); 215 offline_pages::RecentTabHelper::CreateForWebContents(web_contents);
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 277
274 if (predictors::ResourcePrefetchPredictorFactory::GetForProfile( 278 if (predictors::ResourcePrefetchPredictorFactory::GetForProfile(
275 web_contents->GetBrowserContext())) { 279 web_contents->GetBrowserContext())) {
276 predictors::ResourcePrefetchPredictorTabHelper::CreateForWebContents( 280 predictors::ResourcePrefetchPredictorTabHelper::CreateForWebContents(
277 web_contents); 281 web_contents);
278 } 282 }
279 283
280 if (tracing::NavigationTracingObserver::IsEnabled()) 284 if (tracing::NavigationTracingObserver::IsEnabled())
281 tracing::NavigationTracingObserver::CreateForWebContents(web_contents); 285 tracing::NavigationTracingObserver::CreateForWebContents(web_contents);
282 } 286 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698