Commit d9d43422 authored by xdai's avatar xdai Committed by Commit Bot

Remove GetBlockingPool() in wallpaper_manager.cc file.

The blocking pool has been deprecated in favor of TaskScheduler.

Bug: 667892
Change-Id: Iabaa23abc14ade5b5c0e4ed9bee6b8f574d7b689
Reviewed-on: https://chromium-review.googlesource.com/571306Reviewed-by: default avatarAchuith Bhandarkar <achuith@chromium.org>
Commit-Queue: Xiaoqian Dai <xdai@chromium.org>
Cr-Commit-Position: refs/heads/master@{#486943}
parent 1ffe5f17
...@@ -678,9 +678,9 @@ void WallpaperManager::SetCustomWallpaper( ...@@ -678,9 +678,9 @@ void WallpaperManager::SetCustomWallpaper(
// Block shutdown on this task. Otherwise, we may lose the custom wallpaper // Block shutdown on this task. Otherwise, we may lose the custom wallpaper
// that the user selected. // that the user selected.
scoped_refptr<base::SequencedTaskRunner> blocking_task_runner = scoped_refptr<base::SequencedTaskRunner> blocking_task_runner =
BrowserThread::GetBlockingPool() base::CreateSequencedTaskRunnerWithTraits(
->GetSequencedTaskRunnerWithShutdownBehavior( {base::MayBlock(), base::TaskPriority::USER_BLOCKING,
sequence_token_, base::SequencedWorkerPool::BLOCK_SHUTDOWN); base::TaskShutdownBehavior::BLOCK_SHUTDOWN});
// TODO(bshe): This may break if RawImage becomes RefCountedMemory. // TODO(bshe): This may break if RawImage becomes RefCountedMemory.
blocking_task_runner->PostTask( blocking_task_runner->PostTask(
FROM_HERE, base::BindOnce(&WallpaperManager::SaveCustomWallpaper, FROM_HERE, base::BindOnce(&WallpaperManager::SaveCustomWallpaper,
...@@ -982,12 +982,9 @@ WallpaperManager::WallpaperManager() ...@@ -982,12 +982,9 @@ WallpaperManager::WallpaperManager()
content::NotificationService::AllSources()); content::NotificationService::AllSources());
registrar_.Add(this, chrome::NOTIFICATION_WALLPAPER_ANIMATION_FINISHED, registrar_.Add(this, chrome::NOTIFICATION_WALLPAPER_ANIMATION_FINISHED,
content::NotificationService::AllSources()); content::NotificationService::AllSources());
sequence_token_ = BrowserThread::GetBlockingPool()->GetNamedSequenceToken( task_runner_ = base::CreateSequencedTaskRunnerWithTraits(
wallpaper::kWallpaperSequenceTokenName); {base::MayBlock(), base::TaskPriority::USER_BLOCKING,
task_runner_ = base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN});
BrowserThread::GetBlockingPool()
->GetSequencedTaskRunnerWithShutdownBehavior(
sequence_token_, base::SequencedWorkerPool::CONTINUE_ON_SHUTDOWN);
user_manager::UserManager::Get()->AddSessionStateObserver(this); user_manager::UserManager::Get()->AddSessionStateObserver(this);
......
...@@ -594,9 +594,6 @@ class WALLPAPER_EXPORT WallpaperManagerBase { ...@@ -594,9 +594,6 @@ class WALLPAPER_EXPORT WallpaperManagerBase {
base::ThreadChecker thread_checker_; base::ThreadChecker thread_checker_;
// Sequence token associated with wallpaper operations.
base::SequencedWorkerPool::SequenceToken sequence_token_;
// Wallpaper sequenced task runner. // Wallpaper sequenced task runner.
scoped_refptr<base::SequencedTaskRunner> task_runner_; scoped_refptr<base::SequencedTaskRunner> task_runner_;
...@@ -644,4 +641,4 @@ class WALLPAPER_EXPORT WallpaperManagerBase { ...@@ -644,4 +641,4 @@ class WALLPAPER_EXPORT WallpaperManagerBase {
} // namespace wallpaper } // namespace wallpaper
#endif // COMPONENTS_WALLPAPER_WALLPAPER_MANAGER_BASE_H_ #endif // COMPONENTS_WALLPAPER_WALLPAPER_MANAGER_BASE_H_
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment