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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 const char kEventNameHarmful[] = "harmful_interstitial_"; | 83 const char kEventNameHarmful[] = "harmful_interstitial_"; |
84 const char kEventNamePhishing[] = "phishing_interstitial_"; | 84 const char kEventNamePhishing[] = "phishing_interstitial_"; |
85 const char kEventNameOther[] = "safebrowsing_other_interstitial_"; | 85 const char kEventNameOther[] = "safebrowsing_other_interstitial_"; |
86 | 86 |
87 // Constants for the V4 phishing string upgrades. | 87 // Constants for the V4 phishing string upgrades. |
88 const char kReportPhishingErrorUrl[] = | 88 const char kReportPhishingErrorUrl[] = |
89 "https://www.google.com/safebrowsing/report_error/"; | 89 "https://www.google.com/safebrowsing/report_error/"; |
90 const char kReportPhishingErrorTrial[] = "SafeBrowsingReportPhishingErrorLink"; | 90 const char kReportPhishingErrorTrial[] = "SafeBrowsingReportPhishingErrorLink"; |
91 const char kReportPhishingErrorEnabled[] = "Enabled"; | 91 const char kReportPhishingErrorEnabled[] = "Enabled"; |
92 | 92 |
93 base::LazyInstance<SafeBrowsingBlockingPage::UnsafeResourceMap> | 93 base::LazyInstance<safe_browsing::SafeBrowsingBlockingPage::UnsafeResourceMap> |
94 g_unsafe_resource_map = LAZY_INSTANCE_INITIALIZER; | 94 g_unsafe_resource_map = LAZY_INSTANCE_INITIALIZER; |
95 | 95 |
96 } // namespace | 96 } // namespace |
97 | 97 |
| 98 namespace safe_browsing { |
| 99 |
98 // static | 100 // static |
99 SafeBrowsingBlockingPageFactory* SafeBrowsingBlockingPage::factory_ = NULL; | 101 SafeBrowsingBlockingPageFactory* SafeBrowsingBlockingPage::factory_ = NULL; |
100 | 102 |
101 // The default SafeBrowsingBlockingPageFactory. Global, made a singleton so we | 103 // The default SafeBrowsingBlockingPageFactory. Global, made a singleton so we |
102 // don't leak it. | 104 // don't leak it. |
103 class SafeBrowsingBlockingPageFactoryImpl | 105 class SafeBrowsingBlockingPageFactoryImpl |
104 : public SafeBrowsingBlockingPageFactory { | 106 : public SafeBrowsingBlockingPageFactory { |
105 public: | 107 public: |
106 SafeBrowsingBlockingPage* CreateSafeBrowsingPage( | 108 SafeBrowsingBlockingPage* CreateSafeBrowsingPage( |
107 SafeBrowsingUIManager* ui_manager, | 109 SafeBrowsingUIManager* ui_manager, |
(...skipping 601 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
709 "finalParagraph", l10n_util::GetStringUTF16( | 711 "finalParagraph", l10n_util::GetStringUTF16( |
710 IDS_PHISHING_V4_PROCEED_AND_REPORT_PARAGRAPH)); | 712 IDS_PHISHING_V4_PROCEED_AND_REPORT_PARAGRAPH)); |
711 } else { | 713 } else { |
712 load_time_data->SetString( | 714 load_time_data->SetString( |
713 "finalParagraph", | 715 "finalParagraph", |
714 l10n_util::GetStringUTF16(IDS_PHISHING_V3_PROCEED_PARAGRAPH)); | 716 l10n_util::GetStringUTF16(IDS_PHISHING_V3_PROCEED_PARAGRAPH)); |
715 } | 717 } |
716 | 718 |
717 PopulateExtendedReportingOption(load_time_data); | 719 PopulateExtendedReportingOption(load_time_data); |
718 } | 720 } |
| 721 |
| 722 } // namespace safe_browsing |
OLD | NEW |