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

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

Issue 31513002: dbus: Remove MockShillDeviceClient and MockShillIPConfigClient (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix the build Created 7 years, 2 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
« no previous file with comments | « chromeos/dbus/fake_shill_device_client.cc ('k') | chromeos/dbus/fake_shill_ipconfig_client.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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_IPCONFIG_CLIENT_STUB_H_ 5 #ifndef CHROMEOS_DBUS_FAKE_SHILL_IPCONFIG_CLIENT_H_
6 #define CHROMEOS_DBUS_SHILL_IPCONFIG_CLIENT_STUB_H_ 6 #define CHROMEOS_DBUS_FAKE_SHILL_IPCONFIG_CLIENT_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "chromeos/chromeos_export.h"
11 #include "chromeos/dbus/shill_ipconfig_client.h" 12 #include "chromeos/dbus/shill_ipconfig_client.h"
12 13
13 namespace chromeos { 14 namespace chromeos {
14 15
15 // A stub implementation of ShillIPConfigClient. 16 // A fake implementation of ShillIPConfigClient.
16 class ShillIPConfigClientStub : public ShillIPConfigClient { 17 class CHROMEOS_EXPORT FakeShillIPConfigClient : public ShillIPConfigClient {
17 public: 18 public:
18 ShillIPConfigClientStub(); 19 FakeShillIPConfigClient();
19 virtual ~ShillIPConfigClientStub(); 20 virtual ~FakeShillIPConfigClient();
20 21
21 // ShillIPConfigClient overrides 22 // ShillIPConfigClient overrides
22 virtual void Init(dbus::Bus* bus) OVERRIDE; 23 virtual void Init(dbus::Bus* bus) OVERRIDE;
23 virtual void AddPropertyChangedObserver( 24 virtual void AddPropertyChangedObserver(
24 const dbus::ObjectPath& ipconfig_path, 25 const dbus::ObjectPath& ipconfig_path,
25 ShillPropertyChangedObserver* observer) OVERRIDE; 26 ShillPropertyChangedObserver* observer) OVERRIDE;
26 virtual void RemovePropertyChangedObserver( 27 virtual void RemovePropertyChangedObserver(
27 const dbus::ObjectPath& ipconfig_path, 28 const dbus::ObjectPath& ipconfig_path,
28 ShillPropertyChangedObserver* observer) OVERRIDE; 29 ShillPropertyChangedObserver* observer) OVERRIDE;
29 virtual void Refresh(const dbus::ObjectPath& ipconfig_path, 30 virtual void Refresh(const dbus::ObjectPath& ipconfig_path,
(...skipping 13 matching lines...) Expand all
43 private: 44 private:
44 // Runs callback with |values|. 45 // Runs callback with |values|.
45 void PassProperties(const base::DictionaryValue* values, 46 void PassProperties(const base::DictionaryValue* values,
46 const DictionaryValueCallback& callback) const; 47 const DictionaryValueCallback& callback) const;
47 48
48 // Dictionary of <ipconfig_path, property dictionaries> 49 // Dictionary of <ipconfig_path, property dictionaries>
49 base::DictionaryValue ipconfigs_; 50 base::DictionaryValue ipconfigs_;
50 51
51 // Note: This should remain the last member so it'll be destroyed and 52 // Note: This should remain the last member so it'll be destroyed and
52 // invalidate its weak pointers before any other members are destroyed. 53 // invalidate its weak pointers before any other members are destroyed.
53 base::WeakPtrFactory<ShillIPConfigClientStub> weak_ptr_factory_; 54 base::WeakPtrFactory<FakeShillIPConfigClient> weak_ptr_factory_;
54 55
55 DISALLOW_COPY_AND_ASSIGN(ShillIPConfigClientStub); 56 DISALLOW_COPY_AND_ASSIGN(FakeShillIPConfigClient);
56 }; 57 };
57 58
58 } // namespace chromeos 59 } // namespace chromeos
59 60
60 #endif // CHROMEOS_DBUS_SHILL_IPCONFIG_CLIENT_STUB_H_ 61 #endif // CHROMEOS_DBUS_FAKE_SHILL_IPCONFIG_CLIENT_H_
OLDNEW
« no previous file with comments | « chromeos/dbus/fake_shill_device_client.cc ('k') | chromeos/dbus/fake_shill_ipconfig_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698