Commit 7d02aa39 authored by zelidrag@chromium.org's avatar zelidrag@chromium.org

Added a switch to let pass-through login tests skip OAuth verification part.

BUG=chromium-os:18740
TEST=make sure pass-through auth extension is working when we start chrome with --skip-oauth-login switch.
Review URL: http://codereview.chromium.org/7575030

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@95549 0039d316-1c4b-4281-b951-d872f2087c98
parent 3f5ae83d
...@@ -50,8 +50,11 @@ LoginPerformer::LoginPerformer(Delegate* delegate) ...@@ -50,8 +50,11 @@ LoginPerformer::LoginPerformer(Delegate* delegate)
screen_lock_requested_(false), screen_lock_requested_(false),
initial_online_auth_pending_(false), initial_online_auth_pending_(false),
auth_mode_(AUTH_MODE_INTERNAL), auth_mode_(AUTH_MODE_INTERNAL),
using_oauth_(CommandLine::ForCurrentProcess()->HasSwitch( using_oauth_(
switches::kWebUIGaiaLogin)), CommandLine::ForCurrentProcess()->HasSwitch(
switches::kWebUIGaiaLogin) &&
!CommandLine::ForCurrentProcess()->HasSwitch(
switches::kSkipOAuthLogin)),
method_factory_(this) { method_factory_(this) {
DCHECK(default_performer_ == NULL) DCHECK(default_performer_ == NULL)
<< "LoginPerformer should have only one instance."; << "LoginPerformer should have only one instance.";
......
...@@ -58,8 +58,11 @@ ParallelAuthenticator::ParallelAuthenticator(LoginStatusConsumer* consumer) ...@@ -58,8 +58,11 @@ ParallelAuthenticator::ParallelAuthenticator(LoginStatusConsumer* consumer)
: Authenticator(consumer), : Authenticator(consumer),
already_reported_success_(false), already_reported_success_(false),
checked_for_localaccount_(false), checked_for_localaccount_(false),
using_oauth_(CommandLine::ForCurrentProcess()->HasSwitch( using_oauth_(
switches::kWebUIGaiaLogin)) { CommandLine::ForCurrentProcess()->HasSwitch(
switches::kWebUIGaiaLogin) &&
!CommandLine::ForCurrentProcess()->HasSwitch(
switches::kSkipOAuthLogin)) {
CHECK(chromeos::CrosLibrary::Get()->EnsureLoaded()); CHECK(chromeos::CrosLibrary::Get()->EnsureLoaded());
// If not already owned, this is a no-op. If it is, this loads the owner's // If not already owned, this is a no-op. If it is, this loads the owner's
// public key off of disk. // public key off of disk.
......
...@@ -1030,8 +1030,11 @@ const char kWinHttpProxyResolver[] = "winhttp-proxy-resolver"; ...@@ -1030,8 +1030,11 @@ const char kWinHttpProxyResolver[] = "winhttp-proxy-resolver";
// Enable WebUI based login screens. // Enable WebUI based login screens.
const char kWebUILogin[] = "webui-login"; const char kWebUILogin[] = "webui-login";
// Skips OAuth part of ChromeOS login process.
const char kSkipOAuthLogin[] = "skip-oauth-login";
// Enable WebUI login screen hosted by GAIA authentication extension. // Enable WebUI login screen hosted by GAIA authentication extension.
const char kWebUIGaiaLogin[] = "webui-gaia-login"; const char kWebUIGaiaLogin[] = "webui-gaia-login";
// Enables device policy support on ChromeOS. // Enables device policy support on ChromeOS.
const char kEnableDevicePolicy[] = "enable-device-policy"; const char kEnableDevicePolicy[] = "enable-device-policy";
......
...@@ -283,6 +283,7 @@ extern const char kWinHttpProxyResolver[]; ...@@ -283,6 +283,7 @@ extern const char kWinHttpProxyResolver[];
#if defined(OS_CHROMEOS) #if defined(OS_CHROMEOS)
extern const char kWebUILogin[]; extern const char kWebUILogin[];
extern const char kWebUIGaiaLogin[]; extern const char kWebUIGaiaLogin[];
extern const char kSkipOAuthLogin[];
extern const char kEnableDevicePolicy[]; extern const char kEnableDevicePolicy[];
extern const char kEnableGView[]; extern const char kEnableGView[];
extern const char kEnableLoginImages[]; extern const char kEnableLoginImages[];
......
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