From fb580dd729ddfbd6729c8ba416f8b6f2d474a44b Mon Sep 17 00:00:00 2001 From: kolos Date: Tue, 16 May 2017 05:20:15 -0700 Subject: [PATCH] Revert of Use TaskScheduler instead of SequencedWorkerPool in snapshot_cache.mm. (patchset #2 id:20001 of https://codereview.chromium.org/2881873002/ ) Reason for revert: Probably this CL causes many failures of iOS bots. For example, https://build.chromium.org/p/chromium.mac/builders/ios-simulator/builds/17573 Original issue's description: > Use TaskScheduler instead of SequencedWorkerPool in snapshot_cache.mm. > > SequencedWorkerPool is being deprecated in favor of TaskScheduler. > > BUG=667892 > R=jif@chromium.org > > Review-Url: https://codereview.chromium.org/2881873002 > Cr-Commit-Position: refs/heads/master@{#472052} > Committed: https://chromium.googlesource.com/chromium/src/+/aa5299ae23a57ca5dce00a11da3ac8e73849351f TBR=jif@chromium.org,fdoray@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=667892 Review-Url: https://codereview.chromium.org/2889553002 Cr-Commit-Position: refs/heads/master@{#472065} --- ios/chrome/browser/snapshots/snapshot_cache.mm | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/ios/chrome/browser/snapshots/snapshot_cache.mm b/ios/chrome/browser/snapshots/snapshot_cache.mm index a58c12441ee1b6..7fb720d8c21ab9 100644 --- a/ios/chrome/browser/snapshots/snapshot_cache.mm +++ b/ios/chrome/browser/snapshots/snapshot_cache.mm @@ -18,7 +18,6 @@ #include "base/mac/scoped_nsobject.h" #include "base/strings/sys_string_conversions.h" #include "base/task_runner_util.h" -#include "base/task_scheduler/post_task.h" #include "base/threading/thread_restrictions.h" #include "ios/chrome/browser/experimental_flags.h" #import "ios/chrome/browser/snapshots/lru_cache.h" @@ -575,10 +574,9 @@ - (void)saveGreyInBackgroundForSessionID:(NSString*)sessionID { } } - base::PostTaskWithTraits( - FROM_HERE, {base::MayBlock(), base::TaskPriority::USER_VISIBLE}, - base::BindOnce(&ConvertAndSaveGreyImage, colorImagePath, greyImagePath, - backgroundingColorImage_)); + web::WebThread::PostBlockingPoolTask( + FROM_HERE, base::Bind(&ConvertAndSaveGreyImage, colorImagePath, + greyImagePath, backgroundingColorImage_)); } @end