Chromium Code Reviews| Index: chrome/browser/interstitials/chrome_controller_client.cc |
| diff --git a/chrome/browser/interstitials/chrome_controller_client.cc b/chrome/browser/interstitials/chrome_controller_client.cc |
| index 6f6e30f26488e3aef27b92e67a49cc9ef4c8a3c2..abab48a23504ad65f2b0228d8e60df98285b30aa 100644 |
| --- a/chrome/browser/interstitials/chrome_controller_client.cc |
| +++ b/chrome/browser/interstitials/chrome_controller_client.cc |
| @@ -42,24 +42,17 @@ using content::Referrer; |
| namespace { |
| -void LaunchDateAndTimeSettingsOnFile() { |
| +void LaunchDateAndTimeSettingsOnFileThread() { |
| DCHECK_CURRENTLY_ON(content::BrowserThread::FILE); |
| // The code for each OS is completely separate, in order to avoid bugs like |
| -// https://crbug.com/430877 . |
| +// https://crbug.com/430877 . ChromeOS is handled on the UI thread. |
| #if defined(OS_ANDROID) |
| chrome::android::OpenDateAndTimeSettings(); |
|
estark
2016/10/31 19:02:49
I wonder if this should be on the UI thread as wel
meacer
2016/10/31 21:38:22
Yeah, I was wondering the same thing.
I don't kn
|
| -#elif defined(OS_CHROMEOS) |
| - std::string sub_page = |
| - std::string(chrome::kSearchSubPage) + "#" + |
| - l10n_util::GetStringUTF8(IDS_OPTIONS_SETTINGS_SECTION_TITLE_DATETIME); |
| - chrome::ShowSettingsSubPageForProfile(ProfileManager::GetActiveUserProfile(), |
| - sub_page); |
| - |
| #elif defined(OS_LINUX) |
| struct ClockCommand { |
| - const char* pathname; |
| - const char* argument; |
| + const char* const pathname; |
| + const char* const argument; |
| }; |
| static const ClockCommand kClockCommands[] = { |
| // Unity |
| @@ -150,9 +143,19 @@ bool ChromeControllerClient::CanLaunchDateAndTimeSettings() { |
| } |
| void ChromeControllerClient::LaunchDateAndTimeSettings() { |
| + DCHECK_CURRENTLY_ON(content::BrowserThread::UI); |
| + |
| +#if defined(OS_CHROMEOS) |
| + const std::string sub_page = |
| + std::string(chrome::kSearchSubPage) + "#" + |
| + l10n_util::GetStringUTF8(IDS_OPTIONS_SETTINGS_SECTION_TITLE_DATETIME); |
| + chrome::ShowSettingsSubPageForProfile(ProfileManager::GetActiveUserProfile(), |
| + sub_page); |
| +#else |
| content::BrowserThread::PostTask( |
| content::BrowserThread::FILE, FROM_HERE, |
| - base::Bind(&LaunchDateAndTimeSettingsOnFile)); |
| + base::Bind(&LaunchDateAndTimeSettingsOnFileThread)); |
| +#endif |
| } |
| void ChromeControllerClient::GoBack() { |