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 <map> | 8 #include <map> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
12 #include "base/threading/thread_checker.h" | 12 #include "base/threading/thread_checker.h" |
13 #include "media/base/media_export.h" | 13 #include "media/base/media_export.h" |
14 #include "media/blink/lru.h" | 14 #include "media/blink/lru.h" |
15 #include "url/gurl.h" | 15 #include "url/gurl.h" |
16 | 16 |
17 namespace media { | 17 namespace media { |
18 | 18 |
19 #ifndef MEDIA_BLINK_BUFFERED_RESOURCE_LOADER_H_ | |
20 const int64 kPositionNotSpecified = -1; | 19 const int64 kPositionNotSpecified = -1; |
21 #endif | |
22 | 20 |
23 class UrlIndex; | 21 class UrlIndex; |
24 | 22 |
25 class MEDIA_EXPORT UrlData : public base::RefCounted<UrlData> { | 23 class MEDIA_EXPORT UrlData : public base::RefCounted<UrlData> { |
26 public: | 24 public: |
27 // Keep in sync with WebMediaPlayer::CORSMode. | 25 // Keep in sync with WebMediaPlayer::CORSMode. |
28 enum CORSMode { kUnspecified, kAnonymous, kUseCredentials }; | 26 enum CORSMode { kUnspecified, kAnonymous, kUseCredentials }; |
29 typedef std::pair<GURL, CORSMode> KeyType; | 27 typedef std::pair<GURL, CORSMode> KeyType; |
30 | 28 |
31 const GURL url() const { return url_; } | 29 const GURL url() const { return url_; } |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 base::Time last_modified); | 117 base::Time last_modified); |
120 | 118 |
121 std::map<UrlData::KeyType, UrlData*> by_url_; | 119 std::map<UrlData::KeyType, UrlData*> by_url_; |
122 std::map<UrlData::KeyType, UrlData*> with_last_modified_; | 120 std::map<UrlData::KeyType, UrlData*> with_last_modified_; |
123 std::list<scoped_refptr<UrlData> > to_prune_; | 121 std::list<scoped_refptr<UrlData> > to_prune_; |
124 bool prune_cb_active_; | 122 bool prune_cb_active_; |
125 }; | 123 }; |
126 | 124 |
127 } // namespace media | 125 } // namespace media |
128 #endif // MEDIA_BLINK_URL_INDEX_H_ | 126 #endif // MEDIA_BLINK_URL_INDEX_H_ |
OLD | NEW |