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

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

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