Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(95)

Side by Side Diff: chrome/browser/chromeos/login/network_screen.cc

Issue 1692005: 2nd attempt to land http://codereview.chromium.org/1676002 for njw... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/network_screen.h" 5 #include "chrome/browser/chromeos/login/network_screen.h"
6 6
7 #include "app/l10n_util.h" 7 #include "app/l10n_util.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "chrome/browser/chromeos/cros/cros_library.h" 10 #include "chrome/browser/chromeos/cros/cros_library.h"
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 const string16& id) { 145 const string16& id) {
146 const NetworkList::NetworkItem* network = 146 const NetworkList::NetworkItem* network =
147 networks_.GetNetworkById(type, id); 147 networks_.GetNetworkById(type, id);
148 if (network && !IsSameNetwork(network, networks_.ConnectedNetwork())) { 148 if (network && !IsSameNetwork(network, networks_.ConnectedNetwork())) {
149 if (NetworkList::NETWORK_WIFI == network->network_type) { 149 if (NetworkList::NETWORK_WIFI == network->network_type) {
150 if (network->wifi_network.encrypted) { 150 if (network->wifi_network.encrypted) {
151 OpenPasswordDialog(network->wifi_network); 151 OpenPasswordDialog(network->wifi_network);
152 return; 152 return;
153 } else { 153 } else {
154 chromeos::CrosLibrary::Get()->GetNetworkLibrary()-> 154 chromeos::CrosLibrary::Get()->GetNetworkLibrary()->
155 ConnectToWifiNetwork(network->wifi_network, string16()); 155 ConnectToWifiNetwork(network->wifi_network,
156 string16(), string16(), string16());
156 } 157 }
157 } else if (NetworkList::NETWORK_CELLULAR == network->network_type) { 158 } else if (NetworkList::NETWORK_CELLULAR == network->network_type) {
158 chromeos::CrosLibrary::Get()->GetNetworkLibrary()-> 159 chromeos::CrosLibrary::Get()->GetNetworkLibrary()->
159 ConnectToCellularNetwork(network->cellular_network); 160 ConnectToCellularNetwork(network->cellular_network);
160 } 161 }
161 } 162 }
162 // Check if there's already connected network and update screen state. 163 // Check if there's already connected network and update screen state.
163 MessageLoop::current()->PostTask(FROM_HERE, task_factory_.NewRunnableMethod( 164 MessageLoop::current()->PostTask(FROM_HERE, task_factory_.NewRunnableMethod(
164 &NetworkScreen::NetworkChanged, 165 &NetworkScreen::NetworkChanged,
165 chromeos::CrosLibrary::Get()->GetNetworkLibrary())); 166 chromeos::CrosLibrary::Get()->GetNetworkLibrary()));
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 const string16& id) { 214 const string16& id) {
214 int index = networks_.GetNetworkIndexById(type, id); 215 int index = networks_.GetNetworkIndexById(type, id);
215 if (index >= 0) { 216 if (index >= 0) {
216 view()->SetSelectedNetworkItem(index + 1); 217 view()->SetSelectedNetworkItem(index + 1);
217 } else { 218 } else {
218 view()->SetSelectedNetworkItem(0); 219 view()->SetSelectedNetworkItem(0);
219 } 220 }
220 } 221 }
221 222
222 } // namespace chromeos 223 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/cros/network_library.cc ('k') | chrome/browser/chromeos/login/network_screen_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698