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

Unified Diff: chrome/browser/chromeos/network_list.h

Issue 1755021: Rework a bit the NetworkList implementation. (Closed) Base URL: git://git.chromium.org/chromium.git
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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/chromeos/login/network_screen.cc ('k') | chrome/browser/chromeos/network_list.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/network_list.h
diff --git a/chrome/browser/chromeos/network_list.h b/chrome/browser/chromeos/network_list.h
index 2995f806bab9bac47d402769d658955e06ce9db7..a675c7274fe70e8e760adc7f53b24de51a596de3 100644
--- a/chrome/browser/chromeos/network_list.h
+++ b/chrome/browser/chromeos/network_list.h
@@ -47,11 +47,6 @@ class NetworkList {
NetworkList();
virtual ~NetworkList() {}
- // True if network list is empty.
- bool IsEmpty() const {
- return networks_.empty();
- }
-
// Returns currently connected network if there is one.
const NetworkList::NetworkItem* ConnectedNetwork() const;
@@ -67,24 +62,24 @@ class NetworkList {
// If network is not available -1 is returned.
int GetNetworkIndexById(NetworkType type, const string16& id) const;
- // Returns number of networks.
- size_t GetNetworkCount() const {
- return networks_.size();
- }
-
// Returns network by index.
NetworkList::NetworkItem* GetNetworkAt(int index);
+ // Returns number of networks.
+ int size() const { return static_cast<int>(networks_.size()); }
Nikita (slow) 2010/05/04 17:46:30 I believe size() should still return size_t and wh
tfarina (gmail-do not use) 2010/05/04 18:18:46 Is better? Could you elaborate here? (Why you wou
Nikita (slow) 2010/05/05 13:41:40 Argument was to use size_t for size() to keep cons
+
+ // True if network list is empty.
+ bool empty() const { return networks_.empty(); }
+
// Callback from NetworkLibrary.
void NetworkChanged(chromeos::NetworkLibrary* network_lib);
private:
- typedef std::vector<NetworkItem> NetworkItemVector;
-
// Set connected/connecting network indices.
// index - network index being processed
void SetNetworksIndices(int index, bool connected, bool connecting);
+ typedef std::vector<NetworkItem> NetworkItemVector;
// Cached list of all available networks.
NetworkItemVector networks_;
« no previous file with comments | « chrome/browser/chromeos/login/network_screen.cc ('k') | chrome/browser/chromeos/network_list.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698