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

Unified Diff: chromeos/network/device_state.h

Issue 11192024: Add chromeos::NetworkStateManager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Separate out NetworkStateHandlerImpl, address feedback Created 8 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 side-by-side diff with in-line comments
Download patch
Index: chromeos/network/device_state.h
diff --git a/chromeos/network/device_state.h b/chromeos/network/device_state.h
new file mode 100644
index 0000000000000000000000000000000000000000..df07c628e44af92e5ec6e323dc83a4d74f505bbd
--- /dev/null
+++ b/chromeos/network/device_state.h
@@ -0,0 +1,40 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROMEOS_NETWORK_DEVICE_STATE_H_
+#define CHROMEOS_NETWORK_DEVICE_STATE_H_
+
+#include "chromeos/network/managed_state.h"
+
+namespace chromeos {
+
+// Simple class to provide device state information. Similar to NetworkState;
+// see network_state.h for usage guidelines.
+class CHROMEOS_EXPORT DeviceState : public ManagedState {
+ public:
+ explicit DeviceState(const std::string& path);
+
+ // ManagedState overrides
+ virtual bool PropertyChanged(const std::string& key,
+ const base::Value& value) OVERRIDE;
+
+ // Accessors
+ const std::string& mac_address() const { return mac_address_; }
+ bool always_in_roaming() const { return always_in_roaming_; }
+ bool support_network_scan() const { return support_network_scan_; }
+
+ private:
+ // Common Device Properties
+ std::string mac_address_;
+ // Cellular specific propeties
+ std::string home_provider_id_;
+ bool always_in_roaming_;
gauravsh 2012/10/27 00:26:33 Still no comment on what this tracks.
stevenjb 2012/10/29 18:34:07 Renamed to match shill property name.
+ bool support_network_scan_;
+
+ DISALLOW_COPY_AND_ASSIGN(DeviceState);
+};
+
+} // namespace chromeos
+
+#endif // CHROMEOS_NETWORK_DEVICE_STATE_H_

Powered by Google App Engine
This is Rietveld 408576698