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

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

Issue 15233002: Add NetworkStateHandler::RequestUpdateForNetwork (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add request call for NetworkConfigurationHandler::CreateConfiguration Created 7 years, 7 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"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 // initial set of properties. Used to update state requiring multiple 50 // initial set of properties. Used to update state requiring multiple
51 // parsed properties, e.g. name from hex_ssid in NetworkState. 51 // parsed properties, e.g. name from hex_ssid in NetworkState.
52 virtual void InitialPropertiesReceived(); 52 virtual void InitialPropertiesReceived();
53 53
54 const ManagedType managed_type() const { return managed_type_; } 54 const ManagedType managed_type() const { return managed_type_; }
55 const std::string& path() const { return path_; } 55 const std::string& path() const { return path_; }
56 const std::string& name() const { return name_; } 56 const std::string& name() const { return name_; }
57 const std::string& type() const { return type_; } 57 const std::string& type() const { return type_; }
58 bool is_observed() const { return is_observed_; } 58 bool is_observed() const { return is_observed_; }
59 void set_is_observed(bool is_observed) { is_observed_ = is_observed; } 59 void set_is_observed(bool is_observed) { is_observed_ = is_observed; }
60 bool update_requested() const { return update_requested_; }
61 void set_update_requested(bool update_requested) {
62 update_requested_ = update_requested;
63 }
60 64
61 protected: 65 protected:
62 ManagedState(ManagedType type, const std::string& path); 66 ManagedState(ManagedType type, const std::string& path);
63 67
64 // Parses common property keys (name, type). 68 // Parses common property keys (name, type).
65 bool ManagedStatePropertyChanged(const std::string& key, 69 bool ManagedStatePropertyChanged(const std::string& key,
66 const base::Value& value); 70 const base::Value& value);
67 71
68 // Helper methods that log warnings and return true if parsing succeeded and 72 // Helper methods that log warnings and return true if parsing succeeded and
69 // the new value does not match the existing output value. 73 // the new value does not match the existing output value.
(...skipping 17 matching lines...) Expand all
87 // The path (e.g. service path or device path) of the managed state object. 91 // The path (e.g. service path or device path) of the managed state object.
88 std::string path_; 92 std::string path_;
89 93
90 // Common properties shared by all managed state objects. 94 // Common properties shared by all managed state objects.
91 std::string name_; // flimflam::kNameProperty 95 std::string name_; // flimflam::kNameProperty
92 std::string type_; // flimflam::kTypeProperty 96 std::string type_; // flimflam::kTypeProperty
93 97
94 // Tracks when the state is being observed. 98 // Tracks when the state is being observed.
95 bool is_observed_; 99 bool is_observed_;
96 100
101 // Tracks when an update has been requested.
102 bool update_requested_;
103
97 DISALLOW_COPY_AND_ASSIGN(ManagedState); 104 DISALLOW_COPY_AND_ASSIGN(ManagedState);
98 }; 105 };
99 106
100 } // namespace chromeos 107 } // namespace chromeos
101 108
102 #endif // CHROMEOS_NETWORK_MANAGED_STATE_H_ 109 #endif // CHROMEOS_NETWORK_MANAGED_STATE_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/cros/network_library_impl_cros.cc ('k') | chromeos/network/managed_state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698