OLD | NEW |
(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_ |
OLD | NEW |