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

Side by Side Diff: base/message_loop_proxy.h

Issue 1702016: Changed UrlFetcher to use a MessageLoopProxy instead of directly relying on C... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/chrome_plugin_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 BASE_MESSAGE_LOOP_PROXY_H_ 5 #ifndef BASE_MESSAGE_LOOP_PROXY_H_
6 #define BASE_MESSAGE_LOOP_PROXY_H_ 6 #define BASE_MESSAGE_LOOP_PROXY_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/ref_counted.h" 9 #include "base/ref_counted.h"
10 #include "base/task.h" 10 #include "base/task.h"
(...skipping 10 matching lines...) Expand all
21 virtual bool PostTask(const tracked_objects::Location& from_here, 21 virtual bool PostTask(const tracked_objects::Location& from_here,
22 Task* task) = 0; 22 Task* task) = 0;
23 virtual bool PostDelayedTask(const tracked_objects::Location& from_here, 23 virtual bool PostDelayedTask(const tracked_objects::Location& from_here,
24 Task* task, int64 delay_ms) = 0; 24 Task* task, int64 delay_ms) = 0;
25 virtual bool PostNonNestableTask(const tracked_objects::Location& from_here, 25 virtual bool PostNonNestableTask(const tracked_objects::Location& from_here,
26 Task* task) = 0; 26 Task* task) = 0;
27 virtual bool PostNonNestableDelayedTask( 27 virtual bool PostNonNestableDelayedTask(
28 const tracked_objects::Location& from_here, 28 const tracked_objects::Location& from_here,
29 Task* task, 29 Task* task,
30 int64 delay_ms) = 0; 30 int64 delay_ms) = 0;
31 // A method which checks if the caller is currently running in the thread that
32 // this proxy represents.
33 virtual bool BelongsToCurrentThread() = 0;
31 34
32 template <class T> 35 template <class T>
33 bool DeleteSoon(const tracked_objects::Location& from_here, 36 bool DeleteSoon(const tracked_objects::Location& from_here,
34 T* object) { 37 T* object) {
35 return PostNonNestableTask(from_here, new DeleteTask<T>(object)); 38 return PostNonNestableTask(from_here, new DeleteTask<T>(object));
36 } 39 }
37 template <class T> 40 template <class T>
38 bool ReleaseSoon(const tracked_objects::Location& from_here, 41 bool ReleaseSoon(const tracked_objects::Location& from_here,
39 T* object) { 42 T* object) {
40 return PostNonNestableTask(from_here, new ReleaseTask<T>(object)); 43 return PostNonNestableTask(from_here, new ReleaseTask<T>(object));
41 } 44 }
42 }; 45 };
43 46
44 #endif // BASE_MESSAGE_LOOP_PROXY_H_ 47 #endif // BASE_MESSAGE_LOOP_PROXY_H_
45 48
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chrome_plugin_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698