OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/safe_browsing/ui_manager.h" | 5 #include "chrome/browser/safe_browsing/ui_manager.h" |
6 | 6 |
7 #include "base/run_loop.h" | 7 #include "base/run_loop.h" |
8 #include "chrome/browser/safe_browsing/safe_browsing_blocking_page.h" | 8 #include "chrome/browser/safe_browsing/safe_browsing_blocking_page.h" |
9 #include "chrome/browser/safe_browsing/safe_browsing_service.h" | 9 #include "chrome/browser/safe_browsing/safe_browsing_service.h" |
10 #include "chrome/browser/safe_browsing/ui_manager.h" | 10 #include "chrome/browser/safe_browsing/ui_manager.h" |
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
339 content::WebContents* web_contents, | 339 content::WebContents* web_contents, |
340 const GURL& main_frame_url, | 340 const GURL& main_frame_url, |
341 const UnsafeResourceList& unsafe_resources) | 341 const UnsafeResourceList& unsafe_resources) |
342 : SafeBrowsingBlockingPage( | 342 : SafeBrowsingBlockingPage( |
343 manager, | 343 manager, |
344 web_contents, | 344 web_contents, |
345 main_frame_url, | 345 main_frame_url, |
346 unsafe_resources, | 346 unsafe_resources, |
347 BaseSafeBrowsingErrorUI::SBErrorDisplayOptions( | 347 BaseSafeBrowsingErrorUI::SBErrorDisplayOptions( |
348 BaseBlockingPage::IsMainPageLoadBlocked(unsafe_resources), | 348 BaseBlockingPage::IsMainPageLoadBlocked(unsafe_resources), |
349 false, | 349 false, // is_extended_reporting_opt_in_allowed |
350 false, | 350 false, // is_off_the_record |
351 false, | 351 false, // is_extended_reporting_enabled |
352 false, | 352 false, // is_scout_reporting_enabled |
353 false, | 353 false, // is_proceed_anyway_disabled |
354 BaseBlockingPage::IsMainPageLoadBlocked(unsafe_resources))) { | 354 BaseBlockingPage::IsMainPageLoadBlocked(unsafe_resources), |
| 355 "cpn_safe_browsing")) { // help_center_article_link |
355 // Don't delay details at all for the unittest. | 356 // Don't delay details at all for the unittest. |
356 SetThreatDetailsProceedDelayForTesting(0); | 357 SetThreatDetailsProceedDelayForTesting(0); |
357 DontCreateViewForTesting(); | 358 DontCreateViewForTesting(); |
358 } | 359 } |
359 }; | 360 }; |
360 | 361 |
361 // A factory that creates TestSafeBrowsingBlockingPages. | 362 // A factory that creates TestSafeBrowsingBlockingPages. |
362 class TestSafeBrowsingBlockingPageFactory | 363 class TestSafeBrowsingBlockingPageFactory |
363 : public SafeBrowsingBlockingPageFactory { | 364 : public SafeBrowsingBlockingPageFactory { |
364 public: | 365 public: |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
414 SimulateBlockingPageDone(resources, true); | 415 SimulateBlockingPageDone(resources, true); |
415 EXPECT_TRUE(delegate.visible_security_state_changed()); | 416 EXPECT_TRUE(delegate.visible_security_state_changed()); |
416 | 417 |
417 waiter.WaitForCallback(); | 418 waiter.WaitForCallback(); |
418 EXPECT_TRUE(waiter.callback_called()); | 419 EXPECT_TRUE(waiter.callback_called()); |
419 EXPECT_TRUE(waiter.proceed()); | 420 EXPECT_TRUE(waiter.proceed()); |
420 EXPECT_TRUE(IsWhitelisted(resource)); | 421 EXPECT_TRUE(IsWhitelisted(resource)); |
421 } | 422 } |
422 | 423 |
423 } // namespace safe_browsing | 424 } // namespace safe_browsing |
OLD | NEW |