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

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

Issue 2871303004: Rename TaskRunner::RunsTasksOnCurrentThread() in //chrome (Closed)
Patch Set: 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..9370d1651e5429e639b9a2d1cf41bf839fa5b18b 100644
--- a/chrome/browser/chromeos/system/input_device_settings_impl_x11.cc
+++ b/chrome/browser/chromeos/system/input_device_settings_impl_x11.cc
@@ -47,13 +47,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 +105,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;

Powered by Google App Engine
This is Rietveld 408576698