Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(182)

Unified Diff: net/disk_cache/in_flight_io.h

Issue 3044006: Disk cache: Protect the code against misuse...... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/disk_cache/in_flight_backend_io.h ('k') | net/disk_cache/in_flight_io.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/disk_cache/in_flight_io.h
===================================================================
--- net/disk_cache/in_flight_io.h (revision 52555)
+++ net/disk_cache/in_flight_io.h (working copy)
@@ -7,7 +7,7 @@
#include <set>
-#include "base/message_loop.h"
+#include "base/message_loop_proxy.h"
#include "base/waitable_event.h"
namespace disk_cache {
@@ -89,8 +89,8 @@
class InFlightIO {
public:
InFlightIO()
- : callback_thread_(MessageLoop::current()), running_(false),
- single_thread_(false) {}
+ : callback_thread_(base::MessageLoopProxy::CreateForCurrentThread()),
+ running_(false), single_thread_(false) {}
virtual ~InFlightIO() {}
// Blocks the current thread until all IO operations tracked by this object
@@ -121,7 +121,7 @@
typedef std::set<scoped_refptr<BackgroundIO> > IOList;
IOList io_list_; // List of pending, in-flight io operations.
- MessageLoop* callback_thread_;
+ scoped_refptr<base::MessageLoopProxy> callback_thread_;
bool running_; // True after the first posted operation completes.
bool single_thread_; // True if we only have one thread.
« no previous file with comments | « net/disk_cache/in_flight_backend_io.h ('k') | net/disk_cache/in_flight_io.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698