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

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

Issue 351553004: Port HistoryService::GetVisibleVisitCountToHost to CancelableTaskTracker (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix Linux ASAN tests Created 6 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
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/task/cancelable_task_tracker.h"
13 #include "base/time/time.h" 14 #include "base/time/time.h"
14 #include "chrome/browser/history/history_service.h" 15 #include "chrome/browser/history/history_service.h"
15 #include "content/public/browser/interstitial_page_delegate.h" 16 #include "content/public/browser/interstitial_page_delegate.h"
16 #include "net/ssl/ssl_info.h" 17 #include "net/ssl/ssl_info.h"
17 #include "url/gurl.h" 18 #include "url/gurl.h"
18 19
19 namespace base { 20 namespace base {
20 class DictionaryValue; 21 class DictionaryValue;
21 } 22 }
22 23
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 private: 78 private:
78 void NotifyDenyCertificate(); 79 void NotifyDenyCertificate();
79 void NotifyAllowCertificate(); 80 void NotifyAllowCertificate();
80 81
81 // These fetch the appropriate HTML page, depending on the 82 // These fetch the appropriate HTML page, depending on the
82 // SSLInterstitialVersion Finch trial. 83 // SSLInterstitialVersion Finch trial.
83 std::string GetHTMLContentsV1(); 84 std::string GetHTMLContentsV1();
84 std::string GetHTMLContentsV2(); 85 std::string GetHTMLContentsV2();
85 86
86 // Used to query the HistoryService to see if the URL is in history. For UMA. 87 // Used to query the HistoryService to see if the URL is in history. For UMA.
87 void OnGotHistoryCount(HistoryService::Handle handle, 88 void OnGotHistoryCount(bool success, int num_visits, base::Time first_visit);
88 bool success,
89 int num_visits,
90 base::Time first_visit);
91 89
92 // content::NotificationObserver: 90 // content::NotificationObserver:
93 virtual void Observe( 91 virtual void Observe(
94 int type, 92 int type,
95 const content::NotificationSource& source, 93 const content::NotificationSource& source,
96 const content::NotificationDetails& details) OVERRIDE; 94 const content::NotificationDetails& details) OVERRIDE;
97 95
98 base::Callback<void(bool)> callback_; 96 base::Callback<void(bool)> callback_;
99 97
100 content::WebContents* web_contents_; 98 content::WebContents* web_contents_;
101 int cert_error_; 99 int cert_error_;
102 const net::SSLInfo ssl_info_; 100 const net::SSLInfo ssl_info_;
103 GURL request_url_; 101 GURL request_url_;
104 // Could the user successfully override the error? 102 // Could the user successfully override the error?
105 bool overridable_; 103 bool overridable_;
106 // Has the site requested strict enforcement of certificate errors? 104 // Has the site requested strict enforcement of certificate errors?
107 bool strict_enforcement_; 105 bool strict_enforcement_;
108 content::InterstitialPage* interstitial_page_; // Owns us. 106 content::InterstitialPage* interstitial_page_; // Owns us.
109 // Is the hostname for an internal network? 107 // Is the hostname for an internal network?
110 bool internal_; 108 bool internal_;
111 // How many times is this same URL in history? 109 // How many times is this same URL in history?
112 int num_visits_; 110 int num_visits_;
113 // Used for getting num_visits_. 111 // Used for getting num_visits_.
114 CancelableRequestConsumer request_consumer_; 112 base::CancelableTaskTracker request_tracker_;
115 // Is captive portal detection enabled? 113 // Is captive portal detection enabled?
116 bool captive_portal_detection_enabled_; 114 bool captive_portal_detection_enabled_;
117 // Did the probe complete before the interstitial was closed? 115 // Did the probe complete before the interstitial was closed?
118 bool captive_portal_probe_completed_; 116 bool captive_portal_probe_completed_;
119 // Did the captive portal probe receive an error or get a non-HTTP response? 117 // Did the captive portal probe receive an error or get a non-HTTP response?
120 bool captive_portal_no_response_; 118 bool captive_portal_no_response_;
121 // Was a captive portal detected? 119 // Was a captive portal detected?
122 bool captive_portal_detected_; 120 bool captive_portal_detected_;
123 121
124 // For the FieldTrial: this contains the name of the condition. 122 // For the FieldTrial: this contains the name of the condition.
125 std::string trial_condition_; 123 std::string trial_condition_;
126 124
127 content::NotificationRegistrar registrar_; 125 content::NotificationRegistrar registrar_;
128 126
129 DISALLOW_COPY_AND_ASSIGN(SSLBlockingPage); 127 DISALLOW_COPY_AND_ASSIGN(SSLBlockingPage);
130 }; 128 };
131 129
132 #endif // CHROME_BROWSER_SSL_SSL_BLOCKING_PAGE_H_ 130 #endif // CHROME_BROWSER_SSL_SSL_BLOCKING_PAGE_H_
OLDNEW
« no previous file with comments | « chrome/browser/safe_browsing/safe_browsing_blocking_page.cc ('k') | chrome/browser/ssl/ssl_blocking_page.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698