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

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

Issue 49773003: ChromeOS: Remove MockDBusThreadManager. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed tests. Created 7 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
« no previous file with comments | « chromeos/cryptohome/system_salt_getter_unittest.cc ('k') | chromeos/dbus/dbus_thread_manager.h » ('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 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_DBUS_CLIENT_H_ 5 #ifndef CHROMEOS_DBUS_DBUS_CLIENT_H_
6 #define CHROMEOS_DBUS_DBUS_CLIENT_H_ 6 #define CHROMEOS_DBUS_DBUS_CLIENT_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 9
10 namespace dbus { 10 namespace dbus {
11 class Bus; 11 class Bus;
12 }; 12 };
13 13
14 namespace chromeos { 14 namespace chromeos {
15 15
16 // Interface for all DBus clients handled by DBusThreadManager. It restricts 16 // Interface for all DBus clients handled by DBusThreadManager. It restricts
17 // access to the Init function to DBusThreadManagerImpl only to prevent 17 // access to the Init function to DBusThreadManagerImpl only to prevent
18 // incorrect calls. Stub clients may lift that restriction however. 18 // incorrect calls. Stub clients may lift that restriction however.
19 class DBusClient { 19 class DBusClient {
20 protected: 20 protected:
21 friend class DBusThreadManagerImpl; 21 friend class DBusThreadManager;
22 22
23 virtual ~DBusClient() {} 23 virtual ~DBusClient() {}
24 24
25 // This function is called by DBusThreadManager. Only in unit tests, which 25 // This function is called by DBusThreadManager. Only in unit tests, which
26 // don't use DBusThreadManager, this function can be called through Stub 26 // don't use DBusThreadManager, this function can be called through Stub
27 // implementations (they change Init's member visibility to public). 27 // implementations (they change Init's member visibility to public).
28 virtual void Init(dbus::Bus* bus) = 0; 28 virtual void Init(dbus::Bus* bus) = 0;
29 29
30 private: 30 private:
31 DISALLOW_ASSIGN(DBusClient); 31 DISALLOW_ASSIGN(DBusClient);
32 }; 32 };
33 33
34 } // namespace chromeos 34 } // namespace chromeos
35 35
36 #endif // CHROMEOS_DBUS_DBUS_CLIENT_H_ 36 #endif // CHROMEOS_DBUS_DBUS_CLIENT_H_
OLDNEW
« no previous file with comments | « chromeos/cryptohome/system_salt_getter_unittest.cc ('k') | chromeos/dbus/dbus_thread_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698