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

Unified Diff: chrome/browser/google/google_brand_chromeos.cc

Issue 2546863002: Use TaskScheduler instead of WorkerPool in google_brand_chromeos.cc. (Closed)
Patch Set: Created 4 years 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/google/google_brand_chromeos.cc
diff --git a/chrome/browser/google/google_brand_chromeos.cc b/chrome/browser/google/google_brand_chromeos.cc
index 4fca66224b44830acc10ba1007692b8f65c467b9..87a732265eaeb98592f23d516554d18c3f48cf5a 100644
--- a/chrome/browser/google/google_brand_chromeos.cc
+++ b/chrome/browser/google/google_brand_chromeos.cc
@@ -7,8 +7,7 @@
#include "base/files/file_util.h"
#include "base/logging.h"
#include "base/strings/string_util.h"
-#include "base/task_runner_util.h"
-#include "base/threading/worker_pool.h"
+#include "base/task_scheduler/post_task.h"
#include "chrome/browser/browser_process.h"
#include "chrome/common/pref_names.h"
#include "chromeos/system/statistics_provider.h"
@@ -75,11 +74,13 @@ void InitBrand(const base::Closure& callback) {
return;
}
- base::PostTaskAndReplyWithResult(
- base::WorkerPool::GetTaskRunner(false /* task_is_slow */).get(),
- FROM_HERE,
- base::Bind(&ReadBrandFromFile),
- base::Bind(&SetBrand, callback));
+ base::PostTaskWithTraitsAndReplyWithResult(
+ FROM_HERE, base::TaskTraits()
+ .WithShutdownBehavior(
+ base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN)
+ .WithPriority(base::TaskPriority::BACKGROUND)
+ .WithFileIO(),
+ base::Bind(&ReadBrandFromFile), base::Bind(&SetBrand, callback));
}
} // namespace chromeos
« 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