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

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

Issue 21030006: NetworkState cleanup, pass properties to InitialPropertiesReceived (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 4 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
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_MANAGED_STATE_H_ 5 #ifndef CHROMEOS_NETWORK_MANAGED_STATE_H_
6 #define CHROMEOS_NETWORK_MANAGED_STATE_H_ 6 #define CHROMEOS_NETWORK_MANAGED_STATE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
12 #include "chromeos/chromeos_export.h" 12 #include "chromeos/chromeos_export.h"
13 13
14 namespace base { 14 namespace base {
15 class Value; 15 class Value;
16 class DictionaryValue;
16 } 17 }
17 18
18 namespace chromeos { 19 namespace chromeos {
19 20
20 class DeviceState; 21 class DeviceState;
21 class FavoriteState; 22 class FavoriteState;
22 class NetworkState; 23 class NetworkState;
23 24
24 // Base class for states managed by NetworkStateManger which are associated 25 // Base class for states managed by NetworkStateManger which are associated
25 // with a Shill path (e.g. service path or device path). 26 // with a Shill path (e.g. service path or device path).
(...skipping 23 matching lines...) Expand all
49 // then the state wasn't modified. This might happen because of 50 // then the state wasn't modified. This might happen because of
50 // * |key| was not recognized. 51 // * |key| was not recognized.
51 // * |value| was not parsed successfully. 52 // * |value| was not parsed successfully.
52 // * |value| is equal to the cached property value. 53 // * |value| is equal to the cached property value.
53 // If the return value is true, the state might or might not be modified. 54 // If the return value is true, the state might or might not be modified.
54 virtual bool PropertyChanged(const std::string& key, 55 virtual bool PropertyChanged(const std::string& key,
55 const base::Value& value) = 0; 56 const base::Value& value) = 0;
56 57
57 // Called by NetworkStateHandler after all calls to PropertyChanged for the 58 // Called by NetworkStateHandler after all calls to PropertyChanged for the
58 // initial set of properties. Used to update state requiring multiple 59 // initial set of properties. Used to update state requiring multiple
59 // parsed properties, e.g. name from hex_ssid in NetworkState. 60 // parsed properties, e.g. name from hex_ssid in NetworkState.
pneubeck (no reviews) 2013/07/29 19:13:25 nit: remove 'parsed'
stevenjb 2013/07/29 20:25:47 Done.
60 virtual void InitialPropertiesReceived(); 61 // |properties| contains the complete set of initial properties.
62 virtual void InitialPropertiesReceived(
63 const base::DictionaryValue& properties);
61 64
62 const ManagedType managed_type() const { return managed_type_; } 65 const ManagedType managed_type() const { return managed_type_; }
63 const std::string& path() const { return path_; } 66 const std::string& path() const { return path_; }
64 const std::string& name() const { return name_; } 67 const std::string& name() const { return name_; }
65 const std::string& type() const { return type_; } 68 const std::string& type() const { return type_; }
66 bool update_requested() const { return update_requested_; } 69 bool update_requested() const { return update_requested_; }
67 void set_update_requested(bool update_requested) { 70 void set_update_requested(bool update_requested) {
68 update_requested_ = update_requested; 71 update_requested_ = update_requested;
69 } 72 }
70 73
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 109
107 // Tracks when an update has been requested. 110 // Tracks when an update has been requested.
108 bool update_requested_; 111 bool update_requested_;
109 112
110 DISALLOW_COPY_AND_ASSIGN(ManagedState); 113 DISALLOW_COPY_AND_ASSIGN(ManagedState);
111 }; 114 };
112 115
113 } // namespace chromeos 116 } // namespace chromeos
114 117
115 #endif // CHROMEOS_NETWORK_MANAGED_STATE_H_ 118 #endif // CHROMEOS_NETWORK_MANAGED_STATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698