OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/helper.h" | 5 #include "chrome/browser/chromeos/login/helper.h" |
6 | 6 |
7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
10 #include "chrome/browser/chromeos/login/users/user_manager.h" | 10 #include "chrome/browser/chromeos/login/users/user_manager.h" |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 } | 44 } |
45 | 45 |
46 namespace login { | 46 namespace login { |
47 | 47 |
48 std::string CanonicalizeUserID(const std::string& user_id) { | 48 std::string CanonicalizeUserID(const std::string& user_id) { |
49 if (user_id == UserManager::kGuestUserName) | 49 if (user_id == UserManager::kGuestUserName) |
50 return user_id; | 50 return user_id; |
51 return gaia::CanonicalizeEmail(user_id); | 51 return gaia::CanonicalizeEmail(user_id); |
52 } | 52 } |
53 | 53 |
| 54 bool LockScrollIntoViewEnabled() { |
| 55 return !CommandLine::ForCurrentProcess()->HasSwitch( |
| 56 chromeos::switches::kDisableLockScrollIntoView); |
| 57 } |
| 58 |
54 bool LoginScrollIntoViewEnabled() { | 59 bool LoginScrollIntoViewEnabled() { |
55 return !CommandLine::ForCurrentProcess()->HasSwitch( | 60 return !CommandLine::ForCurrentProcess()->HasSwitch( |
56 chromeos::switches::kDisableLoginScrollIntoView); | 61 chromeos::switches::kDisableLoginScrollIntoView); |
57 } | 62 } |
58 | 63 |
59 NetworkStateHelper::NetworkStateHelper() {} | 64 NetworkStateHelper::NetworkStateHelper() {} |
60 NetworkStateHelper::~NetworkStateHelper() {} | 65 NetworkStateHelper::~NetworkStateHelper() {} |
61 | 66 |
62 base::string16 NetworkStateHelper::GetCurrentNetworkName() const { | 67 base::string16 NetworkStateHelper::GetCurrentNetworkName() const { |
63 NetworkStateHandler* nsh = NetworkHandler::Get()->network_state_handler(); | 68 NetworkStateHandler* nsh = NetworkHandler::Get()->network_state_handler(); |
(...skipping 24 matching lines...) Expand all Loading... |
88 bool NetworkStateHelper::IsConnecting() const { | 93 bool NetworkStateHelper::IsConnecting() const { |
89 chromeos::NetworkStateHandler* nsh = | 94 chromeos::NetworkStateHandler* nsh = |
90 chromeos::NetworkHandler::Get()->network_state_handler(); | 95 chromeos::NetworkHandler::Get()->network_state_handler(); |
91 return nsh->ConnectingNetworkByType( | 96 return nsh->ConnectingNetworkByType( |
92 chromeos::NetworkTypePattern::Default()) != NULL; | 97 chromeos::NetworkTypePattern::Default()) != NULL; |
93 } | 98 } |
94 | 99 |
95 } // namespace login | 100 } // namespace login |
96 | 101 |
97 } // namespace chromeos | 102 } // namespace chromeos |
OLD | NEW |