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

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: 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_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
15 // Class to manage Shill service property changed observers. Observers are
16 // added on construction and removed on destruction. Runs the handler when
gauravsh 2012/10/25 23:41:05 I'd move the 2nd sentence as a comment into the cl
stevenjb 2012/10/26 21:36:39 Since this has no public facing API, it seemed bet
17 // OnPropertyChanged is called.
18 class ShillServiceObserver : public ShillPropertyChangedObserver {
19 public:
20 typedef base::Callback<void(const std::string& service,
21 const std::string& name,
22 const base::Value& value)> Handler;
23
24 ShillServiceObserver(const std::string& service_path,
25 const Handler& handler);
26
27 virtual ~ShillServiceObserver();
28
29 // ShillPropertyChangedObserver overrides.
30 virtual void OnPropertyChanged(const std::string& key,
31 const base::Value& value);
gauravsh 2012/10/25 23:41:05 OVERRIDE
stevenjb 2012/10/26 21:36:39 Done.
32
33 private:
34 std::string service_path_;
35 Handler handler_;
36
37 DISALLOW_COPY_AND_ASSIGN(ShillServiceObserver);
38 };
39
40 } // namespace chromeos
41
42 #endif // CHROMEOS_NETWORK_SHILL_SERVICE_OBSERVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698