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

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

Issue 11192024: Add chromeos::NetworkStateManager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Respond to feedback 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_NETWORK_SERVICE_OBSERVER_H_
6 #define CHROMEOS_NETWORK_NETWORK_SERVICE_OBSERVER_H_
7
8 #include <string>
9
10 #include "base/callback.h"
11 #include "chromeos/dbus/shill_property_changed_observer.h"
pneubeck (no reviews) 2012/10/25 14:42:17 Btw. shill_property_changed_observer.h only forwar
stevenjb 2012/10/25 22:05:22 Forward declaration is sufficient here though, yes
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
17 // OnPropertyChanged is called.
18 class NetworkServiceObserver : public ShillPropertyChangedObserver {
pneubeck (no reviews) 2012/10/25 14:42:17 You could call this ShillServiceObserver to make t
stevenjb 2012/10/25 22:05:22 Yeah, that's better, done.
19 public:
20 typedef base::Callback<void(const std::string& service,
21 const std::string& name,
22 const base::Value& value)> Handler;
23
24 NetworkServiceObserver(const std::string& service_path,
25 const Handler& handler);
26
27 virtual ~NetworkServiceObserver();
28
29 // ShillPropertyChangedObserver overrides.
30 virtual void OnPropertyChanged(const std::string& key,
31 const base::Value& value);
32
33 private:
34 std::string service_path_;
35 Handler handler_;
36
37 DISALLOW_COPY_AND_ASSIGN(NetworkServiceObserver);
38 };
39
40 } // namespace chromeos
41
42 #endif // CHROMEOS_NETWORK_NETWORK_SERVICE_OBSERVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698