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

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

Issue 22350004: Expand UMA metrics for SSL (check history) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed comment nit Created 7 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 | chrome/browser/ssl/ssl_blocking_page.cc » ('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 #ifndef CHROME_BROWSER_SSL_SSL_BLOCKING_PAGE_H_ 5 #ifndef CHROME_BROWSER_SSL_SSL_BLOCKING_PAGE_H_
6 #define CHROME_BROWSER_SSL_SSL_BLOCKING_PAGE_H_ 6 #define CHROME_BROWSER_SSL_SSL_BLOCKING_PAGE_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/callback.h" 11 #include "base/callback.h"
12 #include "base/strings/string16.h" 12 #include "base/strings/string16.h"
13 #include "base/time/time.h" 13 #include "base/time/time.h"
14 #include "chrome/browser/history/history_service.h"
14 #include "content/public/browser/interstitial_page_delegate.h" 15 #include "content/public/browser/interstitial_page_delegate.h"
15 #include "net/ssl/ssl_info.h" 16 #include "net/ssl/ssl_info.h"
16 #include "url/gurl.h" 17 #include "url/gurl.h"
17 18
18 namespace base { 19 namespace base {
19 class DictionaryValue; 20 class DictionaryValue;
20 } 21 }
21 22
22 namespace content { 23 namespace content {
23 class InterstitialPage; 24 class InterstitialPage;
(...skipping 29 matching lines...) Expand all
53 virtual void OverrideEntry(content::NavigationEntry* entry) OVERRIDE; 54 virtual void OverrideEntry(content::NavigationEntry* entry) OVERRIDE;
54 virtual void OverrideRendererPrefs( 55 virtual void OverrideRendererPrefs(
55 content::RendererPreferences* prefs) OVERRIDE; 56 content::RendererPreferences* prefs) OVERRIDE;
56 virtual void OnProceed() OVERRIDE; 57 virtual void OnProceed() OVERRIDE;
57 virtual void OnDontProceed() OVERRIDE; 58 virtual void OnDontProceed() OVERRIDE;
58 59
59 private: 60 private:
60 void NotifyDenyCertificate(); 61 void NotifyDenyCertificate();
61 void NotifyAllowCertificate(); 62 void NotifyAllowCertificate();
62 63
64 // Used to query the HistoryService to see if the URL is in history. For UMA.
65 void OnGotHistoryCount(HistoryService::Handle handle,
66 bool success,
67 int num_visits,
68 base::Time first_visit);
69
63 base::Callback<void(bool)> callback_; 70 base::Callback<void(bool)> callback_;
64 71
65 content::WebContents* web_contents_; 72 content::WebContents* web_contents_;
66 int cert_error_; 73 int cert_error_;
67 base::TimeTicks display_start_time_; 74 base::TimeTicks display_start_time_;
68 net::SSLInfo ssl_info_; 75 net::SSLInfo ssl_info_;
69 GURL request_url_; 76 GURL request_url_;
70 // Could the user successfully override the error? 77 // Could the user successfully override the error?
71 bool overridable_; 78 bool overridable_;
72 // Has the site requested strict enforcement of certificate errors? 79 // Has the site requested strict enforcement of certificate errors?
73 bool strict_enforcement_; 80 bool strict_enforcement_;
74 content::InterstitialPage* interstitial_page_; // Owns us. 81 content::InterstitialPage* interstitial_page_; // Owns us.
75 // Is the hostname for an internal network? 82 // Is the hostname for an internal network?
76 bool internal_; 83 bool internal_;
84 // How many times is this same URL in history?
85 int num_visits_;
86 // Used for getting num_visits_.
87 CancelableRequestConsumer request_consumer_;
77 88
78 // For the FieldTrial: this contains the name of the condition. 89 // For the FieldTrial: this contains the name of the condition.
79 std::string trialCondition_; 90 std::string trialCondition_;
80 91
81 DISALLOW_COPY_AND_ASSIGN(SSLBlockingPage); 92 DISALLOW_COPY_AND_ASSIGN(SSLBlockingPage);
82 }; 93 };
83 94
84 #endif // CHROME_BROWSER_SSL_SSL_BLOCKING_PAGE_H_ 95 #endif // CHROME_BROWSER_SSL_SSL_BLOCKING_PAGE_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ssl/ssl_blocking_page.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698