OLD | NEW |
1 // Copyright (c) 2006-2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2010 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 NET_DISK_CACHE_IN_FLIGHT_IO_H_ | 5 #ifndef NET_DISK_CACHE_IN_FLIGHT_IO_H_ |
6 #define NET_DISK_CACHE_IN_FLIGHT_IO_H_ | 6 #define NET_DISK_CACHE_IN_FLIGHT_IO_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <set> | 9 #include <set> |
10 | 10 |
11 #include "base/message_loop_proxy.h" | 11 #include "base/message_loop_proxy.h" |
12 #include "base/waitable_event.h" | 12 #include "base/synchronization/waitable_event.h" |
13 | 13 |
14 namespace disk_cache { | 14 namespace disk_cache { |
15 | 15 |
16 class InFlightIO; | 16 class InFlightIO; |
17 | 17 |
18 // This class represents a single asynchronous IO operation while it is being | 18 // This class represents a single asynchronous IO operation while it is being |
19 // bounced between threads. | 19 // bounced between threads. |
20 class BackgroundIO : public base::RefCountedThreadSafe<BackgroundIO> { | 20 class BackgroundIO : public base::RefCountedThreadSafe<BackgroundIO> { |
21 public: | 21 public: |
22 // Other than the actual parameters for the IO operation (including the | 22 // Other than the actual parameters for the IO operation (including the |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 | 123 |
124 bool running_; // True after the first posted operation completes. | 124 bool running_; // True after the first posted operation completes. |
125 bool single_thread_; // True if we only have one thread. | 125 bool single_thread_; // True if we only have one thread. |
126 | 126 |
127 DISALLOW_COPY_AND_ASSIGN(InFlightIO); | 127 DISALLOW_COPY_AND_ASSIGN(InFlightIO); |
128 }; | 128 }; |
129 | 129 |
130 } // namespace disk_cache | 130 } // namespace disk_cache |
131 | 131 |
132 #endif // NET_DISK_CACHE_IN_FLIGHT_IO_H_ | 132 #endif // NET_DISK_CACHE_IN_FLIGHT_IO_H_ |
OLD | NEW |