OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CONTENT_BROWSER_APPCACHE_APPCACHE_STORAGE_H_ | 5 #ifndef CONTENT_BROWSER_APPCACHE_APPCACHE_STORAGE_H_ |
6 #define CONTENT_BROWSER_APPCACHE_APPCACHE_STORAGE_H_ | 6 #define CONTENT_BROWSER_APPCACHE_APPCACHE_STORAGE_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <map> | 10 #include <map> |
| 11 #include <memory> |
11 #include <vector> | 12 #include <vector> |
12 | 13 |
13 #include "base/compiler_specific.h" | 14 #include "base/compiler_specific.h" |
14 #include "base/gtest_prod_util.h" | 15 #include "base/gtest_prod_util.h" |
15 #include "base/macros.h" | 16 #include "base/macros.h" |
16 #include "base/memory/ref_counted.h" | 17 #include "base/memory/ref_counted.h" |
17 #include "base/memory/scoped_ptr.h" | |
18 #include "content/browser/appcache/appcache_working_set.h" | 18 #include "content/browser/appcache/appcache_working_set.h" |
19 #include "content/common/content_export.h" | 19 #include "content/common/content_export.h" |
20 #include "net/base/completion_callback.h" | 20 #include "net/base/completion_callback.h" |
21 | 21 |
22 class GURL; | 22 class GURL; |
23 | 23 |
24 namespace content { | 24 namespace content { |
25 FORWARD_DECLARE_TEST(AppCacheStorageTest, DelegateReferences); | 25 FORWARD_DECLARE_TEST(AppCacheStorageTest, DelegateReferences); |
26 FORWARD_DECLARE_TEST(AppCacheStorageTest, UsageMap); | 26 FORWARD_DECLARE_TEST(AppCacheStorageTest, UsageMap); |
27 class AppCache; | 27 class AppCache; |
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
269 | 269 |
270 void StartIfNeeded(); | 270 void StartIfNeeded(); |
271 | 271 |
272 private: | 272 private: |
273 void OnReadComplete(int result); | 273 void OnReadComplete(int result); |
274 | 274 |
275 AppCacheStorage* storage_; | 275 AppCacheStorage* storage_; |
276 GURL manifest_url_; | 276 GURL manifest_url_; |
277 int64_t group_id_; | 277 int64_t group_id_; |
278 int64_t response_id_; | 278 int64_t response_id_; |
279 scoped_ptr<AppCacheResponseReader> reader_; | 279 std::unique_ptr<AppCacheResponseReader> reader_; |
280 DelegateReferenceVector delegates_; | 280 DelegateReferenceVector delegates_; |
281 scoped_refptr<HttpResponseInfoIOBuffer> info_buffer_; | 281 scoped_refptr<HttpResponseInfoIOBuffer> info_buffer_; |
282 }; | 282 }; |
283 | 283 |
284 typedef std::map<int64_t, ResponseInfoLoadTask*> PendingResponseInfoLoads; | 284 typedef std::map<int64_t, ResponseInfoLoadTask*> PendingResponseInfoLoads; |
285 | 285 |
286 DelegateReference* GetDelegateReference(Delegate* delegate) { | 286 DelegateReference* GetDelegateReference(Delegate* delegate) { |
287 DelegateReferenceMap::iterator iter = | 287 DelegateReferenceMap::iterator iter = |
288 delegate_references_.find(delegate); | 288 delegate_references_.find(delegate); |
289 if (iter != delegate_references_.end()) | 289 if (iter != delegate_references_.end()) |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
333 | 333 |
334 FRIEND_TEST_ALL_PREFIXES(content::AppCacheStorageTest, DelegateReferences); | 334 FRIEND_TEST_ALL_PREFIXES(content::AppCacheStorageTest, DelegateReferences); |
335 FRIEND_TEST_ALL_PREFIXES(content::AppCacheStorageTest, UsageMap); | 335 FRIEND_TEST_ALL_PREFIXES(content::AppCacheStorageTest, UsageMap); |
336 | 336 |
337 DISALLOW_COPY_AND_ASSIGN(AppCacheStorage); | 337 DISALLOW_COPY_AND_ASSIGN(AppCacheStorage); |
338 }; | 338 }; |
339 | 339 |
340 } // namespace content | 340 } // namespace content |
341 | 341 |
342 #endif // CONTENT_BROWSER_APPCACHE_APPCACHE_STORAGE_H_ | 342 #endif // CONTENT_BROWSER_APPCACHE_APPCACHE_STORAGE_H_ |
OLD | NEW |