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

Side by Side Diff: chrome/browser/chromeos/cros/network_library.h

Issue 3744009: chromium-os:5494 Networks with identical names not handled properly. (Closed)
Patch Set: Rebase from trunk. Created 10 years, 2 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
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_CROS_NETWORK_LIBRARY_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_CROS_NETWORK_LIBRARY_H_
6 #define CHROME_BROWSER_CHROMEOS_CROS_NETWORK_LIBRARY_H_ 6 #define CHROME_BROWSER_CHROMEOS_CROS_NETWORK_LIBRARY_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 virtual void NetworkChanged(NetworkLibrary* obj) = 0; 304 virtual void NetworkChanged(NetworkLibrary* obj) = 0;
305 // Called when the cellular data plan has changed. 305 // Called when the cellular data plan has changed.
306 virtual void CellularDataPlanChanged(const std::string& service_path, 306 virtual void CellularDataPlanChanged(const std::string& service_path,
307 const CellularDataPlanList& plans) {} 307 const CellularDataPlanList& plans) {}
308 }; 308 };
309 309
310 virtual ~NetworkLibrary() {} 310 virtual ~NetworkLibrary() {}
311 virtual void AddObserver(Observer* observer) = 0; 311 virtual void AddObserver(Observer* observer) = 0;
312 virtual void RemoveObserver(Observer* observer) = 0; 312 virtual void RemoveObserver(Observer* observer) = 0;
313 313
314 // Return the active Ethernet network (or a default structure if inactive).
314 virtual const EthernetNetwork& ethernet_network() const = 0; 315 virtual const EthernetNetwork& ethernet_network() const = 0;
315 virtual bool ethernet_connecting() const = 0; 316 virtual bool ethernet_connecting() const = 0;
316 virtual bool ethernet_connected() const = 0; 317 virtual bool ethernet_connected() const = 0;
317 318
318 virtual const std::string& wifi_name() const = 0; 319 // Return the active Wifi network (or a default structure if none active).
320 virtual const WifiNetwork& wifi_network() const = 0;
319 virtual bool wifi_connecting() const = 0; 321 virtual bool wifi_connecting() const = 0;
320 virtual bool wifi_connected() const = 0; 322 virtual bool wifi_connected() const = 0;
321 virtual int wifi_strength() const = 0;
322 323
323 virtual const std::string& cellular_name() const = 0; 324 // Return the active Cellular network (or a default structure if none active).
324 virtual const std::string& cellular_service_path() const = 0; 325 virtual const CellularNetwork& cellular_network() const = 0;
325 virtual bool cellular_connecting() const = 0; 326 virtual bool cellular_connecting() const = 0;
326 virtual bool cellular_connected() const = 0; 327 virtual bool cellular_connected() const = 0;
327 virtual int cellular_strength() const = 0;
328 328
329 // Return true if any network is currently connected. 329 // Return true if any network is currently connected.
330 virtual bool Connected() const = 0; 330 virtual bool Connected() const = 0;
331 331
332 // Return true if any network is currently connecting. 332 // Return true if any network is currently connecting.
333 virtual bool Connecting() const = 0; 333 virtual bool Connecting() const = 0;
334 334
335 // Returns the current IP address if connected. If not, returns empty string. 335 // Returns the current IP address if connected. If not, returns empty string.
336 virtual const std::string& IPAddress() const = 0; 336 virtual const std::string& IPAddress() const = 0;
337 337
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
433 virtual std::string GetHtmlInfo(int refresh) = 0; 433 virtual std::string GetHtmlInfo(int refresh) = 0;
434 434
435 // Factory function, creates a new instance and returns ownership. 435 // Factory function, creates a new instance and returns ownership.
436 // For normal usage, access the singleton via CrosLibrary::Get(). 436 // For normal usage, access the singleton via CrosLibrary::Get().
437 static NetworkLibrary* GetImpl(bool stub); 437 static NetworkLibrary* GetImpl(bool stub);
438 }; 438 };
439 439
440 } // namespace chromeos 440 } // namespace chromeos
441 441
442 #endif // CHROME_BROWSER_CHROMEOS_CROS_NETWORK_LIBRARY_H_ 442 #endif // CHROME_BROWSER_CHROMEOS_CROS_NETWORK_LIBRARY_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/cros/mock_network_library.h ('k') | chrome/browser/chromeos/cros/network_library.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698