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 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
213 | 213 |
214 SafeBrowsingBlockingPage::~SafeBrowsingBlockingPage() { | 214 SafeBrowsingBlockingPage::~SafeBrowsingBlockingPage() { |
215 } | 215 } |
216 | 216 |
217 void SafeBrowsingBlockingPage::CommandReceived(const std::string& cmd) { | 217 void SafeBrowsingBlockingPage::CommandReceived(const std::string& cmd) { |
218 std::string command(cmd); // Make a local copy so we can modify it. | 218 std::string command(cmd); // Make a local copy so we can modify it. |
219 // The Jasonified response has quotes, remove them. | 219 // The Jasonified response has quotes, remove them. |
220 if (command.length() > 1 && command[0] == '"') { | 220 if (command.length() > 1 && command[0] == '"') { |
221 command = command.substr(1, command.length() - 2); | 221 command = command.substr(1, command.length() - 2); |
222 } | 222 } |
223 | |
224 if (command == "pageLoadComplete") { | |
mmenke
2015/01/22 15:53:25
Should have something in the WaitForRenderFrameRea
meacer
2015/01/22 18:31:37
Added a note to WaitForRenderFrameReady doc.
| |
225 // content::WaitForRenderFrameReady sends this message when the page | |
226 // load completes. Ignore it. | |
227 return; | |
228 } | |
229 | |
223 if (command == kDoReportCommand) { | 230 if (command == kDoReportCommand) { |
224 SetReportingPreference(true); | 231 SetReportingPreference(true); |
225 return; | 232 return; |
226 } | 233 } |
227 | 234 |
228 if (command == kDontReportCommand) { | 235 if (command == kDontReportCommand) { |
229 SetReportingPreference(false); | 236 SetReportingPreference(false); |
230 return; | 237 return; |
231 } | 238 } |
232 | 239 |
(...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
692 load_time_data->SetString( | 699 load_time_data->SetString( |
693 "explanationParagraph", | 700 "explanationParagraph", |
694 l10n_util::GetStringFUTF16(IDS_PHISHING_V3_EXPLANATION_PARAGRAPH, | 701 l10n_util::GetStringFUTF16(IDS_PHISHING_V3_EXPLANATION_PARAGRAPH, |
695 GetFormattedHostName())); | 702 GetFormattedHostName())); |
696 load_time_data->SetString( | 703 load_time_data->SetString( |
697 "finalParagraph", | 704 "finalParagraph", |
698 l10n_util::GetStringUTF16(IDS_PHISHING_V3_PROCEED_PARAGRAPH)); | 705 l10n_util::GetStringUTF16(IDS_PHISHING_V3_PROCEED_PARAGRAPH)); |
699 | 706 |
700 PopulateExtendedReportingOption(load_time_data); | 707 PopulateExtendedReportingOption(load_time_data); |
701 } | 708 } |
OLD | NEW |