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

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

Issue 949293002: Implement a poor man's PostAfterStartupTask() function. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_PUBLIC_BROWSER_BROWSER_THREAD_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_BROWSER_THREAD_H_
6 #define CONTENT_PUBLIC_BROWSER_BROWSER_THREAD_H_ 6 #define CONTENT_PUBLIC_BROWSER_BROWSER_THREAD_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 const base::Closure& task); 177 const base::Closure& task);
178 static bool PostBlockingPoolTaskAndReply( 178 static bool PostBlockingPoolTaskAndReply(
179 const tracked_objects::Location& from_here, 179 const tracked_objects::Location& from_here,
180 const base::Closure& task, 180 const base::Closure& task,
181 const base::Closure& reply); 181 const base::Closure& reply);
182 static bool PostBlockingPoolSequencedTask( 182 static bool PostBlockingPoolSequencedTask(
183 const std::string& sequence_token_name, 183 const std::string& sequence_token_name,
184 const tracked_objects::Location& from_here, 184 const tracked_objects::Location& from_here,
185 const base::Closure& task); 185 const base::Closure& task);
186 186
187 static void PostAfterStartupTask(
188 const tracked_objects::Location& from_here,
189 const scoped_refptr<base::TaskRunner>& task_runner,
190 const base::Closure& task);
191
187 // Returns the thread pool used for blocking file I/O. Use this object to 192 // Returns the thread pool used for blocking file I/O. Use this object to
188 // perform random blocking operations such as file writes or querying the 193 // perform random blocking operations such as file writes or querying the
189 // Windows registry. 194 // Windows registry.
190 static base::SequencedWorkerPool* GetBlockingPool() WARN_UNUSED_RESULT; 195 static base::SequencedWorkerPool* GetBlockingPool() WARN_UNUSED_RESULT;
191 196
192 // Callable on any thread. Returns whether the given well-known thread is 197 // Callable on any thread. Returns whether the given well-known thread is
193 // initialized. 198 // initialized.
194 static bool IsThreadInitialized(ID identifier) WARN_UNUSED_RESULT; 199 static bool IsThreadInitialized(ID identifier) WARN_UNUSED_RESULT;
195 200
196 // Callable on any thread. Returns whether you're currently on a particular 201 // Callable on any thread. Returns whether you're currently on a particular
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 private: 292 private:
288 friend class BrowserThreadImpl; 293 friend class BrowserThreadImpl;
289 294
290 BrowserThread() {} 295 BrowserThread() {}
291 DISALLOW_COPY_AND_ASSIGN(BrowserThread); 296 DISALLOW_COPY_AND_ASSIGN(BrowserThread);
292 }; 297 };
293 298
294 } // namespace content 299 } // namespace content
295 300
296 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_THREAD_H_ 301 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_THREAD_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698