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 CONTENT_BROWSER_CACHE_STORAGE_CACHE_STORAGE_SCHEDULER_H_ | 5 #ifndef CONTENT_BROWSER_CACHE_STORAGE_CACHE_STORAGE_SCHEDULER_H_ |
6 #define CONTENT_BROWSER_CACHE_STORAGE_CACHE_STORAGE_SCHEDULER_H_ | 6 #define CONTENT_BROWSER_CACHE_STORAGE_CACHE_STORAGE_SCHEDULER_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
| 11 #include "base/macros.h" |
11 #include "content/common/content_export.h" | 12 #include "content/common/content_export.h" |
12 | 13 |
13 namespace content { | 14 namespace content { |
14 | 15 |
15 // TODO(jkarlin): Support readers and writers so operations can run in parallel. | 16 // TODO(jkarlin): Support readers and writers so operations can run in parallel. |
16 // TODO(jkarlin): Support operation identification so that ops can be checked in | 17 // TODO(jkarlin): Support operation identification so that ops can be checked in |
17 // DCHECKs. | 18 // DCHECKs. |
18 | 19 |
19 // CacheStorageScheduler runs the scheduled callbacks sequentially. Add an | 20 // CacheStorageScheduler runs the scheduled callbacks sequentially. Add an |
20 // operation by calling ScheduleOperation() with your callback. Once your | 21 // operation by calling ScheduleOperation() with your callback. Once your |
(...skipping 21 matching lines...) Expand all Loading... |
42 // The list of operations waiting on initialization. | 43 // The list of operations waiting on initialization. |
43 std::list<base::Closure> pending_operations_; | 44 std::list<base::Closure> pending_operations_; |
44 bool operation_running_; | 45 bool operation_running_; |
45 | 46 |
46 DISALLOW_COPY_AND_ASSIGN(CacheStorageScheduler); | 47 DISALLOW_COPY_AND_ASSIGN(CacheStorageScheduler); |
47 }; | 48 }; |
48 | 49 |
49 } // namespace content | 50 } // namespace content |
50 | 51 |
51 #endif // CONTENT_BROWSER_CACHE_STORAGE_CACHE_STORAGE_SCHEDULER_H_ | 52 #endif // CONTENT_BROWSER_CACHE_STORAGE_CACHE_STORAGE_SCHEDULER_H_ |
OLD | NEW |