Index: chrome/browser/ui/ash/chrome_screenshot_grabber.cc |
diff --git a/chrome/browser/ui/ash/chrome_screenshot_grabber.cc b/chrome/browser/ui/ash/chrome_screenshot_grabber.cc |
index 6fdb08ccd0eb1377cf6af322b31fe82ccbcbd1c8..4ec03eb8669347c993b0058d91e5df0a0b567be9 100644 |
--- a/chrome/browser/ui/ash/chrome_screenshot_grabber.cc |
+++ b/chrome/browser/ui/ash/chrome_screenshot_grabber.cc |
@@ -18,6 +18,7 @@ |
#include "base/metrics/user_metrics.h" |
#include "base/strings/stringprintf.h" |
#include "base/strings/utf_string_conversions.h" |
+#include "base/task_scheduler/post_task.h" |
#include "base/threading/sequenced_worker_pool.h" |
#include "build/build_config.h" |
#include "chrome/browser/browser_process.h" |
@@ -72,8 +73,6 @@ void CopyScreenshotToClipboard(scoped_refptr<base::RefCountedString> png_data) { |
} |
void ReadFileAndCopyToClipboardLocal(const base::FilePath& screenshot_path) { |
- DCHECK(content::BrowserThread::GetBlockingPool()->RunsTasksOnCurrentThread()); |
- |
scoped_refptr<base::RefCountedString> png_data(new base::RefCountedString()); |
if (!base::ReadFileToString(screenshot_path, &(png_data->data()))) { |
LOG(ERROR) << "Failed to read the screenshot file: " |
@@ -281,9 +280,12 @@ std::string GetScreenshotBaseFilename() { |
ChromeScreenshotGrabber::ChromeScreenshotGrabber() |
: screenshot_grabber_(new ui::ScreenshotGrabber( |
this, |
- content::BrowserThread::GetBlockingPool() |
- ->GetTaskRunnerWithShutdownBehavior( |
- base::SequencedWorkerPool::SKIP_ON_SHUTDOWN))), |
+ base::CreateTaskRunnerWithTraits( |
+ base::TaskTraits() |
+ .MayBlock() |
+ .WithPriority(base::TaskPriority::BACKGROUND) |
James Cook
2017/04/26 20:46:44
I think this should be USER_VISIBLE. The user is w
fdoray
2017/04/27 13:35:31
Done.
|
+ .WithShutdownBehavior( |
+ base::TaskShutdownBehavior::SKIP_ON_SHUTDOWN)))), |
profile_for_test_(NULL) { |
screenshot_grabber_->AddObserver(this); |
} |