| 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 | |
| 59 bool LoginScrollIntoViewEnabled() { | 54 bool LoginScrollIntoViewEnabled() { |
| 60 return !CommandLine::ForCurrentProcess()->HasSwitch( | 55 return !CommandLine::ForCurrentProcess()->HasSwitch( |
| 61 chromeos::switches::kDisableLoginScrollIntoView); | 56 chromeos::switches::kDisableLoginScrollIntoView); |
| 62 } | 57 } |
| 63 | 58 |
| 64 NetworkStateHelper::NetworkStateHelper() {} | 59 NetworkStateHelper::NetworkStateHelper() {} |
| 65 NetworkStateHelper::~NetworkStateHelper() {} | 60 NetworkStateHelper::~NetworkStateHelper() {} |
| 66 | 61 |
| 67 base::string16 NetworkStateHelper::GetCurrentNetworkName() const { | 62 base::string16 NetworkStateHelper::GetCurrentNetworkName() const { |
| 68 NetworkStateHandler* nsh = NetworkHandler::Get()->network_state_handler(); | 63 NetworkStateHandler* nsh = NetworkHandler::Get()->network_state_handler(); |
| (...skipping 24 matching lines...) Expand all Loading... |
| 93 bool NetworkStateHelper::IsConnecting() const { | 88 bool NetworkStateHelper::IsConnecting() const { |
| 94 chromeos::NetworkStateHandler* nsh = | 89 chromeos::NetworkStateHandler* nsh = |
| 95 chromeos::NetworkHandler::Get()->network_state_handler(); | 90 chromeos::NetworkHandler::Get()->network_state_handler(); |
| 96 return nsh->ConnectingNetworkByType( | 91 return nsh->ConnectingNetworkByType( |
| 97 chromeos::NetworkTypePattern::Default()) != NULL; | 92 chromeos::NetworkTypePattern::Default()) != NULL; |
| 98 } | 93 } |
| 99 | 94 |
| 100 } // namespace login | 95 } // namespace login |
| 101 | 96 |
| 102 } // namespace chromeos | 97 } // namespace chromeos |
| OLD | NEW |