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

Side by Side Diff: chromeos/dbus/shill_service_client_stub.h

Issue 12676017: Adding policy support to the new network configuration stack. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add comments to local helper functions and fixed some nits. Created 7 years, 8 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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_DBUS_SHILL_SERVICE_CLIENT_STUB_H_ 5 #ifndef CHROMEOS_DBUS_SHILL_SERVICE_CLIENT_STUB_H_
6 #define CHROMEOS_DBUS_SHILL_SERVICE_CLIENT_STUB_H_ 6 #define CHROMEOS_DBUS_SHILL_SERVICE_CLIENT_STUB_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 const std::string& property, 84 const std::string& property,
85 const base::Value& value) OVERRIDE; 85 const base::Value& value) OVERRIDE;
86 virtual const base::DictionaryValue* GetServiceProperties( 86 virtual const base::DictionaryValue* GetServiceProperties(
87 const std::string& service_path) const OVERRIDE; 87 const std::string& service_path) const OVERRIDE;
88 virtual void ClearServices() OVERRIDE; 88 virtual void ClearServices() OVERRIDE;
89 89
90 private: 90 private:
91 typedef ObserverList<ShillPropertyChangedObserver> PropertyObserverList; 91 typedef ObserverList<ShillPropertyChangedObserver> PropertyObserverList;
92 92
93 void SetDefaultProperties(); 93 void SetDefaultProperties();
94 void PassStubServiceProperties(const dbus::ObjectPath& service_path,
95 const DictionaryValueCallback& callback);
96 void NotifyObserversPropertyChanged(const dbus::ObjectPath& service_path, 94 void NotifyObserversPropertyChanged(const dbus::ObjectPath& service_path,
97 const std::string& property); 95 const std::string& property);
98 base::DictionaryValue* GetModifiableServiceProperties( 96 base::DictionaryValue* GetModifiableServiceProperties(
99 const std::string& service_path); 97 const std::string& service_path);
100 PropertyObserverList& GetObserverList(const dbus::ObjectPath& device_path); 98 PropertyObserverList& GetObserverList(const dbus::ObjectPath& device_path);
101 99
102 base::DictionaryValue stub_services_; 100 base::DictionaryValue stub_services_;
103 // Observer list for each service. 101 // Observer list for each service.
104 std::map<dbus::ObjectPath, PropertyObserverList*> observer_list_; 102 std::map<dbus::ObjectPath, PropertyObserverList*> observer_list_;
105 103
106 // Note: This should remain the last member so it'll be destroyed and 104 // Note: This should remain the last member so it'll be destroyed and
107 // invalidate its weak pointers before any other members are destroyed. 105 // invalidate its weak pointers before any other members are destroyed.
108 base::WeakPtrFactory<ShillServiceClientStub> weak_ptr_factory_; 106 base::WeakPtrFactory<ShillServiceClientStub> weak_ptr_factory_;
109 107
110 DISALLOW_COPY_AND_ASSIGN(ShillServiceClientStub); 108 DISALLOW_COPY_AND_ASSIGN(ShillServiceClientStub);
111 }; 109 };
112 110
113 } // namespace chromeos 111 } // namespace chromeos
114 112
115 #endif // CHROMEOS_DBUS_SHILL_SERVICE_CLIENT_STUB_H_ 113 #endif // CHROMEOS_DBUS_SHILL_SERVICE_CLIENT_STUB_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698