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

Side by Side Diff: chrome/browser/ssl/ssl_blocking_page.cc

Issue 1035023002: Adding the Finch code for the certificate error reporter experiment (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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
« 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 #include "chrome/browser/ssl/ssl_blocking_page.h" 5 #include "chrome/browser/ssl/ssl_blocking_page.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/build_time.h" 9 #include "base/build_time.h"
10 #include "base/callback_helpers.h" 10 #include "base/callback_helpers.h"
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 73
74 using base::ASCIIToUTF16; 74 using base::ASCIIToUTF16;
75 using base::TimeTicks; 75 using base::TimeTicks;
76 using content::InterstitialPage; 76 using content::InterstitialPage;
77 using content::InterstitialPageDelegate; 77 using content::InterstitialPageDelegate;
78 using content::NavigationController; 78 using content::NavigationController;
79 using content::NavigationEntry; 79 using content::NavigationEntry;
80 80
81 namespace { 81 namespace {
82 82
83 bool SendFraudulentCertificateChain() {
estark 2015/03/27 01:22:02 I think we should name the experiment |Certificate
estark 2015/03/27 01:22:02 Maybe put this down with the other helper function
fahl 2015/03/27 01:28:24 Sure, I just put it there so no one forgets to rem
fahl 2015/03/27 01:59:08 Done.
84 return base::FieldTrialList::FindFullName("FraudulentCertificateCollector") ==
85 "FCC";
86 }
87
83 // URL for help page. 88 // URL for help page.
84 const char kHelpURL[] = "https://support.google.com/chrome/answer/4454607"; 89 const char kHelpURL[] = "https://support.google.com/chrome/answer/4454607";
85 90
86 // Constants for the Experience Sampling instrumentation. 91 // Constants for the Experience Sampling instrumentation.
87 const char kEventNameBase[] = "ssl_interstitial_"; 92 const char kEventNameBase[] = "ssl_interstitial_";
88 const char kEventNotOverridable[] = "notoverridable_"; 93 const char kEventNotOverridable[] = "notoverridable_";
89 const char kEventOverridable[] = "overridable_"; 94 const char kEventOverridable[] = "overridable_";
90 95
91 // Events for UMA. Do not reorder or change! 96 // Events for UMA. Do not reorder or change!
92 enum SSLExpirationAndDecision { 97 enum SSLExpirationAndDecision {
(...skipping 560 matching lines...) Expand 10 before | Expand all | Expand 10 after
653 658
654 const bool enabled = 659 const bool enabled =
655 IsPrefEnabled(prefs::kSafeBrowsingExtendedReportingEnabled); 660 IsPrefEnabled(prefs::kSafeBrowsingExtendedReportingEnabled);
656 661
657 if (!enabled) 662 if (!enabled)
658 return; 663 return;
659 664
660 metrics_helper()->RecordUserInteraction( 665 metrics_helper()->RecordUserInteraction(
661 SecurityInterstitialMetricsHelper::EXTENDED_REPORTING_IS_ENABLED); 666 SecurityInterstitialMetricsHelper::EXTENDED_REPORTING_IS_ENABLED);
662 667
663 if (certificate_report_callback_for_testing_.is_null()) 668 if (certificate_report_callback_for_testing_.is_null())
estark 2015/03/27 01:22:01 This bit can go inside the `if` statement as well
fahl 2015/03/27 01:59:07 Done.
664 scoped_callback.Reset(base::Bind(&base::DoNothing)); 669 scoped_callback.Reset(base::Bind(&base::DoNothing));
665 670
666 safe_browsing_ui_manager_->ReportInvalidCertificateChain( 671 if (SendFraudulentCertificateChain())
estark 2015/03/27 01:22:01 I would use curly braces since the body spans more
fahl 2015/03/27 01:59:07 Done.
667 request_url().host(), ssl_info_, scoped_callback.Release()); 672 safe_browsing_ui_manager_->ReportInvalidCertificateChain(
673 request_url().host(), ssl_info_, scoped_callback.Release());
668 } 674 }
669 675
670 // static 676 // static
671 bool SSLBlockingPage::IsOptionsOverridable(int options_mask) { 677 bool SSLBlockingPage::IsOptionsOverridable(int options_mask) {
672 return (options_mask & SSLBlockingPage::OVERRIDABLE) && 678 return (options_mask & SSLBlockingPage::OVERRIDABLE) &&
673 !(options_mask & SSLBlockingPage::STRICT_ENFORCEMENT); 679 !(options_mask & SSLBlockingPage::STRICT_ENFORCEMENT);
674 } 680 }
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