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

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 // For use with scheduling non-critical tasks for execution after startup.
188 // The order or execution of tasks posted here is unspecified even when
189 // posting to a SequencedTaskRunner and tasks are not guaranteed to be run
190 // prior to browser shutdown.
191 // Note: see related ContentBrowserClient.PostAfterStartupTask.
jam 2015/03/23 23:19:44 nit: s/./::
192 static void PostAfterStartupTask(
193 const tracked_objects::Location& from_here,
194 const scoped_refptr<base::TaskRunner>& task_runner,
195 const base::Closure& task);
196
187 // Returns the thread pool used for blocking file I/O. Use this object to 197 // 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 198 // perform random blocking operations such as file writes or querying the
189 // Windows registry. 199 // Windows registry.
190 static base::SequencedWorkerPool* GetBlockingPool() WARN_UNUSED_RESULT; 200 static base::SequencedWorkerPool* GetBlockingPool() WARN_UNUSED_RESULT;
191 201
192 // Callable on any thread. Returns whether the given well-known thread is 202 // Callable on any thread. Returns whether the given well-known thread is
193 // initialized. 203 // initialized.
194 static bool IsThreadInitialized(ID identifier) WARN_UNUSED_RESULT; 204 static bool IsThreadInitialized(ID identifier) WARN_UNUSED_RESULT;
195 205
196 // Callable on any thread. Returns whether you're currently on a particular 206 // 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: 297 private:
288 friend class BrowserThreadImpl; 298 friend class BrowserThreadImpl;
289 299
290 BrowserThread() {} 300 BrowserThread() {}
291 DISALLOW_COPY_AND_ASSIGN(BrowserThread); 301 DISALLOW_COPY_AND_ASSIGN(BrowserThread);
292 }; 302 };
293 303
294 } // namespace content 304 } // namespace content
295 305
296 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_THREAD_H_ 306 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_THREAD_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698