OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 MEDIA_BLINK_URL_INDEX_H_ | 5 #ifndef MEDIA_BLINK_URL_INDEX_H_ |
6 #define MEDIA_BLINK_URL_INDEX_H_ | 6 #define MEDIA_BLINK_URL_INDEX_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 friend class ResourceMultiBuffer; | 224 friend class ResourceMultiBuffer; |
225 void RemoveUrlDataIfEmpty(const scoped_refptr<UrlData>& url_data); | 225 void RemoveUrlDataIfEmpty(const scoped_refptr<UrlData>& url_data); |
226 | 226 |
227 // Virtual so we can override it in tests. | 227 // Virtual so we can override it in tests. |
228 virtual scoped_refptr<UrlData> NewUrlData(const GURL& url, | 228 virtual scoped_refptr<UrlData> NewUrlData(const GURL& url, |
229 UrlData::CORSMode cors_mode); | 229 UrlData::CORSMode cors_mode); |
230 | 230 |
231 std::map<UrlData::KeyType, scoped_refptr<UrlData>> by_url_; | 231 std::map<UrlData::KeyType, scoped_refptr<UrlData>> by_url_; |
232 blink::WebFrame* frame_; | 232 blink::WebFrame* frame_; |
233 scoped_refptr<MultiBuffer::GlobalLRU> lru_; | 233 scoped_refptr<MultiBuffer::GlobalLRU> lru_; |
234 bool prune_cb_active_; | |
235 | 234 |
236 // log2 of block size in multibuffer cache. Defaults to kBlockSizeShift. | 235 // log2 of block size in multibuffer cache. Defaults to kBlockSizeShift. |
237 // Currently only changed for testing purposes. | 236 // Currently only changed for testing purposes. |
238 const int block_shift_; | 237 const int block_shift_; |
239 | 238 |
240 protected: | 239 protected: |
241 base::WeakPtrFactory<UrlIndex> weak_factory_; | 240 base::WeakPtrFactory<UrlIndex> weak_factory_; |
242 }; | 241 }; |
243 | 242 |
244 } // namespace media | 243 } // namespace media |
245 #endif // MEDIA_BLINK_URL_INDEX_H_ | 244 #endif // MEDIA_BLINK_URL_INDEX_H_ |
OLD | NEW |