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

Side by Side Diff: chrome/browser/chromeos/net/network_change_notifier_chromeos.cc

Issue 10829471: Set connection type to NetworkChangeNotifier::CONNECTION_NONE if we are not fully connected. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/net/network_change_notifier_chromeos.h" 5 #include "chrome/browser/chromeos/net/network_change_notifier_chromeos.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "chrome/browser/chromeos/cros/cros_library.h" 8 #include "chrome/browser/chromeos/cros/cros_library.h"
9 #include "chromeos/dbus/dbus_thread_manager.h" 9 #include "chromeos/dbus/dbus_thread_manager.h"
10 #include "content/public/browser/browser_thread.h" 10 #include "content/public/browser/browser_thread.h"
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 NetworkChangeNotifierChromeos* self) { 224 NetworkChangeNotifierChromeos* self) {
225 chromeos::NetworkLibrary* net = 225 chromeos::NetworkLibrary* net =
226 chromeos::CrosLibrary::Get()->GetNetworkLibrary(); 226 chromeos::CrosLibrary::Get()->GetNetworkLibrary();
227 self->UpdateNetworkState(net); 227 self->UpdateNetworkState(net);
228 } 228 }
229 229
230 // static 230 // static
231 net::NetworkChangeNotifier::ConnectionType 231 net::NetworkChangeNotifier::ConnectionType
232 NetworkChangeNotifierChromeos::GetNetworkConnectionType( 232 NetworkChangeNotifierChromeos::GetNetworkConnectionType(
233 const chromeos::Network* network) { 233 const chromeos::Network* network) {
234 if (!network) 234 if (!network || !IsOnline(network->connection_state()))
235 return net::NetworkChangeNotifier::CONNECTION_NONE; 235 return net::NetworkChangeNotifier::CONNECTION_NONE;
236 236
237 switch (network->type()) { 237 switch (network->type()) {
238 case chromeos::TYPE_ETHERNET: 238 case chromeos::TYPE_ETHERNET:
239 return CONNECTION_ETHERNET; 239 return CONNECTION_ETHERNET;
240 case chromeos::TYPE_WIFI: 240 case chromeos::TYPE_WIFI:
241 return CONNECTION_WIFI; 241 return CONNECTION_WIFI;
242 case chromeos::TYPE_WIMAX: 242 case chromeos::TYPE_WIMAX:
243 return CONNECTION_4G; 243 return CONNECTION_4G;
244 case chromeos::TYPE_CELLULAR: 244 case chromeos::TYPE_CELLULAR:
(...skipping 16 matching lines...) Expand all
261 } 261 }
262 case chromeos::TYPE_BLUETOOTH: 262 case chromeos::TYPE_BLUETOOTH:
263 case chromeos::TYPE_VPN: 263 case chromeos::TYPE_VPN:
264 case chromeos::TYPE_UNKNOWN: 264 case chromeos::TYPE_UNKNOWN:
265 break; 265 break;
266 } 266 }
267 return net::NetworkChangeNotifier::CONNECTION_UNKNOWN; 267 return net::NetworkChangeNotifier::CONNECTION_UNKNOWN;
268 } 268 }
269 269
270 } // namespace chromeos 270 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698