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

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

Issue 439683002: Remove old SBInterstitial counter (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Missed a line Created 6 years, 4 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 | tools/metrics/histograms/histograms.xml » ('j') | 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 655 matching lines...) Expand 10 before | Expand all | Expand 10 after
666 if (unsafe_resources_[0].is_subresource && 666 if (unsafe_resources_[0].is_subresource &&
667 interstitial_type_ != TYPE_MALWARE_AND_PHISHING) { 667 interstitial_type_ != TYPE_MALWARE_AND_PHISHING) {
668 RecordDetailedUserAction((interstitial_type_ == TYPE_MALWARE) ? 668 RecordDetailedUserAction((interstitial_type_ == TYPE_MALWARE) ?
669 MALWARE_SHOW_CROSS_SITE : PHISHING_SHOW_CROSS_SITE); 669 MALWARE_SHOW_CROSS_SITE : PHISHING_SHOW_CROSS_SITE);
670 if (event == PROCEED) { 670 if (event == PROCEED) {
671 RecordDetailedUserAction((interstitial_type_ == TYPE_MALWARE) ? 671 RecordDetailedUserAction((interstitial_type_ == TYPE_MALWARE) ?
672 MALWARE_PROCEED_CROSS_SITE : PHISHING_PROCEED_CROSS_SITE); 672 MALWARE_PROCEED_CROSS_SITE : PHISHING_PROCEED_CROSS_SITE);
673 } 673 }
674 } 674 }
675 } 675 }
676
677 // TODO(felt): Get rid of the old interstitial histogram.
678 std::string action = "SBInterstitial";
679 switch (interstitial_type_) {
680 case TYPE_MALWARE_AND_PHISHING:
681 action.append("Multiple");
682 break;
683 case TYPE_MALWARE:
684 action.append("Malware");
685 break;
686 case TYPE_PHISHING:
687 action.append("Phishing");
688 break;
689 }
690
691 switch (event) {
692 case SHOW:
693 action.append("Show");
694 break;
695 case PROCEED:
696 action.append("Proceed");
697 break;
698 case DONT_PROCEED:
699 if (IsPrefEnabled(prefs::kSafeBrowsingProceedAnywayDisabled))
700 action.append("ForcedDontProceed");
701 else
702 action.append("DontProceed");
703 break;
704 case SHOW_ADVANCED:
705 break;
706 default:
707 NOTREACHED() << "Unexpected event: " << event;
708 }
709
710 content::RecordComputedAction(action);
mattm 2014/08/04 20:26:06 This is not technically a histogram. (It's under t
711 } 676 }
712 677
713 void SafeBrowsingBlockingPage::RecordUserReactionTime( 678 void SafeBrowsingBlockingPage::RecordUserReactionTime(
714 const std::string& command) { 679 const std::string& command) {
715 if (interstitial_show_time_.is_null()) 680 if (interstitial_show_time_.is_null())
716 return; // We already reported the user reaction time. 681 return; // We already reported the user reaction time.
717 base::TimeDelta dt = base::TimeTicks::Now() - interstitial_show_time_; 682 base::TimeDelta dt = base::TimeTicks::Now() - interstitial_show_time_;
718 DVLOG(1) << "User reaction time for command:" << command 683 DVLOG(1) << "User reaction time for command:" << command
719 << " on interstitial_type_:" << interstitial_type_ 684 << " on interstitial_type_:" << interstitial_type_
720 << " warning took " << dt.InMilliseconds() << "ms"; 685 << " warning took " << dt.InMilliseconds() << "ms";
(...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after
1191 IDS_PHISHING_V3_PRIMARY_PARAGRAPH, 1156 IDS_PHISHING_V3_PRIMARY_PARAGRAPH,
1192 base::UTF8ToUTF16(url_.host()))); 1157 base::UTF8ToUTF16(url_.host())));
1193 load_time_data->SetString( 1158 load_time_data->SetString(
1194 "explanationParagraph", 1159 "explanationParagraph",
1195 l10n_util::GetStringFUTF16(IDS_PHISHING_V3_EXPLANATION_PARAGRAPH, 1160 l10n_util::GetStringFUTF16(IDS_PHISHING_V3_EXPLANATION_PARAGRAPH,
1196 base::UTF8ToUTF16(url_.host()))); 1161 base::UTF8ToUTF16(url_.host())));
1197 load_time_data->SetString( 1162 load_time_data->SetString(
1198 "finalParagraph", 1163 "finalParagraph",
1199 l10n_util::GetStringUTF16(IDS_PHISHING_V3_PROCEED_PARAGRAPH)); 1164 l10n_util::GetStringUTF16(IDS_PHISHING_V3_PROCEED_PARAGRAPH));
1200 } 1165 }
OLDNEW
« no previous file with comments | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698