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

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

Issue 10750013: Fix typo in the new chrome histograms. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 419 matching lines...) Expand 10 before | Expand all | Expand 10 after
430 l10n_util::GetStringUTF16(IDS_SAFE_BROWSING_PHISHING_REPORT_ERROR)); 430 l10n_util::GetStringUTF16(IDS_SAFE_BROWSING_PHISHING_REPORT_ERROR));
431 strings->SetString("textdirection", base::i18n::IsRTL() ? "rtl" : "ltr"); 431 strings->SetString("textdirection", base::i18n::IsRTL() ? "rtl" : "ltr");
432 } 432 }
433 433
434 void SafeBrowsingBlockingPage::CommandReceived(const std::string& cmd) { 434 void SafeBrowsingBlockingPage::CommandReceived(const std::string& cmd) {
435 std::string command(cmd); // Make a local copy so we can modify it. 435 std::string command(cmd); // Make a local copy so we can modify it.
436 // The Jasonified response has quotes, remove them. 436 // The Jasonified response has quotes, remove them.
437 if (command.length() > 1 && command[0] == '"') { 437 if (command.length() > 1 && command[0] == '"') {
438 command = command.substr(1, command.length() - 2); 438 command = command.substr(1, command.length() - 2);
439 } 439 }
440 RecordUserReactionTime(cmd); 440 RecordUserReactionTime(command);
441 if (command == kDoReportCommand) { 441 if (command == kDoReportCommand) {
442 SetReportingPreference(true); 442 SetReportingPreference(true);
443 return; 443 return;
444 } 444 }
445 445
446 if (command == kDontReportCommand) { 446 if (command == kDontReportCommand) {
447 SetReportingPreference(false); 447 SetReportingPreference(false);
448 return; 448 return;
449 } 449 }
450 450
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after
814 // Client-side phishing detection interstitials never block the main frame 814 // Client-side phishing detection interstitials never block the main frame
815 // load, since they happen after the page is finished loading. 815 // load, since they happen after the page is finished loading.
816 if (unsafe_resources[0].threat_type == 816 if (unsafe_resources[0].threat_type ==
817 SafeBrowsingService::CLIENT_SIDE_PHISHING_URL) { 817 SafeBrowsingService::CLIENT_SIDE_PHISHING_URL) {
818 return false; 818 return false;
819 } 819 }
820 820
821 // Otherwise, check the threat type. 821 // Otherwise, check the threat type.
822 return unsafe_resources.size() == 1 && !unsafe_resources[0].is_subresource; 822 return unsafe_resources.size() == 1 && !unsafe_resources[0].is_subresource;
823 } 823 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698