Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(26)

Side by Side Diff: chrome/browser/safe_browsing/safe_browsing_blocking_page.cc

Issue 829263004: Add WaitForInterstitialReady to browser_test_utils. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: mattm comments, fix test Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698