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

Side by Side Diff: chromeos/network/network_state.h

Issue 12319145: Using the new Network*Handlers in networkingPrivate Extension API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed some closing periods from comments. Created 7 years, 9 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 | « chromeos/dbus/shill_service_client_stub.cc ('k') | chromeos/network/network_state.cc » ('j') | 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 #ifndef CHROMEOS_NETWORK_NETWORK_STATE_H_ 5 #ifndef CHROMEOS_NETWORK_NETWORK_STATE_H_
6 #define CHROMEOS_NETWORK_NETWORK_STATE_H_ 6 #define CHROMEOS_NETWORK_NETWORK_STATE_H_
7 7
8 #include "chromeos/network/managed_state.h" 8 #include "chromeos/network/managed_state.h"
9 9
10 namespace base {
11 class DictionaryValue;
12 }
13
10 namespace chromeos { 14 namespace chromeos {
11 15
12 // Simple class to provide network state information about a network service. 16 // Simple class to provide network state information about a network service.
13 // This class should always be passed as a const* and should never be held 17 // This class should always be passed as a const* and should never be held
14 // on to. Store network_state->path() (defined in ManagedState) instead and 18 // on to. Store network_state->path() (defined in ManagedState) instead and
15 // call NetworkStateHandler::GetNetworkState(path) to retrieve the state for 19 // call NetworkStateHandler::GetNetworkState(path) to retrieve the state for
16 // the network. 20 // the network.
17 class CHROMEOS_EXPORT NetworkState : public ManagedState { 21 class CHROMEOS_EXPORT NetworkState : public ManagedState {
18 public: 22 public:
19 explicit NetworkState(const std::string& path); 23 explicit NetworkState(const std::string& path);
20 virtual ~NetworkState(); 24 virtual ~NetworkState();
21 25
22 // ManagedState overrides 26 // ManagedState overrides
27 // If you change this method, update GetProperties too.
23 virtual bool PropertyChanged(const std::string& key, 28 virtual bool PropertyChanged(const std::string& key,
24 const base::Value& value) OVERRIDE; 29 const base::Value& value) OVERRIDE;
25 30
31 // Fills |dictionary| with the state properties. All the properties that are
32 // accepted by PropertyChanged are stored in |dictionary|, no other values are
33 // stored.
34 void GetProperties(base::DictionaryValue* dictionary) const;
35
26 // Accessors 36 // Accessors
27 const std::string& security() const { return security_; } 37 const std::string& security() const { return security_; }
28 const std::string& ip_address() const { return ip_address_; } 38 const std::string& ip_address() const { return ip_address_; }
29 const std::string& device_path() const { return device_path_; } 39 const std::string& device_path() const { return device_path_; }
30 const std::string& guid() const { return guid_; } 40 const std::string& guid() const { return guid_; }
31 const std::string& connection_state() const { return connection_state_; } 41 const std::string& connection_state() const { return connection_state_; }
32 const std::string& error() const { return error_; } 42 const std::string& error() const { return error_; }
33 // Wireless property accessors 43 // Wireless property accessors
34 int signal_strength() const { return signal_strength_; } 44 int signal_strength() const { return signal_strength_; }
35 // Cellular property accessors 45 // Cellular property accessors
(...skipping 30 matching lines...) Expand all
66 std::string technology_; 76 std::string technology_;
67 std::string activation_state_; 77 std::string activation_state_;
68 std::string roaming_; 78 std::string roaming_;
69 79
70 DISALLOW_COPY_AND_ASSIGN(NetworkState); 80 DISALLOW_COPY_AND_ASSIGN(NetworkState);
71 }; 81 };
72 82
73 } // namespace chromeos 83 } // namespace chromeos
74 84
75 #endif // CHROMEOS_NETWORK_NETWORK_STATE_H_ 85 #endif // CHROMEOS_NETWORK_NETWORK_STATE_H_
OLDNEW
« no previous file with comments | « chromeos/dbus/shill_service_client_stub.cc ('k') | chromeos/network/network_state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698