| 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 17 matching lines...) Expand all Loading... |
| 28 #include "chrome/browser/safe_browsing/threat_details.h" | 28 #include "chrome/browser/safe_browsing/threat_details.h" |
| 29 #include "chrome/browser/safe_browsing/ui_manager.h" | 29 #include "chrome/browser/safe_browsing/ui_manager.h" |
| 30 #include "chrome/browser/tab_contents/tab_util.h" | 30 #include "chrome/browser/tab_contents/tab_util.h" |
| 31 #include "chrome/common/chrome_switches.h" | 31 #include "chrome/common/chrome_switches.h" |
| 32 #include "chrome/common/pref_names.h" | 32 #include "chrome/common/pref_names.h" |
| 33 #include "chrome/common/url_constants.h" | 33 #include "chrome/common/url_constants.h" |
| 34 #include "chrome/grit/generated_resources.h" | 34 #include "chrome/grit/generated_resources.h" |
| 35 #include "chrome/grit/locale_settings.h" | 35 #include "chrome/grit/locale_settings.h" |
| 36 #include "components/google/core/browser/google_util.h" | 36 #include "components/google/core/browser/google_util.h" |
| 37 #include "components/prefs/pref_service.h" | 37 #include "components/prefs/pref_service.h" |
| 38 #include "components/security_interstitials/core/common_string_util.h" |
| 38 #include "components/security_interstitials/core/controller_client.h" | 39 #include "components/security_interstitials/core/controller_client.h" |
| 39 #include "content/public/browser/browser_thread.h" | 40 #include "content/public/browser/browser_thread.h" |
| 40 #include "content/public/browser/interstitial_page.h" | 41 #include "content/public/browser/interstitial_page.h" |
| 41 #include "content/public/browser/navigation_controller.h" | 42 #include "content/public/browser/navigation_controller.h" |
| 42 #include "content/public/browser/navigation_entry.h" | 43 #include "content/public/browser/navigation_entry.h" |
| 43 #include "content/public/browser/user_metrics.h" | 44 #include "content/public/browser/user_metrics.h" |
| 44 #include "content/public/browser/web_contents.h" | 45 #include "content/public/browser/web_contents.h" |
| 45 #include "content/public/common/renderer_preferences.h" | 46 #include "content/public/common/renderer_preferences.h" |
| 46 #include "grit/browser_resources.h" | 47 #include "grit/browser_resources.h" |
| 47 #include "net/base/escape.h" | 48 #include "net/base/escape.h" |
| (...skipping 584 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 632 l10n_util::GetStringUTF16(IDS_SAFEBROWSING_V3_OPEN_DETAILS_BUTTON)); | 633 l10n_util::GetStringUTF16(IDS_SAFEBROWSING_V3_OPEN_DETAILS_BUTTON)); |
| 633 load_time_data->SetString( | 634 load_time_data->SetString( |
| 634 "closeDetails", | 635 "closeDetails", |
| 635 l10n_util::GetStringUTF16(IDS_SAFEBROWSING_V3_CLOSE_DETAILS_BUTTON)); | 636 l10n_util::GetStringUTF16(IDS_SAFEBROWSING_V3_CLOSE_DETAILS_BUTTON)); |
| 636 load_time_data->SetString( | 637 load_time_data->SetString( |
| 637 "primaryButtonText", | 638 "primaryButtonText", |
| 638 l10n_util::GetStringUTF16(IDS_SAFEBROWSING_OVERRIDABLE_SAFETY_BUTTON)); | 639 l10n_util::GetStringUTF16(IDS_SAFEBROWSING_OVERRIDABLE_SAFETY_BUTTON)); |
| 639 load_time_data->SetBoolean( | 640 load_time_data->SetBoolean( |
| 640 "overridable", | 641 "overridable", |
| 641 !IsPrefEnabled(prefs::kSafeBrowsingProceedAnywayDisabled)); | 642 !IsPrefEnabled(prefs::kSafeBrowsingProceedAnywayDisabled)); |
| 643 security_interstitials::common_string_util::PopulateNewIconStrings( |
| 644 load_time_data); |
| 642 | 645 |
| 643 switch (interstitial_reason_) { | 646 switch (interstitial_reason_) { |
| 644 case SB_REASON_MALWARE: | 647 case SB_REASON_MALWARE: |
| 645 PopulateMalwareLoadTimeData(load_time_data); | 648 PopulateMalwareLoadTimeData(load_time_data); |
| 646 break; | 649 break; |
| 647 case SB_REASON_HARMFUL: | 650 case SB_REASON_HARMFUL: |
| 648 PopulateHarmfulLoadTimeData(load_time_data); | 651 PopulateHarmfulLoadTimeData(load_time_data); |
| 649 break; | 652 break; |
| 650 case SB_REASON_PHISHING: | 653 case SB_REASON_PHISHING: |
| 651 PopulatePhishingLoadTimeData(load_time_data); | 654 PopulatePhishingLoadTimeData(load_time_data); |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 752 } else { | 755 } else { |
| 753 load_time_data->SetString( | 756 load_time_data->SetString( |
| 754 "finalParagraph", | 757 "finalParagraph", |
| 755 l10n_util::GetStringUTF16(IDS_PHISHING_V3_PROCEED_PARAGRAPH)); | 758 l10n_util::GetStringUTF16(IDS_PHISHING_V3_PROCEED_PARAGRAPH)); |
| 756 } | 759 } |
| 757 | 760 |
| 758 PopulateExtendedReportingOption(load_time_data); | 761 PopulateExtendedReportingOption(load_time_data); |
| 759 } | 762 } |
| 760 | 763 |
| 761 } // namespace safe_browsing | 764 } // namespace safe_browsing |
| OLD | NEW |