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 @@ ...@@ -8,6 +8,7 @@
#include "base/command_line.h" #include "base/command_line.h"
#include "base/files/file_util.h" #include "base/files/file_util.h"
#include "base/process/launch.h" #include "base/process/launch.h"
#include "base/task_scheduler/post_task.h"
#include "build/build_config.h" #include "build/build_config.h"
#include "chrome/browser/browser_process.h" #include "chrome/browser/browser_process.h"
#include "chrome/browser/interstitials/chrome_metrics_helper.h" #include "chrome/browser/interstitials/chrome_metrics_helper.h"
...@@ -39,8 +40,7 @@ using content::Referrer; ...@@ -39,8 +40,7 @@ using content::Referrer;
namespace { namespace {
#if !defined(OS_CHROMEOS) #if !defined(OS_CHROMEOS)
void LaunchDateAndTimeSettingsOnFileThread() { void LaunchDateAndTimeSettingsImpl() {
DCHECK_CURRENTLY_ON(content::BrowserThread::FILE);
// The code for each OS is completely separate, in order to avoid bugs like // 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. // https://crbug.com/430877 . ChromeOS is handled on the UI thread.
#if defined(OS_ANDROID) #if defined(OS_ANDROID)
...@@ -108,8 +108,7 @@ void LaunchDateAndTimeSettingsOnFileThread() { ...@@ -108,8 +108,7 @@ void LaunchDateAndTimeSettingsOnFileThread() {
base::LaunchProcess(command, options); base::LaunchProcess(command, options);
#else #else
NOTREACHED(); #error Unsupported target architecture.
#endif #endif
// Don't add code here! (See the comment at the beginning of the function.) // Don't add code here! (See the comment at the beginning of the function.)
} }
...@@ -145,8 +144,8 @@ void ChromeControllerClient::LaunchDateAndTimeSettings() { ...@@ -145,8 +144,8 @@ void ChromeControllerClient::LaunchDateAndTimeSettings() {
chrome::ShowSettingsSubPageForProfile(ProfileManager::GetActiveUserProfile(), chrome::ShowSettingsSubPageForProfile(ProfileManager::GetActiveUserProfile(),
chrome::kDateTimeSubPage); chrome::kDateTimeSubPage);
#else #else
content::BrowserThread::PostTask( base::PostTaskWithTraits(FROM_HERE,
content::BrowserThread::FILE, FROM_HERE, {base::TaskPriority::USER_VISIBLE, base::MayBlock()},
base::BindOnce(&LaunchDateAndTimeSettingsOnFileThread)); base::BindOnce(&LaunchDateAndTimeSettingsImpl));
#endif #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