diff options
author | felt <felt@chromium.org> | 2015-09-28 19:49:35 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-09-29 02:50:24 +0000 |
commit | c0a91fac22f1d3ff3f8d052eb5dbffa70ef9835f (patch) | |
tree | 78d6e1b504f99bdc4727820bcaa00fc1f6cb0027 /components/security_interstitials | |
parent | c2079a4333e0f653870f4d1cddb45500c4bc785d (diff) | |
download | chromium_src-c0a91fac22f1d3ff3f8d052eb5dbffa70ef9835f.zip chromium_src-c0a91fac22f1d3ff3f8d052eb5dbffa70ef9835f.tar.gz chromium_src-c0a91fac22f1d3ff3f8d052eb5dbffa70ef9835f.tar.bz2 |
Split captive portal metrics out of SSLErrorClassification
SSLErrorClassification can be shared cross-platform if the Chrome-specific
captive portal logic is moved to its own helper. This also is a nice clean
separation of purposes, since the captive portal logic was fairly disjoint
from the other work being done in SSLErrorClassification. Now the captive
portal logic is handled as a metrics helper.
I also made the ownership of the metrics helper clearer by changing to use a
scoped_ptr.
BUG=488673
R=estark@chromium.org
TBR=mattm@chromium.org
Committed: https://crrev.com/5a31c78de2d5a1829910ec09d86ec10ae16e5c4c
Cr-Commit-Position: refs/heads/master@{#351195}
Review URL: https://codereview.chromium.org/1365733005
Cr-Commit-Position: refs/heads/master@{#351246}
Diffstat (limited to 'components/security_interstitials')
-rw-r--r-- | components/security_interstitials/core/metrics_helper.cc | 4 | ||||
-rw-r--r-- | components/security_interstitials/core/metrics_helper.h | 5 |
2 files changed, 8 insertions, 1 deletions
diff --git a/components/security_interstitials/core/metrics_helper.cc b/components/security_interstitials/core/metrics_helper.cc index da7002b..7466562 100644 --- a/components/security_interstitials/core/metrics_helper.cc +++ b/components/security_interstitials/core/metrics_helper.cc @@ -134,6 +134,10 @@ void MetricsHelper::RecordUserInteraction(Interaction interaction) { RecordExtraUserInteractionMetrics(interaction); } +void MetricsHelper::RecordShutdownMetrics() { + RecordExtraShutdownMetrics(); +} + int MetricsHelper::NumVisits() { return num_visits_; } diff --git a/components/security_interstitials/core/metrics_helper.h b/components/security_interstitials/core/metrics_helper.h index 064a180..e610201 100644 --- a/components/security_interstitials/core/metrics_helper.h +++ b/components/security_interstitials/core/metrics_helper.h @@ -91,14 +91,17 @@ class MetricsHelper { // histogram and potentially in a RAPPOR metric. void RecordUserDecision(Decision decision); void RecordUserInteraction(Interaction interaction); + void RecordShutdownMetrics(); + // Number of times user visited this origin before. -1 means not-yet-set. int NumVisits(); protected: // Subclasses should implement any embedder-specific recording logic in these - // methods. They'll be invoked from RecordUserDecision/Interaction. + // methods. They'll be invoked from the matching Record methods. virtual void RecordExtraUserDecisionMetrics(Decision decision) = 0; virtual void RecordExtraUserInteractionMetrics(Interaction interaction) = 0; + virtual void RecordExtraShutdownMetrics() = 0; private: // Used to query the HistoryService to see if the URL is in history. It will |