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

Side by Side Diff: chrome/browser/chromeos/network_list.cc

Issue 4235005: Push for ers:... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 1 month 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/network_list.h" 5 #include "chrome/browser/chromeos/network_list.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 "chrome/browser/chromeos/cros/cros_library.h" 9 #include "chrome/browser/chromeos/cros/cros_library.h"
10 #include "grit/generated_resources.h" 10 #include "grit/generated_resources.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 bool NetworkList::IsNetworkConnected(NetworkType type, 42 bool NetworkList::IsNetworkConnected(NetworkType type,
43 const string16& id) const { 43 const string16& id) const {
44 return IsInNetworkList(connected_networks_, type, id); 44 return IsInNetworkList(connected_networks_, type, id);
45 } 45 }
46 46
47 bool NetworkList::IsNetworkConnecting(NetworkType type, 47 bool NetworkList::IsNetworkConnecting(NetworkType type,
48 const string16& id) const { 48 const string16& id) const {
49 return IsInNetworkList(connecting_networks_, type, id); 49 return IsInNetworkList(connecting_networks_, type, id);
50 } 50 }
51 51
52 void NetworkList::NetworkChanged(chromeos::NetworkLibrary* network_lib) { 52 void NetworkList::OnNetworkManagerChanged(
53 chromeos::NetworkLibrary* network_lib) {
53 networks_.clear(); 54 networks_.clear();
54 connected_networks_.clear(); 55 connected_networks_.clear();
55 connecting_networks_.clear(); 56 connecting_networks_.clear();
56 // Index of the last added network item. 57 // Index of the last added network item.
57 size_t index = 0; 58 size_t index = 0;
58 if (!network_lib || !CrosLibrary::Get()->EnsureLoaded()) 59 if (!network_lib || !CrosLibrary::Get()->EnsureLoaded())
59 return; 60 return;
60 61
61 bool ethernet_connected = network_lib->ethernet_connected(); 62 bool ethernet_connected = network_lib->ethernet_connected();
62 bool ethernet_connecting = network_lib->ethernet_connecting(); 63 bool ethernet_connecting = network_lib->ethernet_connecting();
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 bool connected, 146 bool connected,
146 bool connecting) { 147 bool connecting) {
147 if (connected) { 148 if (connected) {
148 connected_networks_.push_back(index); 149 connected_networks_.push_back(index);
149 } else if (connecting) { 150 } else if (connecting) {
150 connecting_networks_.push_back(index); 151 connecting_networks_.push_back(index);
151 } 152 }
152 } 153 }
153 154
154 } // namespace chromeos 155 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/network_list.h ('k') | chrome/browser/chromeos/network_message_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698