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 // 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 <string> | 9 #include <string> |
10 | 10 |
(...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
488 if (!factory_) | 488 if (!factory_) |
489 factory_ = g_safe_browsing_blocking_page_factory_impl.Pointer(); | 489 factory_ = g_safe_browsing_blocking_page_factory_impl.Pointer(); |
490 return factory_->CreateSafeBrowsingPage(ui_manager, web_contents, | 490 return factory_->CreateSafeBrowsingPage(ui_manager, web_contents, |
491 main_frame_url, resources); | 491 main_frame_url, resources); |
492 } | 492 } |
493 | 493 |
494 // static | 494 // static |
495 void SafeBrowsingBlockingPage::ShowBlockingPage( | 495 void SafeBrowsingBlockingPage::ShowBlockingPage( |
496 SafeBrowsingUIManager* ui_manager, | 496 SafeBrowsingUIManager* ui_manager, |
497 const UnsafeResource& unsafe_resource) { | 497 const UnsafeResource& unsafe_resource) { |
498 DVLOG(1) << __FUNCTION__ << " " << unsafe_resource.url.spec(); | 498 DVLOG(1) << __func__ << " " << unsafe_resource.url.spec(); |
499 WebContents* web_contents = tab_util::GetWebContentsByFrameID( | 499 WebContents* web_contents = tab_util::GetWebContentsByFrameID( |
500 unsafe_resource.render_process_host_id, unsafe_resource.render_frame_id); | 500 unsafe_resource.render_process_host_id, unsafe_resource.render_frame_id); |
501 | 501 |
502 InterstitialPage* interstitial = | 502 InterstitialPage* interstitial = |
503 InterstitialPage::GetInterstitialPage(web_contents); | 503 InterstitialPage::GetInterstitialPage(web_contents); |
504 if (interstitial && !unsafe_resource.is_subresource) { | 504 if (interstitial && !unsafe_resource.is_subresource) { |
505 // There is already an interstitial showing and we are about to display a | 505 // There is already an interstitial showing and we are about to display a |
506 // new one for the main frame. Just hide the current one, it is now | 506 // new one for the main frame. Just hide the current one, it is now |
507 // irrelevent | 507 // irrelevent |
508 interstitial->DontProceed(); | 508 interstitial->DontProceed(); |
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
755 } else { | 755 } else { |
756 load_time_data->SetString( | 756 load_time_data->SetString( |
757 "finalParagraph", | 757 "finalParagraph", |
758 l10n_util::GetStringUTF16(IDS_PHISHING_V3_PROCEED_PARAGRAPH)); | 758 l10n_util::GetStringUTF16(IDS_PHISHING_V3_PROCEED_PARAGRAPH)); |
759 } | 759 } |
760 | 760 |
761 PopulateExtendedReportingOption(load_time_data); | 761 PopulateExtendedReportingOption(load_time_data); |
762 } | 762 } |
763 | 763 |
764 } // namespace safe_browsing | 764 } // namespace safe_browsing |
OLD | NEW |