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 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
355 | 355 |
356 int BaseBlockingPage::GetHTMLTemplateId() { | 356 int BaseBlockingPage::GetHTMLTemplateId() { |
357 return sb_error_ui_->GetHTMLTemplateId(); | 357 return sb_error_ui_->GetHTMLTemplateId(); |
358 } | 358 } |
359 | 359 |
360 void BaseBlockingPage::set_sb_error_ui( | 360 void BaseBlockingPage::set_sb_error_ui( |
361 std::unique_ptr<BaseSafeBrowsingErrorUI> sb_error_ui) { | 361 std::unique_ptr<BaseSafeBrowsingErrorUI> sb_error_ui) { |
362 sb_error_ui_ = std::move(sb_error_ui); | 362 sb_error_ui_ = std::move(sb_error_ui); |
363 } | 363 } |
364 | 364 |
| 365 // static |
| 366 bool BaseBlockingPage::ShouldReportThreatDetails(SBThreatType threat_type) { |
| 367 return threat_type == SB_THREAT_TYPE_URL_PHISHING || |
| 368 threat_type == SB_THREAT_TYPE_URL_MALWARE || |
| 369 threat_type == SB_THREAT_TYPE_URL_UNWANTED || |
| 370 threat_type == SB_THREAT_TYPE_URL_CLIENT_SIDE_PHISHING || |
| 371 threat_type == SB_THREAT_TYPE_URL_CLIENT_SIDE_MALWARE || |
| 372 threat_type == SB_THREAT_TYPE_URL_PASSWORD_PROTECTION_PHISHING; |
| 373 } |
| 374 |
365 } // namespace safe_browsing | 375 } // namespace safe_browsing |
OLD | NEW |