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

Side by Side Diff: chromeos/network/shill_service_observer.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 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_SHILL_SERVICE_OBSERVER_H_
6 #define CHROMEOS_NETWORK_SHILL_SERVICE_OBSERVER_H_
7
8 #include <string>
9
10 #include "base/callback.h"
11 #include "chromeos/dbus/shill_property_changed_observer.h"
12
13 namespace chromeos {
14 namespace internal {
15
16 // Class to manage Shill service property changed observers. Observers are
17 // added on construction and removed on destruction. Runs the handler when
18 // OnPropertyChanged is called.
19 class ShillServiceObserver : public ShillPropertyChangedObserver {
20 public:
21 typedef base::Callback<void(const std::string& service,
22 const std::string& name,
23 const base::Value& value)> Handler;
24
25 ShillServiceObserver(const std::string& service_path,
26 const Handler& handler);
27
28 virtual ~ShillServiceObserver();
29
30 // ShillPropertyChangedObserver overrides.
31 virtual void OnPropertyChanged(const std::string& key,
32 const base::Value& value) OVERRIDE;
33
34 private:
35 std::string service_path_;
36 Handler handler_;
37
38 DISALLOW_COPY_AND_ASSIGN(ShillServiceObserver);
39 };
40
41 } // namespace internal
42 } // namespace chromeos
43
44 #endif // CHROMEOS_NETWORK_SHILL_SERVICE_OBSERVER_H_
OLDNEW
« no previous file with comments | « chromeos/network/shill_property_handler_unittest.cc ('k') | chromeos/network/shill_service_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698