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

Unified Diff: chromeos/network/device_state.h

Issue 11192024: Add chromeos::NetworkStateManager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix comment Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chromeos/dbus/shill_service_client.cc ('k') | chromeos/network/device_state.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..3545b45fb55a8b4aaf4bfaf277f8beb4cefa0ca5
--- /dev/null
+++ b/chromeos/network/device_state.h
@@ -0,0 +1,41 @@
+// 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);
+ virtual ~DeviceState();
+
+ // 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 provider_requires_roaming() const { return provider_requires_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 provider_requires_roaming_;
+ bool support_network_scan_;
+
+ DISALLOW_COPY_AND_ASSIGN(DeviceState);
+};
+
+} // namespace chromeos
+
+#endif // CHROMEOS_NETWORK_DEVICE_STATE_H_
« no previous file with comments | « chromeos/dbus/shill_service_client.cc ('k') | chromeos/network/device_state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698