Extract code handling PrinterProviderAPI from PrintPreviewHandler
[chromium-blink-merge.git] / chrome / browser / extensions / activity_log / hashed_ad_network_database.h
blobdae2eeeb13413c6c63988c0f91c41d03efb78aee
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.
5 #ifndef CHROME_BROWSER_EXTENSIONS_ACTIVITY_LOG_HASHED_AD_NETWORK_DATABASE_H_
6 #define CHROME_BROWSER_EXTENSIONS_ACTIVITY_LOG_HASHED_AD_NETWORK_DATABASE_H_
8 #include "chrome/browser/extensions/activity_log/ad_network_database.h"
10 namespace extensions {
12 // The standard ("real") implementation of the AdNetworkDatabase, which stores
13 // a list of hashes of ad networks.
14 class HashedAdNetworkDatabase : public AdNetworkDatabase {
15 public:
16 HashedAdNetworkDatabase();
17 ~HashedAdNetworkDatabase() override;
19 void set_entries_for_testing(const char* const* entries, int num_entries) {
20 entries_ = entries;
21 num_entries_ = num_entries;
24 private:
25 // AdNetworkDatabase implementation.
26 bool IsAdNetwork(const GURL& url) const override;
28 // Points to the array of hash entries. In practice, this is always set to
29 // kHashedAdNetworks, but is exposed via set_entries_for_testing().
30 const char* const* entries_;
32 // The number of entries.
33 int num_entries_;
36 } // namespace extensions
38 #endif // CHROME_BROWSER_EXTENSIONS_ACTIVITY_LOG_HASHED_AD_NETWORK_DATABASE_H_