Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4282)

Unified Diff: chrome/browser/chromeos/login/startup_utils.cc

Issue 1083683003: Speculative revert by sheriff (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed an unrelated commit that had accidentally slipped in. Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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;
}
« no previous file with comments | « chrome/browser/chromeos/login/signin/oauth2_browsertest.cc ('k') | chrome/browser/chromeos/login/test/oobe_base_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698