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/task/cancelable_task_tracker.h" | 13 #include "base/task/cancelable_task_tracker.h" |
14 #include "base/time/time.h" | 14 #include "base/time/time.h" |
15 #include "chrome/browser/history/history_service.h" | 15 #include "chrome/browser/history/history_service.h" |
16 #include "content/public/browser/interstitial_page_delegate.h" | 16 #include "content/public/browser/interstitial_page_delegate.h" |
17 #include "net/ssl/ssl_info.h" | 17 #include "net/ssl/ssl_info.h" |
18 #include "url/gurl.h" | 18 #include "url/gurl.h" |
19 | 19 |
20 namespace base { | 20 namespace base { |
21 class DictionaryValue; | 21 class DictionaryValue; |
22 } | 22 } |
23 | 23 |
24 namespace content { | 24 namespace content { |
25 class InterstitialPage; | 25 class InterstitialPage; |
26 class WebContents; | 26 class WebContents; |
27 } | 27 } |
28 | 28 |
| 29 namespace extensions { |
| 30 class ExperienceSamplingEvent; |
| 31 } |
| 32 |
29 // This class is responsible for showing/hiding the interstitial page that is | 33 // This class is responsible for showing/hiding the interstitial page that is |
30 // shown when a certificate error happens. | 34 // shown when a certificate error happens. |
31 // It deletes itself when the interstitial page is closed. | 35 // It deletes itself when the interstitial page is closed. |
32 // | 36 // |
33 // This class should only be used on the UI thread because its implementation | 37 // This class should only be used on the UI thread because its implementation |
34 // uses captive_portal::CaptivePortalService which can only be accessed on the | 38 // uses captive_portal::CaptivePortalService which can only be accessed on the |
35 // UI thread. | 39 // UI thread. |
36 class SSLBlockingPage : public content::InterstitialPageDelegate, | 40 class SSLBlockingPage : public content::InterstitialPageDelegate, |
37 public content::NotificationObserver { | 41 public content::NotificationObserver { |
38 public: | 42 public: |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 // Did the probe complete before the interstitial was closed? | 119 // Did the probe complete before the interstitial was closed? |
116 bool captive_portal_probe_completed_; | 120 bool captive_portal_probe_completed_; |
117 // Did the captive portal probe receive an error or get a non-HTTP response? | 121 // Did the captive portal probe receive an error or get a non-HTTP response? |
118 bool captive_portal_no_response_; | 122 bool captive_portal_no_response_; |
119 // Was a captive portal detected? | 123 // Was a captive portal detected? |
120 bool captive_portal_detected_; | 124 bool captive_portal_detected_; |
121 | 125 |
122 // For the FieldTrial: this contains the name of the condition. | 126 // For the FieldTrial: this contains the name of the condition. |
123 std::string trial_condition_; | 127 std::string trial_condition_; |
124 | 128 |
| 129 // For Chrome Experience Sampling Platform: this maintains event state. |
| 130 scoped_ptr<extensions::ExperienceSamplingEvent> sampling_event_; |
| 131 |
125 content::NotificationRegistrar registrar_; | 132 content::NotificationRegistrar registrar_; |
126 | 133 |
127 DISALLOW_COPY_AND_ASSIGN(SSLBlockingPage); | 134 DISALLOW_COPY_AND_ASSIGN(SSLBlockingPage); |
128 }; | 135 }; |
129 | 136 |
130 #endif // CHROME_BROWSER_SSL_SSL_BLOCKING_PAGE_H_ | 137 #endif // CHROME_BROWSER_SSL_SSL_BLOCKING_PAGE_H_ |
OLD | NEW |