OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_CACHE_STORAGE_CACHE_STORAGE_OPERATION_H_ | 5 #ifndef CONTENT_BROWSER_CACHE_STORAGE_CACHE_STORAGE_OPERATION_H_ |
6 #define CONTENT_BROWSER_CACHE_STORAGE_CACHE_STORAGE_OPERATION_H_ | 6 #define CONTENT_BROWSER_CACHE_STORAGE_CACHE_STORAGE_OPERATION_H_ |
7 | 7 |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/callback.h" | 9 #include "base/callback.h" |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
11 #include "base/memory/weak_ptr.h" | 11 #include "base/memory/weak_ptr.h" |
| 12 #include "base/single_thread_task_runner.h" |
12 #include "base/time/time.h" | 13 #include "base/time/time.h" |
13 #include "content/browser/cache_storage/cache_storage_scheduler_client.h" | 14 #include "content/browser/cache_storage/cache_storage_scheduler_client.h" |
14 #include "content/common/content_export.h" | 15 #include "content/common/content_export.h" |
15 | 16 |
16 namespace content { | 17 namespace content { |
17 | 18 |
18 // An operation to run in the CacheStorageScheduler. It's mostly just a closure | 19 // An operation to run in the CacheStorageScheduler. It's mostly just a closure |
19 // to run plus a bunch of metrics data. | 20 // to run plus a bunch of metrics data. |
20 class CONTENT_EXPORT CacheStorageOperation { | 21 class CONTENT_EXPORT CacheStorageOperation { |
21 public: | 22 public: |
(...skipping 30 matching lines...) Expand all Loading... |
52 CacheStorageSchedulerClient client_type_; | 53 CacheStorageSchedulerClient client_type_; |
53 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; | 54 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; |
54 base::WeakPtrFactory<CacheStorageOperation> weak_ptr_factory_; | 55 base::WeakPtrFactory<CacheStorageOperation> weak_ptr_factory_; |
55 | 56 |
56 DISALLOW_COPY_AND_ASSIGN(CacheStorageOperation); | 57 DISALLOW_COPY_AND_ASSIGN(CacheStorageOperation); |
57 }; | 58 }; |
58 | 59 |
59 } // namespace content | 60 } // namespace content |
60 | 61 |
61 #endif // CONTENT_BROWSER_CACHE_STORAGE_CACHE_STORAGE_OPERATION_H_ | 62 #endif // CONTENT_BROWSER_CACHE_STORAGE_CACHE_STORAGE_OPERATION_H_ |
OLD | NEW |