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

Unified Diff: chrome/browser/chromeos/system/input_device_settings_impl_x11.cc

Issue 2871303004: Rename TaskRunner::RunsTasksOnCurrentThread() in //chrome (Closed)
Patch Set: fixed build error Created 3 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
Index: chrome/browser/chromeos/system/input_device_settings_impl_x11.cc
diff --git a/chrome/browser/chromeos/system/input_device_settings_impl_x11.cc b/chrome/browser/chromeos/system/input_device_settings_impl_x11.cc
index 1e042f00f34690841be4262b4a3008095a521870..99e1a3944ac8ef7eff59b52a20b350a5ec963930 100644
--- a/chrome/browser/chromeos/system/input_device_settings_impl_x11.cc
+++ b/chrome/browser/chromeos/system/input_device_settings_impl_x11.cc
@@ -22,6 +22,7 @@
#include "base/sys_info.h"
#include "base/task_runner.h"
#include "base/threading/sequenced_worker_pool.h"
+#include "base/threading/thread_restrictions.h"
#include "chrome/browser/chromeos/system/fake_input_device_settings.h"
#include "content/public/browser/browser_thread.h"
#include "ui/events/base_event_utils.h"
@@ -47,13 +48,13 @@ const char kInternalTouchpadName[] = "Elan Touchpad";
typedef base::RefCountedData<bool> RefCountedBool;
bool ScriptExists(const std::string& script) {
- DCHECK(content::BrowserThread::GetBlockingPool()->RunsTasksOnCurrentThread());
+ base::ThreadRestrictions::AssertIOAllowed();
return base::PathExists(base::FilePath(script));
}
// Executes the input control script asynchronously, if it exists.
void ExecuteScriptOnFileThread(const std::vector<std::string>& argv) {
- DCHECK(content::BrowserThread::GetBlockingPool()->RunsTasksOnCurrentThread());
+ base::ThreadRestrictions::AssertIOAllowed();
DCHECK(!argv.empty());
const std::string& script(argv[0]);
@@ -105,7 +106,7 @@ void AddTPControlArguments(const char* control,
void DeviceExistsBlockingPool(const char* device_type,
scoped_refptr<RefCountedBool> exists) {
- DCHECK(content::BrowserThread::GetBlockingPool()->RunsTasksOnCurrentThread());
+ base::ThreadRestrictions::AssertIOAllowed();
exists->data = false;
if (!ScriptExists(kInputControl))
return;
« no previous file with comments | « chrome/browser/chromeos/power/freezer_cgroup_process_manager.cc ('k') | chrome/browser/conflicts/module_database_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698