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

Side by Side Diff: content/browser/browser_thread.h

Issue 7210053: Implementation of PostTaskAndReply() in MessageLoopProxy and BrowserThread. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: copyright Created 9 years, 4 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 | « base/threading/thread_collision_warner.h ('k') | content/browser/browser_thread.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_BROWSER_THREAD_H_ 5 #ifndef CONTENT_BROWSER_BROWSER_THREAD_H_
6 #define CONTENT_BROWSER_BROWSER_THREAD_H_ 6 #define CONTENT_BROWSER_BROWSER_THREAD_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/synchronization/lock.h" 10 #include "base/synchronization/lock.h"
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 int64 delay_ms); 121 int64 delay_ms);
122 static bool PostNonNestableTask(ID identifier, 122 static bool PostNonNestableTask(ID identifier,
123 const tracked_objects::Location& from_here, 123 const tracked_objects::Location& from_here,
124 Task* task); 124 Task* task);
125 static bool PostNonNestableDelayedTask( 125 static bool PostNonNestableDelayedTask(
126 ID identifier, 126 ID identifier,
127 const tracked_objects::Location& from_here, 127 const tracked_objects::Location& from_here,
128 Task* task, 128 Task* task,
129 int64 delay_ms); 129 int64 delay_ms);
130 130
131 static bool PostTaskAndReply(
132 ID identifier,
133 const tracked_objects::Location& from_here,
134 const base::Closure& task,
135 const base::Closure& reply);
136
131 template <class T> 137 template <class T>
132 static bool DeleteSoon(ID identifier, 138 static bool DeleteSoon(ID identifier,
133 const tracked_objects::Location& from_here, 139 const tracked_objects::Location& from_here,
134 const T* object) { 140 const T* object) {
135 return PostNonNestableTask( 141 return PostNonNestableTask(
136 identifier, from_here, new DeleteTask<T>(object)); 142 identifier, from_here, new DeleteTask<T>(object));
137 } 143 }
138 144
139 template <class T> 145 template <class T>
140 static bool ReleaseSoon(ID identifier, 146 static bool ReleaseSoon(ID identifier,
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 static base::Lock lock_; 241 static base::Lock lock_;
236 242
237 // An array of the BrowserThread objects. This array is protected by |lock_|. 243 // An array of the BrowserThread objects. This array is protected by |lock_|.
238 // The threads are not owned by this array. Typically, the threads are owned 244 // The threads are not owned by this array. Typically, the threads are owned
239 // on the UI thread by the g_browser_process object. BrowserThreads remove 245 // on the UI thread by the g_browser_process object. BrowserThreads remove
240 // themselves from this array upon destruction. 246 // themselves from this array upon destruction.
241 static BrowserThread* browser_threads_[ID_COUNT]; 247 static BrowserThread* browser_threads_[ID_COUNT];
242 }; 248 };
243 249
244 #endif // CONTENT_BROWSER_BROWSER_THREAD_H_ 250 #endif // CONTENT_BROWSER_BROWSER_THREAD_H_
OLDNEW
« no previous file with comments | « base/threading/thread_collision_warner.h ('k') | content/browser/browser_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698