Commit 5667edd9 authored by thestig@chromium.org's avatar thestig@chromium.org

Mark some content::BrowserThread methods with WARN_UNUSED_RESULT.

Review URL: https://codereview.chromium.org/250653002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@266282 0039d316-1c4b-4281-b951-d872f2087c98
parent 47f0c53f
...@@ -29,7 +29,8 @@ CreateReceiver(BrowserThread::ID run_quit_thread, ...@@ -29,7 +29,8 @@ CreateReceiver(BrowserThread::ID run_quit_thread,
template <typename Arg> base::Callback<void(Arg)> template <typename Arg> base::Callback<void(Arg)>
CreateReceiverOnCurrentThread(Arg* out) { CreateReceiverOnCurrentThread(Arg* out) {
BrowserThread::ID id; BrowserThread::ID id;
BrowserThread::GetCurrentThreadIdentifier(&id); bool ret = BrowserThread::GetCurrentThreadIdentifier(&id);
DCHECK(ret);
return base::Bind(&ReceiveResult<Arg>, id, base::Closure(), out); return base::Bind(&ReceiveResult<Arg>, id, base::Closure(), out);
} }
......
...@@ -185,24 +185,24 @@ class CONTENT_EXPORT BrowserThread { ...@@ -185,24 +185,24 @@ class CONTENT_EXPORT BrowserThread {
// Returns the thread pool used for blocking file I/O. Use this object to // Returns the thread pool used for blocking file I/O. Use this object to
// perform random blocking operations such as file writes or querying the // perform random blocking operations such as file writes or querying the
// Windows registry. // Windows registry.
static base::SequencedWorkerPool* GetBlockingPool(); static base::SequencedWorkerPool* GetBlockingPool() WARN_UNUSED_RESULT;
// Callable on any thread. Returns whether the given well-known thread is // Callable on any thread. Returns whether the given well-known thread is
// initialized. // initialized.
static bool IsThreadInitialized(ID identifier); static bool IsThreadInitialized(ID identifier) WARN_UNUSED_RESULT;
// Callable on any thread. Returns whether you're currently on a particular // Callable on any thread. Returns whether you're currently on a particular
// thread. To DCHECK this, use the DCHECK_CURRENTLY_ON() macro above. // thread. To DCHECK this, use the DCHECK_CURRENTLY_ON() macro above.
static bool CurrentlyOn(ID identifier); static bool CurrentlyOn(ID identifier) WARN_UNUSED_RESULT;
// Callable on any thread. Returns whether the threads message loop is valid. // Callable on any thread. Returns whether the threads message loop is valid.
// If this returns false it means the thread is in the process of shutting // If this returns false it means the thread is in the process of shutting
// down. // down.
static bool IsMessageLoopValid(ID identifier); static bool IsMessageLoopValid(ID identifier) WARN_UNUSED_RESULT;
// If the current message loop is one of the known threads, returns true and // If the current message loop is one of the known threads, returns true and
// sets identifier to its ID. Otherwise returns false. // sets identifier to its ID. Otherwise returns false.
static bool GetCurrentThreadIdentifier(ID* identifier); static bool GetCurrentThreadIdentifier(ID* identifier) WARN_UNUSED_RESULT;
// Callers can hold on to a refcounted MessageLoopProxy beyond the lifetime // Callers can hold on to a refcounted MessageLoopProxy beyond the lifetime
// of the thread. // of the thread.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment