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

Side by Side 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, 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROMEOS_NETWORK_DEVICE_STATE_H_
6 #define CHROMEOS_NETWORK_DEVICE_STATE_H_
7
8 #include "chromeos/network/managed_state.h"
9
10 namespace chromeos {
11
12 // Simple class to provide device state information. Similar to NetworkState;
13 // see network_state.h for usage guidelines.
14 class CHROMEOS_EXPORT DeviceState : public ManagedState {
15 public:
16 explicit DeviceState(const std::string& path);
17
18 // ManagedState overrides.
19 virtual bool PropertyChanged(const std::string& key,
20 const base::Value& value) OVERRIDE;
21
22 // 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
23 const std::string& name() const { return name_; }
24 const std::string& type() const { return type_; }
25 const std::string& mac_address() const { return mac_address_; }
26 bool always_in_roaming() const { return always_in_roaming_; }
27 bool support_network_scan() const { return support_network_scan_; }
28
29 private:
30 // Device Properties
gauravsh 2012/10/25 23:41:05 NIT: . at the end.
stevenjb 2012/10/26 21:36:39 ditto
31 std::string name_;
32 std::string type_;
33 std::string mac_address_;
34 std::string home_provider_id_;
gauravsh 2012/10/25 23:41:05 Suggestion: separate out the properties that are u
35 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.
36 bool support_network_scan_;
37
38 DISALLOW_COPY_AND_ASSIGN(DeviceState);
39 };
40
41 } // namespace chromeos
42
43 #endif // CHROMEOS_NETWORK_DEVICE_STATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698