| Index: chrome/browser/chromeos/login/startup_utils.cc
|
| diff --git a/chrome/browser/chromeos/login/startup_utils.cc b/chrome/browser/chromeos/login/startup_utils.cc
|
| index c136ea3f2a242f2b4e942a436a754cd0c5d66c40..1a0d47f4220048e79316c71c812a479367ca2571 100644
|
| --- a/chrome/browser/chromeos/login/startup_utils.cc
|
| +++ b/chrome/browser/chromeos/login/startup_utils.cc
|
| @@ -13,7 +13,6 @@
|
| #include "base/sys_info.h"
|
| #include "base/threading/thread_restrictions.h"
|
| #include "chrome/browser/browser_process.h"
|
| -#include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h"
|
| #include "chrome/common/chrome_paths.h"
|
| #include "chrome/common/extensions/features/feature_channel.h"
|
| #include "chrome/common/pref_names.h"
|
| @@ -60,7 +59,7 @@ void StartupUtils::RegisterPrefs(PrefRegistrySimple* registry) {
|
| registry->RegisterBooleanPref(prefs::kEnrollmentRecoveryRequired, false);
|
| registry->RegisterStringPref(prefs::kInitialLocale, "en-US");
|
| registry->RegisterBooleanPref(prefs::kNewOobe, false);
|
| - registry->RegisterBooleanPref(prefs::kWebviewSigninDisabled, false);
|
| + registry->RegisterBooleanPref(prefs::kWebviewSigninEnabled, false);
|
| }
|
|
|
| // static
|
| @@ -180,41 +179,25 @@ std::string StartupUtils::GetInitialLocale() {
|
|
|
| // static
|
| bool StartupUtils::IsWebviewSigninAllowed() {
|
| - return !base::CommandLine::ForCurrentProcess()->HasSwitch(
|
| - switches::kDisableWebviewSigninFlow);
|
| + return extensions::GetCurrentChannel() <= chrome::VersionInfo::CHANNEL_DEV &&
|
| + !base::CommandLine::ForCurrentProcess()->HasSwitch(
|
| + switches::kDisableWebviewSigninFlow);
|
| }
|
|
|
| // static
|
| bool StartupUtils::IsWebviewSigninEnabled() {
|
| - policy::DeviceCloudPolicyManagerChromeOS* policy_manager =
|
| - g_browser_process
|
| - ? g_browser_process->platform_part()
|
| - ->browser_policy_connector_chromeos()
|
| - ->GetDeviceCloudPolicyManager()
|
| - : nullptr;
|
| -
|
| - bool is_remora_or_shark_requisition =
|
| - policy_manager
|
| - ? policy_manager->IsRemoraRequisition() ||
|
| - policy_manager->IsSharkRequisition()
|
| - : false;
|
| -
|
| - bool is_webview_disabled_pref = g_browser_process->local_state()->GetBoolean(
|
| - prefs::kWebviewSigninDisabled);
|
| -
|
| - // TODO(dzhioev): Re-enable webview signin for remora/shark requisition
|
| - // http://crbug.com/464049
|
| - return !is_remora_or_shark_requisition && IsWebviewSigninAllowed() &&
|
| - !is_webview_disabled_pref;
|
| + return IsWebviewSigninAllowed() &&
|
| + g_browser_process->local_state()->GetBoolean(
|
| + prefs::kWebviewSigninEnabled);
|
| }
|
|
|
| // static
|
| bool StartupUtils::EnableWebviewSignin(bool is_enabled) {
|
| - if (is_enabled && !IsWebviewSigninAllowed())
|
| + if (!IsWebviewSigninAllowed())
|
| return false;
|
|
|
| - g_browser_process->local_state()->SetBoolean(prefs::kWebviewSigninDisabled,
|
| - !is_enabled);
|
| + g_browser_process->local_state()->SetBoolean(prefs::kWebviewSigninEnabled,
|
| + is_enabled);
|
| return true;
|
| }
|
|
|
|
|