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

Unified Diff: content/child/webcrypto/webcrypto_impl.cc

Issue 900703002: webcrypto: Get task-runner for worker-thread from base::ThreadTaskRunnerHandle (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/webcrypto/webcrypto_impl.cc
diff --git a/content/child/webcrypto/webcrypto_impl.cc b/content/child/webcrypto/webcrypto_impl.cc
index 9a3924b9aa9d9047654cf59e5e07dde5133a49a4..3270fbc006398b1e38669f75550be8e2b5007d2a 100644
--- a/content/child/webcrypto/webcrypto_impl.cc
+++ b/content/child/webcrypto/webcrypto_impl.cc
@@ -20,7 +20,6 @@
#include "content/child/webcrypto/generate_key_result.h"
#include "content/child/webcrypto/status.h"
#include "content/child/webcrypto/webcrypto_util.h"
-#include "content/child/worker_thread_task_runner.h"
#include "third_party/WebKit/public/platform/WebCryptoKeyAlgorithm.h"
#include "third_party/WebKit/public/platform/WebString.h"
@@ -135,19 +134,10 @@ void CompleteWithKeyOrError(const Status& status,
}
}
-// Gets a task runner for the current thread. The current thread is either:
-//
-// * The main Blink thread
-// * A Blink web worker thread
-//
-// A different mechanism is needed for posting to these threads. The main
-// thread has an associated message loop and can simply use
-// base::ThreadTaskRunnerHandle. Whereas the web worker threads are managed by
-// Blink and need to be indirected through WorkerThreadTaskRunner.
+// Gets a task runner for the current thread.
scoped_refptr<base::TaskRunner> GetCurrentBlinkThread() {
- if (base::ThreadTaskRunnerHandle::IsSet())
- return base::ThreadTaskRunnerHandle::Get();
- return WorkerThreadTaskRunner::current();
+ DCHECK(base::ThreadTaskRunnerHandle::IsSet());
+ return base::ThreadTaskRunnerHandle::Get();
}
// --------------------------------------------------------------------
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698