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

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

Issue 4169001: Rewritten parts of NetworkLibrary to work around memory corruption that prev... (Closed) Base URL: svn://svn.chromium.org/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 #ifndef CHROME_BROWSER_CHROMEOS_NETWORK_LIST_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_NETWORK_LIST_H_
6 #define CHROME_BROWSER_CHROMEOS_NETWORK_LIST_H_ 6 #define CHROME_BROWSER_CHROMEOS_NETWORK_LIST_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 18 matching lines...) Expand all
29 struct NetworkItem { 29 struct NetworkItem {
30 NetworkItem() 30 NetworkItem()
31 : network_type(NETWORK_EMPTY), 31 : network_type(NETWORK_EMPTY),
32 connected(false) {} 32 connected(false) {}
33 NetworkItem(NetworkType network_type, 33 NetworkItem(NetworkType network_type,
34 const string16& label) 34 const string16& label)
35 : network_type(network_type), 35 : network_type(network_type),
36 label(label) {} 36 label(label) {}
37 NetworkItem(NetworkType network_type, 37 NetworkItem(NetworkType network_type,
38 string16 label, 38 string16 label,
39 WifiNetwork wifi_network, 39 WifiNetwork* wifi_network,
40 CellularNetwork cellular_network) 40 CellularNetwork* cellular_network)
41 : network_type(network_type), 41 : network_type(network_type),
42 label(label), 42 label(label),
43 wifi_network(wifi_network), 43 wifi_network(wifi_network),
44 cellular_network(cellular_network), 44 cellular_network(cellular_network),
45 connected(false) {} 45 connected(false) {}
46 46
47 NetworkType network_type; 47 NetworkType network_type;
48 string16 label; // string representation of the network (shown in UI). 48 string16 label; // string representation of the network (shown in UI).
49 WifiNetwork wifi_network; 49 WifiNetwork* wifi_network;
50 CellularNetwork cellular_network; 50 CellularNetwork* cellular_network;
51 bool connected; 51 bool connected;
52 }; 52 };
53 53
54 NetworkList(); 54 NetworkList();
55 virtual ~NetworkList() {} 55 virtual ~NetworkList() {}
56 56
57 // True if network list is empty. 57 // True if network list is empty.
58 bool IsEmpty() const { 58 bool IsEmpty() const {
59 return networks_.empty(); 59 return networks_.empty();
60 } 60 }
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 111
112 // Connecting networks indexes. 112 // Connecting networks indexes.
113 NetworkIndexVector connecting_networks_; 113 NetworkIndexVector connecting_networks_;
114 114
115 DISALLOW_COPY_AND_ASSIGN(NetworkList); 115 DISALLOW_COPY_AND_ASSIGN(NetworkList);
116 }; 116 };
117 117
118 } // namespace chromeos 118 } // namespace chromeos
119 119
120 #endif // CHROME_BROWSER_CHROMEOS_NETWORK_LIST_H_ 120 #endif // CHROME_BROWSER_CHROMEOS_NETWORK_LIST_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/network_screen_browsertest.cc ('k') | chrome/browser/chromeos/network_list.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698