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/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
9 #include "chromeos/network/network_handler.h" | 9 #include "chromeos/network/network_handler.h" |
10 #include "chromeos/network/network_state.h" | 10 #include "chromeos/network/network_state.h" |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 return l10n_util::GetStringUTF16(IDS_STATUSBAR_NETWORK_DEVICE_ETHERNET); | 54 return l10n_util::GetStringUTF16(IDS_STATUSBAR_NETWORK_DEVICE_ETHERNET); |
55 return UTF8ToUTF16(network->name()); | 55 return UTF8ToUTF16(network->name()); |
56 } | 56 } |
57 | 57 |
58 network = nsh->ConnectingNetworkByType(NetworkTypePattern::NonVirtual()); | 58 network = nsh->ConnectingNetworkByType(NetworkTypePattern::NonVirtual()); |
59 if (network) { | 59 if (network) { |
60 if (network->Matches(NetworkTypePattern::Ethernet())) | 60 if (network->Matches(NetworkTypePattern::Ethernet())) |
61 return l10n_util::GetStringUTF16(IDS_STATUSBAR_NETWORK_DEVICE_ETHERNET); | 61 return l10n_util::GetStringUTF16(IDS_STATUSBAR_NETWORK_DEVICE_ETHERNET); |
62 return UTF8ToUTF16(network->name()); | 62 return UTF8ToUTF16(network->name()); |
63 } | 63 } |
64 return string16(); | 64 return base::string16(); |
65 } | 65 } |
66 | 66 |
67 bool NetworkStateHelper::IsConnected() const { | 67 bool NetworkStateHelper::IsConnected() const { |
68 chromeos::NetworkStateHandler* nsh = | 68 chromeos::NetworkStateHandler* nsh = |
69 chromeos::NetworkHandler::Get()->network_state_handler(); | 69 chromeos::NetworkHandler::Get()->network_state_handler(); |
70 return nsh->ConnectedNetworkByType(chromeos::NetworkTypePattern::Default()) != | 70 return nsh->ConnectedNetworkByType(chromeos::NetworkTypePattern::Default()) != |
71 NULL; | 71 NULL; |
72 } | 72 } |
73 | 73 |
74 bool NetworkStateHelper::IsConnecting() const { | 74 bool NetworkStateHelper::IsConnecting() const { |
75 chromeos::NetworkStateHandler* nsh = | 75 chromeos::NetworkStateHandler* nsh = |
76 chromeos::NetworkHandler::Get()->network_state_handler(); | 76 chromeos::NetworkHandler::Get()->network_state_handler(); |
77 return nsh->ConnectingNetworkByType( | 77 return nsh->ConnectingNetworkByType( |
78 chromeos::NetworkTypePattern::Default()) != NULL; | 78 chromeos::NetworkTypePattern::Default()) != NULL; |
79 } | 79 } |
80 | 80 |
81 } // namespace login | 81 } // namespace login |
82 | 82 |
83 } // namespace chromeos | 83 } // namespace chromeos |
OLD | NEW |