OLD | NEW |
---|---|
(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 CHROME_BROWSER_TAB_CONTENTS_ORIGINS_SEEN_SERVICE_H_ | |
6 #define CHROME_BROWSER_TAB_CONTENTS_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 class Profile; | |
Avi (use Gerrit)
2016/04/14 02:43:26
You don't need this forward declaration; remove it
palmer
2016/04/14 18:47:33
Done.
| |
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 HaveAlreadySeenOrigin(const url::Origin& origin); | |
24 | |
25 private: | |
26 // Used by |HaveAlreadySeenOrigin|. | |
27 base::MRUCache<url::Origin, bool> origins_seen_; | |
28 }; | |
29 | |
30 #endif // CHROME_BROWSER_TAB_CONTENTS_ORIGINS_SEEN_SERVICE_H_ | |
OLD | NEW |