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

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

Issue 1365733005: Split captive portal metrics out of SSLErrorClassification (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Compiler error fix possibly for realsies Created 5 years, 2 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
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_SSL_CAPTIVE_PORTAL_METRICS_RECORDER_H_
6 #define CHROME_BROWSER_SSL_CAPTIVE_PORTAL_METRICS_RECORDER_H_
7
8 #include <string>
9 #include <vector>
10
11 #include "base/time/time.h"
12 #include "content/public/browser/notification_observer.h"
13 #include "content/public/browser/notification_registrar.h"
14 #include "net/cert/x509_certificate.h"
15 #include "url/gurl.h"
16
17 namespace content {
18 class WebContents;
19 }
20
21 // This class helps the SSL interstitial record captive portal-specific
22 // metrics. It should only be used on the UI thread because its implementation
23 // uses captive_portal::CaptivePortalService which can only be accessed on the
24 // UI thread.
25 class CaptivePortalMetricsRecorder : public content::NotificationObserver {
26 public:
27 CaptivePortalMetricsRecorder(content::WebContents* web_contents,
28 bool overridable);
29 ~CaptivePortalMetricsRecorder() override;
30
31 // Should be called when the interstitial is closing.
32 void RecordCaptivePortalUMAStatistics() const;
33
34 private:
35 typedef std::vector<std::string> Tokens;
36
37 // content::NotificationObserver:
38 void Observe(int type,
39 const content::NotificationSource& source,
40 const content::NotificationDetails& details) override;
41
42 #if defined(ENABLE_CAPTIVE_PORTAL_DETECTION)
43 bool overridable_;
44 #endif
45 bool captive_portal_detection_enabled_;
46 // Did the probe complete before the interstitial was closed?
47 bool captive_portal_probe_completed_;
48 // Did the captive portal probe receive an error or get a non-HTTP response?
49 bool captive_portal_no_response_;
50 bool captive_portal_detected_;
51
52 content::NotificationRegistrar registrar_;
53 };
54
55 #endif // CHROME_BROWSER_SSL_CAPTIVE_PORTAL_METRICS_RECORDER_H_
OLDNEW
« no previous file with comments | « chrome/browser/ssl/bad_clock_blocking_page.cc ('k') | chrome/browser/ssl/captive_portal_metrics_recorder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698