OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 "components/safe_browsing/base_blocking_page.h" | 5 #include "components/safe_browsing/base_blocking_page.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/lazy_instance.h" | 8 #include "base/lazy_instance.h" |
9 #include "base/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
10 #include "base/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 } | 68 } |
69 | 69 |
70 BaseBlockingPage::~BaseBlockingPage() {} | 70 BaseBlockingPage::~BaseBlockingPage() {} |
71 | 71 |
72 // static | 72 // static |
73 const security_interstitials::BaseSafeBrowsingErrorUI::SBErrorDisplayOptions | 73 const security_interstitials::BaseSafeBrowsingErrorUI::SBErrorDisplayOptions |
74 BaseBlockingPage::CreateDefaultDisplayOptions( | 74 BaseBlockingPage::CreateDefaultDisplayOptions( |
75 const UnsafeResourceList& unsafe_resources) { | 75 const UnsafeResourceList& unsafe_resources) { |
76 return BaseSafeBrowsingErrorUI::SBErrorDisplayOptions( | 76 return BaseSafeBrowsingErrorUI::SBErrorDisplayOptions( |
77 IsMainPageLoadBlocked(unsafe_resources), | 77 IsMainPageLoadBlocked(unsafe_resources), |
78 false, // kSafeBrowsingExtendedReportingOptInAllowed | 78 false, // kSafeBrowsingExtendedReportingOptInAllowed |
79 false, // is_off_the_record | 79 false, // is_off_the_record |
80 false, // is_extended_reporting | 80 false, // is_extended_reporting |
81 false, // is_scout | 81 false, // is_scout |
82 false, // kSafeBrowsingProceedAnywayDisabled | 82 false, // kSafeBrowsingProceedAnywayDisabled |
83 true); // is_resource_cancellable | 83 true, // is_resource_cancellable |
| 84 "cpn_safe_browsing"); // help_center_article_link |
84 } | 85 } |
85 | 86 |
86 // static | 87 // static |
87 void BaseBlockingPage::ShowBlockingPage( | 88 void BaseBlockingPage::ShowBlockingPage( |
88 BaseUIManager* ui_manager, | 89 BaseUIManager* ui_manager, |
89 const UnsafeResource& unsafe_resource) { | 90 const UnsafeResource& unsafe_resource) { |
90 WebContents* web_contents = unsafe_resource.web_contents_getter.Run(); | 91 WebContents* web_contents = unsafe_resource.web_contents_getter.Run(); |
91 | 92 |
92 if (InterstitialPage::GetInterstitialPage(web_contents) && | 93 if (InterstitialPage::GetInterstitialPage(web_contents) && |
93 unsafe_resource.is_subresource) { | 94 unsafe_resource.is_subresource) { |
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
344 base::MakeUnique<security_interstitials::MetricsHelper>( | 345 base::MakeUnique<security_interstitials::MetricsHelper>( |
345 unsafe_resources[0].url, GetReportingInfo(unsafe_resources), | 346 unsafe_resources[0].url, GetReportingInfo(unsafe_resources), |
346 history_service); | 347 history_service); |
347 | 348 |
348 return base::MakeUnique<SecurityInterstitialControllerClient>( | 349 return base::MakeUnique<SecurityInterstitialControllerClient>( |
349 web_contents, std::move(metrics_helper), nullptr, /* prefs */ | 350 web_contents, std::move(metrics_helper), nullptr, /* prefs */ |
350 ui_manager->app_locale(), ui_manager->default_safe_page()); | 351 ui_manager->app_locale(), ui_manager->default_safe_page()); |
351 } | 352 } |
352 | 353 |
353 } // namespace safe_browsing | 354 } // namespace safe_browsing |
OLD | NEW |