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_; } |