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

Unified Diff: components/nacl/browser/nacl_browser.cc

Issue 1144153004: components: Remove use of MessageLoopProxy and deprecated MessageLoop APIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased. Created 5 years, 7 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 | « components/nacl/broker/nacl_broker_listener.cc ('k') | components/nacl/browser/nacl_process_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/nacl/browser/nacl_browser.cc
diff --git a/components/nacl/browser/nacl_browser.cc b/components/nacl/browser/nacl_browser.cc
index 733e9d96652b40982cdb4a9f3aa25966380b2de6..12e759c0a808aca91da58ee03c80b94d99432576 100644
--- a/components/nacl/browser/nacl_browser.cc
+++ b/components/nacl/browser/nacl_browser.cc
@@ -7,11 +7,13 @@
#include "base/command_line.h"
#include "base/files/file_proxy.h"
#include "base/files/file_util.h"
-#include "base/message_loop/message_loop.h"
+#include "base/location.h"
#include "base/metrics/histogram.h"
#include "base/path_service.h"
#include "base/pickle.h"
#include "base/rand_util.h"
+#include "base/single_thread_task_runner.h"
+#include "base/thread_task_runner_handle.h"
#include "base/time/time.h"
#include "base/win/windows_version.h"
#include "build/build_config.h"
@@ -381,7 +383,7 @@ void NaClBrowser::CheckWaiting() {
// process host.
for (std::vector<base::Closure>::iterator iter = waiting_.begin();
iter != waiting_.end(); ++iter) {
- base::MessageLoop::current()->PostTask(FROM_HERE, *iter);
+ base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE, *iter);
}
waiting_.clear();
}
@@ -512,11 +514,10 @@ void NaClBrowser::MarkValidationCacheAsModified() {
if (!validation_cache_is_modified_) {
// Wait before persisting to disk. This can coalesce multiple cache
// modifications info a single disk write.
- base::MessageLoop::current()->PostDelayedTask(
- FROM_HERE,
- base::Bind(&NaClBrowser::PersistValidationCache,
- weak_factory_.GetWeakPtr()),
- base::TimeDelta::FromMilliseconds(kValidationCacheCoalescingTimeMS));
+ base::ThreadTaskRunnerHandle::Get()->PostDelayedTask(
+ FROM_HERE, base::Bind(&NaClBrowser::PersistValidationCache,
+ weak_factory_.GetWeakPtr()),
+ base::TimeDelta::FromMilliseconds(kValidationCacheCoalescingTimeMS));
validation_cache_is_modified_ = true;
}
}
« no previous file with comments | « components/nacl/broker/nacl_broker_listener.cc ('k') | components/nacl/browser/nacl_process_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698