OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/ui/webui/chromeos/login/signin_screen_handler.h" | 5 #include "chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h" |
6 | 6 |
7 #include "base/callback.h" | 7 #include "base/callback.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 998 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1009 if (!gaia_origin_for_test_.empty()) | 1009 if (!gaia_origin_for_test_.empty()) |
1010 gaia_origin = gaia_origin_for_test_; | 1010 gaia_origin = gaia_origin_for_test_; |
1011 params.SetString("gaiaOrigin", gaia_origin); | 1011 params.SetString("gaiaOrigin", gaia_origin); |
1012 const CommandLine* command_line = CommandLine::ForCurrentProcess(); | 1012 const CommandLine* command_line = CommandLine::ForCurrentProcess(); |
1013 if (command_line->HasSwitch(::switches::kGaiaUrlPath)) { | 1013 if (command_line->HasSwitch(::switches::kGaiaUrlPath)) { |
1014 params.SetString("gaiaUrlPath", | 1014 params.SetString("gaiaUrlPath", |
1015 command_line->GetSwitchValueASCII(::switches::kGaiaUrlPath)); | 1015 command_line->GetSwitchValueASCII(::switches::kGaiaUrlPath)); |
1016 } | 1016 } |
1017 | 1017 |
1018 // Test automation data: | 1018 // Test automation data: |
1019 if (command_line->HasSwitch(::switches::kAuthExtensionPath)) { | 1019 if (command_line->HasSwitch(switches::kAuthExtensionPath)) { |
1020 if (!test_user_.empty()) { | 1020 if (!test_user_.empty()) { |
1021 params.SetString("test_email", test_user_); | 1021 params.SetString("test_email", test_user_); |
1022 test_user_.clear(); | 1022 test_user_.clear(); |
1023 } | 1023 } |
1024 if (!test_pass_.empty()) { | 1024 if (!test_pass_.empty()) { |
1025 params.SetString("test_password", test_pass_); | 1025 params.SetString("test_password", test_pass_); |
1026 test_pass_.clear(); | 1026 test_pass_.clear(); |
1027 } | 1027 } |
1028 } | 1028 } |
1029 CallJS("login.GaiaSigninScreen.loadAuthExtension", params); | 1029 CallJS("login.GaiaSigninScreen.loadAuthExtension", params); |
(...skipping 529 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1559 if (!cros_settings) | 1559 if (!cros_settings) |
1560 return false; | 1560 return false; |
1561 | 1561 |
1562 // Offline login is allowed only when user pods are hidden. | 1562 // Offline login is allowed only when user pods are hidden. |
1563 bool show_pods; | 1563 bool show_pods; |
1564 cros_settings->GetBoolean(kAccountsPrefShowUserNamesOnSignIn, &show_pods); | 1564 cros_settings->GetBoolean(kAccountsPrefShowUserNamesOnSignIn, &show_pods); |
1565 return !show_pods; | 1565 return !show_pods; |
1566 } | 1566 } |
1567 | 1567 |
1568 } // namespace chromeos | 1568 } // namespace chromeos |
OLD | NEW |