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

Side by Side Diff: chrome/browser/extensions/activity_log/hashed_ad_network_database.h

Issue 263953003: Re-enable ActivityLog AdNetworkDatabase unittest (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 7 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 2014 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_EXTENSIONS_ACTIVITY_LOG_HASHED_AD_NETWORK_DATABASE_H_
6 #define CHROME_BROWSER_EXTENSIONS_ACTIVITY_LOG_HASHED_AD_NETWORK_DATABASE_H_
7
8 #include "base/containers/hash_tables.h"
9 #include "base/memory/ref_counted.h"
10 #include "chrome/browser/extensions/activity_log/ad_network_database.h"
11
12 namespace base {
13 class RefCountedStaticMemory;
14 }
15
16 namespace extensions {
17
18 // The standard ("real") implementation of the AdNetworkDatabase, which stores
19 // a list of hashes of ad networks.
20 class HashedAdNetworkDatabase : public AdNetworkDatabase {
21 public:
22 explicit HashedAdNetworkDatabase(
23 scoped_refptr<base::RefCountedStaticMemory> memory);
24 virtual ~HashedAdNetworkDatabase();
25
26 private:
27 // AdNetworkDatabase implementation.
28 virtual bool IsAdNetwork(const GURL& url) const OVERRIDE;
29
30 // The set of partial hashes for known ad networks.
31 base::hash_set<int64> entries_;
32 };
33
34 } // namespace extensions
35
36 #endif // CHROME_BROWSER_EXTENSIONS_ACTIVITY_LOG_HASHED_AD_NETWORK_DATABASE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698