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 NET_SDCH_SDCH_OWNER_H_ | 5 #ifndef NET_SDCH_SDCH_OWNER_H_ |
6 #define NET_SDCH_SDCH_OWNER_H_ | 6 #define NET_SDCH_SDCH_OWNER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 // called once per SdchOwner instance. | 49 // called once per SdchOwner instance. |
50 void EnablePersistentStorage(PersistentPrefStore* pref_store); | 50 void EnablePersistentStorage(PersistentPrefStore* pref_store); |
51 | 51 |
52 // Defaults to kMaxTotalDictionarySize. | 52 // Defaults to kMaxTotalDictionarySize. |
53 void SetMaxTotalDictionarySize(size_t max_total_dictionary_size); | 53 void SetMaxTotalDictionarySize(size_t max_total_dictionary_size); |
54 | 54 |
55 // Defaults to kMinSpaceForDictionaryFetch. | 55 // Defaults to kMinSpaceForDictionaryFetch. |
56 void SetMinSpaceForDictionaryFetch(size_t min_space_for_dictionary_fetch); | 56 void SetMinSpaceForDictionaryFetch(size_t min_space_for_dictionary_fetch); |
57 | 57 |
58 // SdchObserver implementation. | 58 // SdchObserver implementation. |
59 void OnDictionaryUsed(SdchManager* manager, | 59 void OnDictionaryAdded(const GURL& dictionary_url, |
60 const std::string& server_hash) override; | 60 const std::string& server_hash) override; |
61 void OnGetDictionary(SdchManager* manager, | 61 void OnDictionaryRemoved(const std::string& server_hash) override; |
62 const GURL& request_url, | 62 void OnDictionaryUsed(const std::string& server_hash) override; |
| 63 void OnGetDictionary(const GURL& request_url, |
63 const GURL& dictionary_url) override; | 64 const GURL& dictionary_url) override; |
64 void OnClearDictionaries(SdchManager* manager) override; | 65 void OnClearDictionaries() override; |
65 | 66 |
66 // PrefStore::Observer implementation. | 67 // PrefStore::Observer implementation. |
67 void OnPrefValueChanged(const std::string& key) override; | 68 void OnPrefValueChanged(const std::string& key) override; |
68 void OnInitializationCompleted(bool succeeded) override; | 69 void OnInitializationCompleted(bool succeeded) override; |
69 | 70 |
70 // Implementation detail--this is the function callback by the callback passed | 71 // Implementation detail--this is the function callback by the callback passed |
71 // to the fetcher through which the fetcher informs the SdchOwner that it's | 72 // to the fetcher through which the fetcher informs the SdchOwner that it's |
72 // gotten the dictionary. The first two arguments are bound locally. | 73 // gotten the dictionary. The first two arguments are bound locally. |
73 // Public for testing. | 74 // Public for testing. |
74 void OnDictionaryFetched(base::Time last_used, | 75 void OnDictionaryFetched(base::Time last_used, |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
214 // Creation time for this SdchOwner object, used for reporting temporal memory | 215 // Creation time for this SdchOwner object, used for reporting temporal memory |
215 // pressure. | 216 // pressure. |
216 base::Time creation_time_; | 217 base::Time creation_time_; |
217 | 218 |
218 DISALLOW_COPY_AND_ASSIGN(SdchOwner); | 219 DISALLOW_COPY_AND_ASSIGN(SdchOwner); |
219 }; | 220 }; |
220 | 221 |
221 } // namespace net | 222 } // namespace net |
222 | 223 |
223 #endif // NET_SDCH_SDCH_OWNER_H_ | 224 #endif // NET_SDCH_SDCH_OWNER_H_ |
OLD | NEW |