| 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 <list> | 5 #include <list> |
| 6 | 6 |
| 7 #include "base/run_loop.h" | 7 #include "base/run_loop.h" |
| 8 #include "chrome/browser/interstitials/chrome_controller_client.h" | 8 #include "chrome/browser/interstitials/chrome_controller_client.h" |
| 9 #include "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
| 10 #include "chrome/browser/safe_browsing/safe_browsing_blocking_page.h" | 10 #include "chrome/browser/safe_browsing/safe_browsing_blocking_page.h" |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 bool is_extended_reporting_opt_in_allowed = | 79 bool is_extended_reporting_opt_in_allowed = |
| 80 prefs->GetBoolean(prefs::kSafeBrowsingExtendedReportingOptInAllowed); | 80 prefs->GetBoolean(prefs::kSafeBrowsingExtendedReportingOptInAllowed); |
| 81 bool is_proceed_anyway_disabled = | 81 bool is_proceed_anyway_disabled = |
| 82 prefs->GetBoolean(prefs::kSafeBrowsingProceedAnywayDisabled); | 82 prefs->GetBoolean(prefs::kSafeBrowsingProceedAnywayDisabled); |
| 83 BaseSafeBrowsingErrorUI::SBErrorDisplayOptions display_options( | 83 BaseSafeBrowsingErrorUI::SBErrorDisplayOptions display_options( |
| 84 BaseBlockingPage::IsMainPageLoadBlocked(unsafe_resources), | 84 BaseBlockingPage::IsMainPageLoadBlocked(unsafe_resources), |
| 85 is_extended_reporting_opt_in_allowed, | 85 is_extended_reporting_opt_in_allowed, |
| 86 web_contents->GetBrowserContext()->IsOffTheRecord(), | 86 web_contents->GetBrowserContext()->IsOffTheRecord(), |
| 87 IsExtendedReportingEnabled(*prefs), IsScout(*prefs), | 87 IsExtendedReportingEnabled(*prefs), IsScout(*prefs), |
| 88 is_proceed_anyway_disabled, | 88 is_proceed_anyway_disabled, |
| 89 BaseBlockingPage::IsMainPageLoadBlocked(unsafe_resources)); | 89 BaseBlockingPage::IsMainPageLoadBlocked(unsafe_resources), |
| 90 nullptr); |
| 90 return new TestSafeBrowsingBlockingPage(manager, web_contents, | 91 return new TestSafeBrowsingBlockingPage(manager, web_contents, |
| 91 main_frame_url, unsafe_resources, | 92 main_frame_url, unsafe_resources, |
| 92 display_options); | 93 display_options); |
| 93 } | 94 } |
| 94 }; | 95 }; |
| 95 | 96 |
| 96 class MockTestingProfile : public TestingProfile { | 97 class MockTestingProfile : public TestingProfile { |
| 97 public: | 98 public: |
| 98 MockTestingProfile() {} | 99 MockTestingProfile() {} |
| 99 virtual ~MockTestingProfile() {} | 100 virtual ~MockTestingProfile() {} |
| (...skipping 689 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 789 // The interstitial should be gone. | 790 // The interstitial should be gone. |
| 790 EXPECT_EQ(CANCEL, user_response()); | 791 EXPECT_EQ(CANCEL, user_response()); |
| 791 EXPECT_FALSE(GetSafeBrowsingBlockingPage()); | 792 EXPECT_FALSE(GetSafeBrowsingBlockingPage()); |
| 792 | 793 |
| 793 // No report should have been sent. | 794 // No report should have been sent. |
| 794 EXPECT_EQ(0u, ui_manager_->GetThreatDetails()->size()); | 795 EXPECT_EQ(0u, ui_manager_->GetThreatDetails()->size()); |
| 795 ui_manager_->GetThreatDetails()->clear(); | 796 ui_manager_->GetThreatDetails()->clear(); |
| 796 } | 797 } |
| 797 | 798 |
| 798 } // namespace safe_browsing | 799 } // namespace safe_browsing |
| OLD | NEW |