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

Side by Side Diff: components/navigation_metrics/origins_seen_service.h

Issue 2823233003: Deprecate Once-Per-Origin Navigation histograms (Closed)
Patch Set: Remove deleted .h from .mm Created 3 years, 8 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 2016 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 COMPONENTS_NAVIGATION_METRICS_ORIGINS_SEEN_SERVICE_H_
6 #define COMPONENTS_NAVIGATION_METRICS_ORIGINS_SEEN_SERVICE_H_
7
8 #include "base/containers/mru_cache.h"
9 #include "components/keyed_service/core/keyed_service.h"
10 #include "url/origin.h"
11
12 namespace navigation_metrics {
13
14 class OriginsSeenService : public KeyedService {
15 public:
16 OriginsSeenService();
17 ~OriginsSeenService() override;
18
19 // Used when deciding whether or not to record
20 // Navigation.SchemePerUniqueOrigin[OTR]. Inserts a copy of |origin| into the
21 // set |origins_seen_|, and returns whether or not |origin| was already in the
22 // set.
23 bool Insert(const url::Origin& origin);
24
25 private:
26 // Used by |HaveAlreadySeenOrigin|. This cache is in volatile storage because
27 // Off The Record Profiles also use this Service.
28 base::MRUCache<url::Origin, bool> origins_seen_;
29 };
30
31 } // namespace navigation_metrics
32
33 #endif // COMPONENTS_NAVIGATION_METRICS_ORIGINS_SEEN_SERVICE_H_
OLDNEW
« no previous file with comments | « components/navigation_metrics/navigation_metrics_unittest.cc ('k') | components/navigation_metrics/origins_seen_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698