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

Unified Diff: chromeos/network/device_state.h

Issue 11192024: Add chromeos::NetworkStateManager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Respond to feedback Round 2 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..32d31e09d8028f84d8634a36a1f22a949530c431
--- /dev/null
+++ b/chromeos/network/device_state.h
@@ -0,0 +1,43 @@
+// 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
gauravsh 2012/10/25 23:41:05 NIT: . at the end
stevenjb 2012/10/26 21:36:39 Actually, technically only sentences should have a
+ const std::string& name() const { return name_; }
+ const std::string& type() const { return type_; }
+ 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:
+ // Device Properties
gauravsh 2012/10/25 23:41:05 NIT: . at the end.
stevenjb 2012/10/26 21:36:39 ditto
+ std::string name_;
+ std::string type_;
+ std::string mac_address_;
+ std::string home_provider_id_;
gauravsh 2012/10/25 23:41:05 Suggestion: separate out the properties that are u
+ bool always_in_roaming_;
gauravsh 2012/10/25 23:41:05 Can you add a comment about what this tracks. With
stevenjb 2012/10/26 21:36:39 Done.
+ 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