| Index: chrome/browser/chromeos/login/helper.h
|
| diff --git a/chrome/browser/chromeos/login/helper.h b/chrome/browser/chromeos/login/helper.h
|
| index 41bc75d9fce29252fe2fb78e2e7ee08c117cd1ef..543e6e5a88e03b0579c4370dcd5989537aefaf18 100644
|
| --- a/chrome/browser/chromeos/login/helper.h
|
| +++ b/chrome/browser/chromeos/login/helper.h
|
| @@ -26,13 +26,6 @@ namespace chromeos {
|
| // |size| is not empty. Otherwise the whole monitor is occupied.
|
| gfx::Rect CalculateScreenBounds(const gfx::Size& size);
|
|
|
| -// Returns name of the currently connected network.
|
| -// If there are no connected networks, returns name of the network
|
| -// that is in the "connecting" state. Otherwise empty string is returned.
|
| -// If there are multiple connected networks, network priority:
|
| -// Ethernet > WiFi > Cellular. Same for connecting network.
|
| -string16 GetCurrentNetworkName();
|
| -
|
| // Returns the size of user image required for proper display under current DPI.
|
| int GetCurrentUserImageSize();
|
|
|
| @@ -44,6 +37,29 @@ namespace login {
|
| // displayed under all possible DPI values.
|
| const int kMaxUserImageSize = 512;
|
|
|
| +// A helper class for easily mocking out Network*Handler calls for tests.
|
| +class NetworkStateHelper {
|
| + public:
|
| + NetworkStateHelper();
|
| + virtual ~NetworkStateHelper();
|
| +
|
| + // Returns name of the currently connected network.
|
| + // If there are no connected networks, returns name of the network
|
| + // that is in the "connecting" state. Otherwise empty string is returned.
|
| + // If there are multiple connected networks, network priority:
|
| + // Ethernet > WiFi > Cellular. Same for connecting network.
|
| + virtual string16 GetCurrentNetworkName() const;
|
| +
|
| + // Returns true if the default network is in connected state.
|
| + virtual bool IsConnected() const;
|
| +
|
| + // Returns true if the default network is in connecting state.
|
| + virtual bool IsConnecting() const;
|
| +
|
| + private:
|
| + DISALLOW_COPY_AND_ASSIGN(NetworkStateHelper);
|
| +};
|
| +
|
| } // namespace login
|
|
|
| } // namespace chromeos
|
|
|