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

Unified Diff: content/browser/frame_host/navigation_entry_screenshot_manager.cc

Issue 2604343002: Use TaskScheduler instead of WorkerPool in navigation_entry_screenshot_manager.cc. (Closed)
Patch Set: Created 3 years, 12 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: content/browser/frame_host/navigation_entry_screenshot_manager.cc
diff --git a/content/browser/frame_host/navigation_entry_screenshot_manager.cc b/content/browser/frame_host/navigation_entry_screenshot_manager.cc
index 44bc2a03faa361a7d92d3320c7ea729885e526cd..01f90564b60794239da94522326a7aeff68fead5 100644
--- a/content/browser/frame_host/navigation_entry_screenshot_manager.cc
+++ b/content/browser/frame_host/navigation_entry_screenshot_manager.cc
@@ -6,7 +6,7 @@
#include "base/command_line.h"
#include "base/macros.h"
-#include "base/threading/worker_pool.h"
+#include "base/task_scheduler/post_task.h"
#include "content/browser/frame_host/navigation_controller_impl.h"
#include "content/browser/frame_host/navigation_entry_impl.h"
#include "content/browser/renderer_host/render_view_host_impl.h"
@@ -32,14 +32,10 @@ class ScreenshotData : public base::RefCountedThreadSafe<ScreenshotData> {
}
void EncodeScreenshot(const SkBitmap& bitmap, base::Closure callback) {
- if (!base::WorkerPool::PostTaskAndReply(FROM_HERE,
- base::Bind(&ScreenshotData::EncodeOnWorker,
- this,
- bitmap),
- callback,
- true)) {
alexmos 2017/01/03 19:19:06 Is there's an equivalent to task_is_slow in TaskSc
fdoray 2017/01/04 00:27:09 |task_is_slow| is ignored by WorkerPool and develo
alexmos 2017/01/04 01:00:08 At least on Windows, it seems to be used to add WT
fdoray 2017/01/04 02:13:15 Our experiments show that this flag is ignored on
- callback.Run();
- }
+ base::PostTaskWithTraitsAndReply(
+ FROM_HERE, base::TaskTraits().WithShutdownBehavior(
+ base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN),
+ base::Bind(&ScreenshotData::EncodeOnWorker, this, bitmap), callback);
}
scoped_refptr<base::RefCountedBytes> data() const { return data_; }
« 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