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

Unified Diff: chrome/browser/chromeos/input_method/component_extension_ime_manager_impl.cc

Issue 2952663003: Migrate a BrowserThread::PostTask to TaskScheduler (Closed)
Patch Set: Created 3 years, 6 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: chrome/browser/chromeos/input_method/component_extension_ime_manager_impl.cc
diff --git a/chrome/browser/chromeos/input_method/component_extension_ime_manager_impl.cc b/chrome/browser/chromeos/input_method/component_extension_ime_manager_impl.cc
index ef3dfbca34b4b28759c8d2f417b58531cedf237e..aa4682371f6d0c558d2c976213a007876c019283 100644
--- a/chrome/browser/chromeos/input_method/component_extension_ime_manager_impl.cc
+++ b/chrome/browser/chromeos/input_method/component_extension_ime_manager_impl.cc
@@ -15,6 +15,7 @@
#include "base/path_service.h"
#include "base/strings/string_util.h"
#include "base/sys_info.h"
+#include "base/task_scheduler/post_task.h"
#include "chrome/browser/extensions/component_loader.h"
#include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/profiles/profile.h"
@@ -22,7 +23,6 @@
#include "chrome/common/chrome_paths.h"
#include "chrome/common/extensions/extension_constants.h"
#include "chrome/grit/browser_resources.h"
-#include "content/public/browser/browser_thread.h"
#include "extensions/browser/extension_pref_value_map.h"
#include "extensions/browser/extension_pref_value_map_factory.h"
#include "extensions/browser/extension_system.h"
@@ -148,13 +148,10 @@ void ComponentExtensionIMEManagerImpl::Load(Profile* profile,
// and InputMethodEngine creation, so that the virtual keyboard web content
// url won't be override by IME component extensions.
base::FilePath* copied_file_path = new base::FilePath(file_path);
- content::BrowserThread::PostTaskAndReplyWithResult(
- content::BrowserThread::FILE,
- FROM_HERE,
- base::Bind(&CheckFilePath,
- base::Unretained(copied_file_path)),
- base::Bind(&OnFilePathChecked,
- base::Unretained(profile),
+ base::PostTaskWithTraitsAndReplyWithResult(
+ FROM_HERE, {base::MayBlock(), base::TaskPriority::BACKGROUND},
+ base::Bind(&CheckFilePath, base::Unretained(copied_file_path)),
+ base::Bind(&OnFilePathChecked, base::Unretained(profile),
base::Owned(new std::string(extension_id)),
base::Owned(new std::string(manifest)),
base::Owned(copied_file_path)));
« 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