| 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 // This file contains helper functions used by Chromium OS login. | 5 // This file contains helper functions used by Chromium OS login. |
| 6 | 6 |
| 7 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_HELPER_H_ | 7 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_HELPER_H_ |
| 8 #define CHROME_BROWSER_CHROMEOS_LOGIN_HELPER_H_ | 8 #define CHROME_BROWSER_CHROMEOS_LOGIN_HELPER_H_ |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 | 37 |
| 38 // Maximum size of user image, in which it should be saved to be properly | 38 // Maximum size of user image, in which it should be saved to be properly |
| 39 // displayed under all possible DPI values. | 39 // displayed under all possible DPI values. |
| 40 const int kMaxUserImageSize = 512; | 40 const int kMaxUserImageSize = 512; |
| 41 | 41 |
| 42 // Canonicalizes a GAIA user ID, accounting for the legacy guest mode user ID | 42 // Canonicalizes a GAIA user ID, accounting for the legacy guest mode user ID |
| 43 // which does trips up gaia::CanonicalizeEmail() because it does not contain an | 43 // which does trips up gaia::CanonicalizeEmail() because it does not contain an |
| 44 // @ symbol. | 44 // @ symbol. |
| 45 std::string CanonicalizeUserID(const std::string& user_id); | 45 std::string CanonicalizeUserID(const std::string& user_id); |
| 46 | 46 |
| 47 // Returns true if login should scroll user pods into view itself when virtual |
| 48 // keyboard is shown and disable vk overscroll. |
| 49 bool LoginScrollIntoViewEnabled(); |
| 50 |
| 47 // A helper class for easily mocking out Network*Handler calls for tests. | 51 // A helper class for easily mocking out Network*Handler calls for tests. |
| 48 class NetworkStateHelper { | 52 class NetworkStateHelper { |
| 49 public: | 53 public: |
| 50 NetworkStateHelper(); | 54 NetworkStateHelper(); |
| 51 virtual ~NetworkStateHelper(); | 55 virtual ~NetworkStateHelper(); |
| 52 | 56 |
| 53 // Returns name of the currently connected network. | 57 // Returns name of the currently connected network. |
| 54 // If there are no connected networks, returns name of the network | 58 // If there are no connected networks, returns name of the network |
| 55 // that is in the "connecting" state. Otherwise empty string is returned. | 59 // that is in the "connecting" state. Otherwise empty string is returned. |
| 56 // If there are multiple connected networks, network priority: | 60 // If there are multiple connected networks, network priority: |
| 57 // Ethernet > WiFi > Cellular. Same for connecting network. | 61 // Ethernet > WiFi > Cellular. Same for connecting network. |
| 58 virtual base::string16 GetCurrentNetworkName() const; | 62 virtual base::string16 GetCurrentNetworkName() const; |
| 59 | 63 |
| 60 // Returns true if the default network is in connected state. | 64 // Returns true if the default network is in connected state. |
| 61 virtual bool IsConnected() const; | 65 virtual bool IsConnected() const; |
| 62 | 66 |
| 63 // Returns true if the default network is in connecting state. | 67 // Returns true if the default network is in connecting state. |
| 64 virtual bool IsConnecting() const; | 68 virtual bool IsConnecting() const; |
| 65 | 69 |
| 66 private: | 70 private: |
| 67 DISALLOW_COPY_AND_ASSIGN(NetworkStateHelper); | 71 DISALLOW_COPY_AND_ASSIGN(NetworkStateHelper); |
| 68 }; | 72 }; |
| 69 | 73 |
| 70 } // namespace login | 74 } // namespace login |
| 71 | 75 |
| 72 } // namespace chromeos | 76 } // namespace chromeos |
| 73 | 77 |
| 74 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_HELPER_H_ | 78 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_HELPER_H_ |
| OLD | NEW |