Commit af84a1be authored by Mustafa Acer's avatar Mustafa Acer Committed by Commit Bot

Remove usage of FILE thread from interstitial controller client

Bug: 689520
Change-Id: I8608691b69c5cfa66d1937403fb8a0476a7cf7aa
Reviewed-on: https://chromium-review.googlesource.com/592449
Commit-Queue: Mustafa Emre Acer <meacer@chromium.org>
Reviewed-by: default avatarAdrienne Porter Felt <felt@chromium.org>
Cr-Commit-Position: refs/heads/master@{#490614}
parent cf28064f
......@@ -8,6 +8,7 @@
#include "base/command_line.h"
#include "base/files/file_util.h"
#include "base/process/launch.h"
#include "base/task_scheduler/post_task.h"
#include "build/build_config.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/interstitials/chrome_metrics_helper.h"
......@@ -39,8 +40,7 @@ using content::Referrer;
namespace {
#if !defined(OS_CHROMEOS)
void LaunchDateAndTimeSettingsOnFileThread() {
DCHECK_CURRENTLY_ON(content::BrowserThread::FILE);
void LaunchDateAndTimeSettingsImpl() {
// The code for each OS is completely separate, in order to avoid bugs like
// https://crbug.com/430877 . ChromeOS is handled on the UI thread.
#if defined(OS_ANDROID)
......@@ -108,8 +108,7 @@ void LaunchDateAndTimeSettingsOnFileThread() {
base::LaunchProcess(command, options);
#else
NOTREACHED();
#error Unsupported target architecture.
#endif
// Don't add code here! (See the comment at the beginning of the function.)
}
......@@ -145,8 +144,8 @@ void ChromeControllerClient::LaunchDateAndTimeSettings() {
chrome::ShowSettingsSubPageForProfile(ProfileManager::GetActiveUserProfile(),
chrome::kDateTimeSubPage);
#else
content::BrowserThread::PostTask(
content::BrowserThread::FILE, FROM_HERE,
base::BindOnce(&LaunchDateAndTimeSettingsOnFileThread));
base::PostTaskWithTraits(FROM_HERE,
{base::TaskPriority::USER_VISIBLE, base::MayBlock()},
base::BindOnce(&LaunchDateAndTimeSettingsImpl));
#endif
}
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