| 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 <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 | 121 |
| 122 // Implementation detail--this is the function callback by the callback passed | 122 // Implementation detail--this is the function callback by the callback passed |
| 123 // to the fetcher through which the fetcher informs the SdchOwner that it's | 123 // to the fetcher through which the fetcher informs the SdchOwner that it's |
| 124 // gotten the dictionary. The first two arguments are bound locally. | 124 // gotten the dictionary. The first two arguments are bound locally. |
| 125 // Public for testing. | 125 // Public for testing. |
| 126 void OnDictionaryFetched(base::Time last_used, | 126 void OnDictionaryFetched(base::Time last_used, |
| 127 base::Time created_time, | 127 base::Time created_time, |
| 128 int use_count, | 128 int use_count, |
| 129 const std::string& dictionary_text, | 129 const std::string& dictionary_text, |
| 130 const GURL& dictionary_url, | 130 const GURL& dictionary_url, |
| 131 const BoundNetLog& net_log, | 131 const NetLogWithSource& net_log, |
| 132 bool was_from_cache); | 132 bool was_from_cache); |
| 133 | 133 |
| 134 void SetClockForTesting(std::unique_ptr<base::Clock> clock); | 134 void SetClockForTesting(std::unique_ptr<base::Clock> clock); |
| 135 | 135 |
| 136 // Returns the total number of dictionaries loaded. | 136 // Returns the total number of dictionaries loaded. |
| 137 int GetDictionaryCountForTesting() const; | 137 int GetDictionaryCountForTesting() const; |
| 138 | 138 |
| 139 // Returns whether this SdchOwner has dictionary from |url| loaded. | 139 // Returns whether this SdchOwner has dictionary from |url| loaded. |
| 140 bool HasDictionaryFromURLForTesting(const GURL& url) const; | 140 bool HasDictionaryFromURLForTesting(const GURL& url) const; |
| 141 | 141 |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 261 // Creation time for this SdchOwner object, used for reporting temporal memory | 261 // Creation time for this SdchOwner object, used for reporting temporal memory |
| 262 // pressure. | 262 // pressure. |
| 263 base::Time creation_time_; | 263 base::Time creation_time_; |
| 264 | 264 |
| 265 DISALLOW_COPY_AND_ASSIGN(SdchOwner); | 265 DISALLOW_COPY_AND_ASSIGN(SdchOwner); |
| 266 }; | 266 }; |
| 267 | 267 |
| 268 } // namespace net | 268 } // namespace net |
| 269 | 269 |
| 270 #endif // NET_SDCH_SDCH_OWNER_H_ | 270 #endif // NET_SDCH_SDCH_OWNER_H_ |
| OLD | NEW |