Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 CancelableRequestConsumer request_consumer_; // Used for getting num_visits_. | |
|
palmer
2013/08/09 17:38:14
Nit: I'd stick with the comment-above-declaration
felt
2013/08/09 17:39:57
Done.
| |
| 77 | 87 |
| 78 // For the FieldTrial: this contains the name of the condition. | 88 // For the FieldTrial: this contains the name of the condition. |
| 79 std::string trialCondition_; | 89 std::string trialCondition_; |
| 80 | 90 |
| 81 DISALLOW_COPY_AND_ASSIGN(SSLBlockingPage); | 91 DISALLOW_COPY_AND_ASSIGN(SSLBlockingPage); |
| 82 }; | 92 }; |
| 83 | 93 |
| 84 #endif // CHROME_BROWSER_SSL_SSL_BLOCKING_PAGE_H_ | 94 #endif // CHROME_BROWSER_SSL_SSL_BLOCKING_PAGE_H_ |
| OLD | NEW |