Commit 44036d05 authored by kelvinp's avatar kelvinp Committed by Commit bot

Manual revert of Timezone auto update option should be available by default.

Reason for revert:
4000+ browser test are failing on ChromeOS after this patch and this is the only patch that touches ChromeOS in the blamelist.

Seems like with the switch enabled, we are creating the GetTimezoneResolver that leaks the g_browser_process->system_request_context()

Sample failure:
http://build.chromium.org/p/chromium.chromiumos/builders/Linux%20ChromiumOS%20Tests%20%28dbg%29%281%29/builds/37149

Original issue's description:
> https://codereview.chromium.org/898503002
> Timezone auto update option should be available by default.
>
> This CL makes "timezone auto update" feature available (but > switched off by
> default) to users. And adds flag to disable this feature.
>
> BUG=416494
> TEST=manual
>
> Committed:
> https://crrev.com/13bb9e13b4719c96112ca8770d2c7b48c23e150d
> Cr-Commit-Position: refs/heads/master@{#314615}

TBR=alemate
TEST=MANUAL
NOTRY=true
NOTREECHECKS=true
NOPRESUBMIT=true

Review URL: https://codereview.chromium.org/899113002

Cr-Commit-Position: refs/heads/master@{#314663}
parent 5c30a4d6
......@@ -6035,11 +6035,11 @@ All users must sign out to continue.
System time
</message>
<message name="IDS_FLAGS_DISABLE_RESOLVE_TIMEZONE_BY_GEOLOCATION_NAME" desc="Title for the flag to disable automatic timezone update on user location change.">
Disable automatic timezone update by geolocation
<message name="IDS_FLAGS_ENABLE_RESOLVE_TIMEZONE_BY_GEOLOCATION_NAME" desc="Title for the flag to enable/disable user setting to automatically update timezone by user geolocation.">
Automatically resolve timezone by geolocation
</message>
<message name="IDS_FLAGS_DISABLE_RESOLVE_TIMEZONE_BY_GEOLOCATION_DESCRIPTION" desc="Description for the flag to disable user setting to automatically update timezone by user geolocation.">
If set, automatic timezone update by the current geolocation is turned off.
<message name="IDS_FLAGS_ENABLE_RESOLVE_TIMEZONE_BY_GEOLOCATION_DESCRIPTION" desc="Description for the flag to enable/disable user setting to automatically update timezone by user geolocation.">
If enabled, in chrome://settings a new option becomes available which allows automatically updating the timezone by the current geolocation.
</message>
<message name="IDS_OPTIONS_RESOLVE_TIMEZONE_BY_GEOLOCATION_DESCRIPTION" desc="Label for checkbox to allow automatic timezone update by user geolocation.">
Automatically resolve timezone by geolocation
......
......@@ -2145,11 +2145,11 @@ const Experiment kExperiments[] = {
#endif // defined(OS_MACOSX)
#if defined(OS_CHROMEOS)
{
"disable-timezone-tracking",
IDS_FLAGS_DISABLE_RESOLVE_TIMEZONE_BY_GEOLOCATION_NAME,
IDS_FLAGS_DISABLE_RESOLVE_TIMEZONE_BY_GEOLOCATION_DESCRIPTION,
"enable-timezone-tracking",
IDS_FLAGS_ENABLE_RESOLVE_TIMEZONE_BY_GEOLOCATION_NAME,
IDS_FLAGS_ENABLE_RESOLVE_TIMEZONE_BY_GEOLOCATION_DESCRIPTION,
kOsCrOS,
SINGLE_VALUE_TYPE(chromeos::switches::kDisableTimeZoneTrackingOption)
SINGLE_VALUE_TYPE(chromeos::switches::kEnableTimeZoneTrackingOption)
},
#endif // defined(OS_CHROMEOS)
......
......@@ -1123,8 +1123,8 @@ void LoginDisplayHostImpl::OnLoginPromptVisible() {
}
void LoginDisplayHostImpl::StartTimeZoneResolve() {
if (base::CommandLine::ForCurrentProcess()->HasSwitch(
chromeos::switches::kDisableTimeZoneTrackingOption)) {
if (!base::CommandLine::ForCurrentProcess()->HasSwitch(
chromeos::switches::kEnableTimeZoneTrackingOption)) {
return;
}
......
......@@ -1048,8 +1048,8 @@ void ChromeUserManagerImpl::UpdateNumberOfUsers() {
}
void ChromeUserManagerImpl::UpdateUserTimeZoneRefresher(Profile* profile) {
if (base::CommandLine::ForCurrentProcess()->HasSwitch(
chromeos::switches::kDisableTimeZoneTrackingOption)) {
if (!base::CommandLine::ForCurrentProcess()->HasSwitch(
chromeos::switches::kEnableTimeZoneTrackingOption)) {
return;
}
......
......@@ -681,11 +681,11 @@ void BrowserOptionsHandler::GetLocalizedValues(base::DictionaryValue* values) {
"showWakeOnWifi",
chromeos::WakeOnWifiManager::Get()->WakeOnWifiSupported() &&
chromeos::switches::WakeOnWifiEnabled());
const bool have_disable_time_zone_tracking_option_switch =
const bool have_enable_time_zone_tracking_option_switch =
base::CommandLine::ForCurrentProcess()->HasSwitch(
chromeos::switches::kDisableTimeZoneTrackingOption);
chromeos::switches::kEnableTimeZoneTrackingOption);
values->SetBoolean("enableTimeZoneTrackingOption",
!have_disable_time_zone_tracking_option_switch &&
have_enable_time_zone_tracking_option_switch &&
!chromeos::system::HasSystemTimezonePolicy());
#endif
}
......
......@@ -304,9 +304,8 @@ const char kArtifactsDir[] = "artifacts-dir";
const char kEnableCaptivePortalBypassProxy[] =
"enable-captive-portal-bypass-proxy";
// Disable automatic timezone update.
const char kDisableTimeZoneTrackingOption[] =
"disable-timezone-tracking-option";
// Enable automatic timezone update.
const char kEnableTimeZoneTrackingOption[] = "enable-timezone-tracking-option";
bool WakeOnWifiEnabled() {
return !base::CommandLine::ForCurrentProcess()->HasSwitch(kDisableWakeOnWifi);
......
......@@ -99,7 +99,7 @@ CHROMEOS_EXPORT extern const char kSystemDevMode[];
CHROMEOS_EXPORT extern const char kTestAutoUpdateUI[];
CHROMEOS_EXPORT extern const char kWakeOnPackets[];
CHROMEOS_EXPORT extern const char kEnableCaptivePortalBypassProxy[];
CHROMEOS_EXPORT extern const char kDisableTimeZoneTrackingOption[];
CHROMEOS_EXPORT extern const char kEnableTimeZoneTrackingOption[];
CHROMEOS_EXPORT bool WakeOnWifiEnabled();
......
......@@ -51012,7 +51012,6 @@ To add a new entry, add it with any value and run test to compute valid value.
<int value="1221559505" label="enable-spelling-feedback-field-trial"/>
<int value="1237297772" label="no-pings"/>
<int value="1245889469" label="enable-surface-worker"/>
<int value="1250071868" label="disable-timezone-tracking-option"/>
<int value="1257980502" label="disable-accelerated-video-decode"/>
<int value="1268470658" label="disable-android-password-link"/>
<int value="1279584261" label="enable-carrier-switching"/>
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