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

Side by Side Diff: chrome/browser/safe_browsing/safe_browsing_blocking_page.cc

Issue 2890703002: SafeBrowsing: allow WebView to customize the Help Center URL (Closed)
Patch Set: 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 // Implementation of the SafeBrowsingBlockingPage class. 5 // Implementation of the SafeBrowsingBlockingPage class.
6 6
7 #include "chrome/browser/safe_browsing/safe_browsing_blocking_page.h" 7 #include "chrome/browser/safe_browsing/safe_browsing_blocking_page.h"
8 8
9 #include "base/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "chrome/browser/browser_process.h" 10 #include "chrome/browser/browser_process.h"
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 // interstitial. This must happen before querying IsScout to populate the 69 // interstitial. This must happen before querying IsScout to populate the
70 // Display Options below. 70 // Display Options below.
71 safe_browsing::UpdatePrefsBeforeSecurityInterstitial(prefs); 71 safe_browsing::UpdatePrefsBeforeSecurityInterstitial(prefs);
72 72
73 BaseSafeBrowsingErrorUI::SBErrorDisplayOptions display_options( 73 BaseSafeBrowsingErrorUI::SBErrorDisplayOptions display_options(
74 BaseBlockingPage::IsMainPageLoadBlocked(unsafe_resources), 74 BaseBlockingPage::IsMainPageLoadBlocked(unsafe_resources),
75 is_extended_reporting_opt_in_allowed, 75 is_extended_reporting_opt_in_allowed,
76 web_contents->GetBrowserContext()->IsOffTheRecord(), 76 web_contents->GetBrowserContext()->IsOffTheRecord(),
77 IsExtendedReportingEnabled(*prefs), IsScout(*prefs), 77 IsExtendedReportingEnabled(*prefs), IsScout(*prefs),
78 is_proceed_anyway_disabled, 78 is_proceed_anyway_disabled,
79 BaseBlockingPage::IsMainPageLoadBlocked(unsafe_resources)); 79 BaseBlockingPage::IsMainPageLoadBlocked(unsafe_resources),
80 nullptr);
Jialiu Lin 2017/05/17 15:47:46 nit: some in-line comment will be helpful. e.g.
felt 2017/05/17 15:55:50 I'd prefer to have Chrome pass in the default link
Nate Fischer 2017/05/17 22:34:43 Sure, I went with Felt's suggestion
80 81
81 return new SafeBrowsingBlockingPage(ui_manager, web_contents, 82 return new SafeBrowsingBlockingPage(ui_manager, web_contents,
82 main_frame_url, unsafe_resources, 83 main_frame_url, unsafe_resources,
83 display_options); 84 display_options);
84 } 85 }
85 86
86 private: 87 private:
87 friend struct base::LazyInstanceTraitsBase< 88 friend struct base::LazyInstanceTraitsBase<
88 SafeBrowsingBlockingPageFactoryImpl>; 89 SafeBrowsingBlockingPageFactoryImpl>;
89 90
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 web_contents, unsafe_resources[0].url, 274 web_contents, unsafe_resources[0].url,
274 GetReportingInfo(unsafe_resources), 275 GetReportingInfo(unsafe_resources),
275 GetSamplingEventName(GetInterstitialReason(unsafe_resources))); 276 GetSamplingEventName(GetInterstitialReason(unsafe_resources)));
276 277
277 return base::MakeUnique<SecurityInterstitialControllerClient>( 278 return base::MakeUnique<SecurityInterstitialControllerClient>(
278 web_contents, std::move(metrics_helper), profile->GetPrefs(), 279 web_contents, std::move(metrics_helper), profile->GetPrefs(),
279 ui_manager->app_locale(), ui_manager->default_safe_page()); 280 ui_manager->app_locale(), ui_manager->default_safe_page());
280 } 281 }
281 282
282 } // namespace safe_browsing 283 } // namespace safe_browsing
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698