OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/chromeos/login/login_performer.h" | 5 #include "chrome/browser/chromeos/login/login_performer.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 // static | 43 // static |
44 LoginPerformer* LoginPerformer::default_performer_ = NULL; | 44 LoginPerformer* LoginPerformer::default_performer_ = NULL; |
45 | 45 |
46 LoginPerformer::LoginPerformer(Delegate* delegate) | 46 LoginPerformer::LoginPerformer(Delegate* delegate) |
47 : last_login_failure_(LoginFailure::None()), | 47 : last_login_failure_(LoginFailure::None()), |
48 delegate_(delegate), | 48 delegate_(delegate), |
49 password_changed_(false), | 49 password_changed_(false), |
50 screen_lock_requested_(false), | 50 screen_lock_requested_(false), |
51 initial_online_auth_pending_(false), | 51 initial_online_auth_pending_(false), |
52 auth_mode_(AUTH_MODE_INTERNAL), | 52 auth_mode_(AUTH_MODE_INTERNAL), |
53 using_oauth_(CommandLine::ForCurrentProcess()->HasSwitch( | 53 using_oauth_( |
54 switches::kWebUIGaiaLogin)), | 54 CommandLine::ForCurrentProcess()->HasSwitch( |
| 55 switches::kWebUIGaiaLogin) && |
| 56 !CommandLine::ForCurrentProcess()->HasSwitch( |
| 57 switches::kSkipOAuthLogin)), |
55 method_factory_(this) { | 58 method_factory_(this) { |
56 DCHECK(default_performer_ == NULL) | 59 DCHECK(default_performer_ == NULL) |
57 << "LoginPerformer should have only one instance."; | 60 << "LoginPerformer should have only one instance."; |
58 default_performer_ = this; | 61 default_performer_ = this; |
59 } | 62 } |
60 | 63 |
61 LoginPerformer::~LoginPerformer() { | 64 LoginPerformer::~LoginPerformer() { |
62 DVLOG(1) << "Deleting LoginPerformer"; | 65 DVLOG(1) << "Deleting LoginPerformer"; |
63 DCHECK(default_performer_ != NULL) << "Default instance should exist."; | 66 DCHECK(default_performer_ != NULL) << "Default instance should exist."; |
64 default_performer_ = NULL; | 67 default_performer_ = NULL; |
(...skipping 517 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
582 profile, | 585 profile, |
583 username_, | 586 username_, |
584 password_, | 587 password_, |
585 captcha_token_, | 588 captcha_token_, |
586 captcha_)); | 589 captcha_)); |
587 } | 590 } |
588 password_.clear(); | 591 password_.clear(); |
589 } | 592 } |
590 | 593 |
591 } // namespace chromeos | 594 } // namespace chromeos |
OLD | NEW |