| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_NET_QUOTA_POLICY_CHANNEL_ID_STORE_H_ | 5 #ifndef CHROME_BROWSER_NET_QUOTA_POLICY_CHANNEL_ID_STORE_H_ |
| 6 #define CHROME_BROWSER_NET_QUOTA_POLICY_CHANNEL_ID_STORE_H_ | 6 #define CHROME_BROWSER_NET_QUOTA_POLICY_CHANNEL_ID_STORE_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 const scoped_refptr<base::SequencedTaskRunner>& background_task_runner, | 40 const scoped_refptr<base::SequencedTaskRunner>& background_task_runner, |
| 41 const scoped_refptr<storage::SpecialStoragePolicy>& | 41 const scoped_refptr<storage::SpecialStoragePolicy>& |
| 42 special_storage_policy); | 42 special_storage_policy); |
| 43 | 43 |
| 44 // net::DefaultChannelIDStore::PersistentStore: | 44 // net::DefaultChannelIDStore::PersistentStore: |
| 45 void Load(const LoadedCallback& loaded_callback) override; | 45 void Load(const LoadedCallback& loaded_callback) override; |
| 46 void AddChannelID( | 46 void AddChannelID( |
| 47 const net::DefaultChannelIDStore::ChannelID& channel_id) override; | 47 const net::DefaultChannelIDStore::ChannelID& channel_id) override; |
| 48 void DeleteChannelID( | 48 void DeleteChannelID( |
| 49 const net::DefaultChannelIDStore::ChannelID& channel_id) override; | 49 const net::DefaultChannelIDStore::ChannelID& channel_id) override; |
| 50 void Flush() override; |
| 50 void SetForceKeepSessionState() override; | 51 void SetForceKeepSessionState() override; |
| 51 | 52 |
| 52 private: | 53 private: |
| 53 typedef std::vector<std::unique_ptr<net::DefaultChannelIDStore::ChannelID>> | 54 typedef std::vector<std::unique_ptr<net::DefaultChannelIDStore::ChannelID>> |
| 54 ChannelIDVector; | 55 ChannelIDVector; |
| 55 | 56 |
| 56 ~QuotaPolicyChannelIDStore() override; | 57 ~QuotaPolicyChannelIDStore() override; |
| 57 | 58 |
| 58 void OnLoad(const LoadedCallback& loaded_callback, | 59 void OnLoad(const LoadedCallback& loaded_callback, |
| 59 std::unique_ptr<ChannelIDVector> channel_ids); | 60 std::unique_ptr<ChannelIDVector> channel_ids); |
| 60 | 61 |
| 61 scoped_refptr<storage::SpecialStoragePolicy> special_storage_policy_; | 62 scoped_refptr<storage::SpecialStoragePolicy> special_storage_policy_; |
| 62 scoped_refptr<net::SQLiteChannelIDStore> persistent_store_; | 63 scoped_refptr<net::SQLiteChannelIDStore> persistent_store_; |
| 63 // Cache of server identifiers we have channel IDs stored for. | 64 // Cache of server identifiers we have channel IDs stored for. |
| 64 std::set<std::string> server_identifiers_; | 65 std::set<std::string> server_identifiers_; |
| 65 | 66 |
| 66 DISALLOW_COPY_AND_ASSIGN(QuotaPolicyChannelIDStore); | 67 DISALLOW_COPY_AND_ASSIGN(QuotaPolicyChannelIDStore); |
| 67 }; | 68 }; |
| 68 | 69 |
| 69 #endif // CHROME_BROWSER_NET_QUOTA_POLICY_CHANNEL_ID_STORE_H_ | 70 #endif // CHROME_BROWSER_NET_QUOTA_POLICY_CHANNEL_ID_STORE_H_ |
| OLD | NEW |