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

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

Issue 10024054: chromeos: Convert D-Bus client classes' callback arguments to const reference (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 8 years, 8 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/mock_cros_disks_client.h ('k') | chromeos/dbus/mock_image_burner_client.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 (c) 2012 The Chromium Authors. All rights reserved. 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 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_MOCK_CRYPTOHOME_CLIENT_H_ 5 #ifndef CHROMEOS_DBUS_MOCK_CRYPTOHOME_CLIENT_H_
6 #define CHROMEOS_DBUS_MOCK_CRYPTOHOME_CLIENT_H_ 6 #define CHROMEOS_DBUS_MOCK_CRYPTOHOME_CLIENT_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
11 #include "chromeos/dbus/cryptohome_client.h" 11 #include "chromeos/dbus/cryptohome_client.h"
12 #include "testing/gmock/include/gmock/gmock.h" 12 #include "testing/gmock/include/gmock/gmock.h"
13 13
14 namespace chromeos { 14 namespace chromeos {
15 15
16 class MockCryptohomeClient : public CryptohomeClient { 16 class MockCryptohomeClient : public CryptohomeClient {
17 public: 17 public:
18 MockCryptohomeClient(); 18 MockCryptohomeClient();
19 virtual ~MockCryptohomeClient(); 19 virtual ~MockCryptohomeClient();
20 20
21 MOCK_METHOD1(SetAsyncCallStatusHandler, void(AsyncCallStatusHandler handler)); 21 MOCK_METHOD1(SetAsyncCallStatusHandler,
22 void(const AsyncCallStatusHandler& handler));
22 MOCK_METHOD0(ResetAsyncCallStatusHandler, void()); 23 MOCK_METHOD0(ResetAsyncCallStatusHandler, void());
23 MOCK_METHOD1(IsMounted, bool(bool* is_mounted)); 24 MOCK_METHOD1(IsMounted, bool(bool* is_mounted));
24 MOCK_METHOD1(Unmount, bool(bool* success)); 25 MOCK_METHOD1(Unmount, bool(bool* success));
25 MOCK_METHOD3(AsyncCheckKey, 26 MOCK_METHOD3(AsyncCheckKey,
26 void(const std::string& username, 27 void(const std::string& username,
27 const std::string& key, 28 const std::string& key,
28 base::Callback<void(int async_id)> callback)); 29 const AsyncMethodCallback& callback));
29 MOCK_METHOD4(AsyncMigrateKey, 30 MOCK_METHOD4(AsyncMigrateKey,
30 void(const std::string& username, 31 void(const std::string& username,
31 const std::string& from_key, 32 const std::string& from_key,
32 const std::string& to_key, 33 const std::string& to_key,
33 base::Callback<void(int async_id)> callback)); 34 const AsyncMethodCallback& callback));
34 MOCK_METHOD2(AsyncRemove, void(const std::string& username, 35 MOCK_METHOD2(AsyncRemove, void(const std::string& username,
35 base::Callback<void(int async_id)> callback)); 36 const AsyncMethodCallback& callback));
36 MOCK_METHOD1(GetSystemSalt, bool(std::vector<uint8>* salt)); 37 MOCK_METHOD1(GetSystemSalt, bool(std::vector<uint8>* salt));
37 MOCK_METHOD4(AsyncMount, void(const std::string& username, 38 MOCK_METHOD4(AsyncMount, void(const std::string& username,
38 const std::string& key, 39 const std::string& key,
39 const bool create_if_missing, 40 const bool create_if_missing,
40 base::Callback<void(int async_id)> callback)); 41 const AsyncMethodCallback& callback));
41 MOCK_METHOD1(AsyncMountGuest, 42 MOCK_METHOD1(AsyncMountGuest,
42 void(base::Callback<void(int async_id)> callback)); 43 void(const AsyncMethodCallback& callback));
43 MOCK_METHOD1(TpmIsReady, bool(bool* ready)); 44 MOCK_METHOD1(TpmIsReady, bool(bool* ready));
44 MOCK_METHOD1(TpmIsEnabled, void(BoolMethodCallback callback)); 45 MOCK_METHOD1(TpmIsEnabled, void(const BoolMethodCallback& callback));
45 MOCK_METHOD1(CallTpmIsEnabledAndBlock, bool(bool* enabled)); 46 MOCK_METHOD1(CallTpmIsEnabledAndBlock, bool(bool* enabled));
46 MOCK_METHOD1(TpmGetPassword, bool(std::string* password)); 47 MOCK_METHOD1(TpmGetPassword, bool(std::string* password));
47 MOCK_METHOD1(TpmIsOwned, bool(bool* owned)); 48 MOCK_METHOD1(TpmIsOwned, bool(bool* owned));
48 MOCK_METHOD1(TpmIsBeingOwned, bool(bool* owning)); 49 MOCK_METHOD1(TpmIsBeingOwned, bool(bool* owning));
49 MOCK_METHOD0(TpmCanAttemptOwnership, bool()); 50 MOCK_METHOD0(TpmCanAttemptOwnership, bool());
50 MOCK_METHOD0(TpmClearStoredPassword, bool()); 51 MOCK_METHOD0(TpmClearStoredPassword, bool());
51 MOCK_METHOD1(Pkcs11IsTpmTokenReady, void(BoolMethodCallback callback)); 52 MOCK_METHOD1(Pkcs11IsTpmTokenReady, void(const BoolMethodCallback& callback));
52 MOCK_METHOD1(Pkcs11GetTpmTokenInfo, 53 MOCK_METHOD1(Pkcs11GetTpmTokenInfo,
53 void(Pkcs11GetTpmTokenInfoCallback callback)); 54 void(const Pkcs11GetTpmTokenInfoCallback& callback));
54 MOCK_METHOD3(InstallAttributesGet, 55 MOCK_METHOD3(InstallAttributesGet,
55 bool(const std::string& name, 56 bool(const std::string& name,
56 std::vector<uint8>* value, 57 std::vector<uint8>* value,
57 bool* successful)); 58 bool* successful));
58 MOCK_METHOD3(InstallAttributesSet, 59 MOCK_METHOD3(InstallAttributesSet,
59 bool(const std::string& name, 60 bool(const std::string& name,
60 const std::vector<uint8>& value, 61 const std::vector<uint8>& value,
61 bool* successful)); 62 bool* successful));
62 MOCK_METHOD1(InstallAttributesFinalize, bool(bool* successful)); 63 MOCK_METHOD1(InstallAttributesFinalize, bool(bool* successful));
63 MOCK_METHOD1(InstallAttributesIsReady, bool(bool* is_ready)); 64 MOCK_METHOD1(InstallAttributesIsReady, bool(bool* is_ready));
64 MOCK_METHOD1(InstallAttributesIsInvalid, bool(bool* is_invalid)); 65 MOCK_METHOD1(InstallAttributesIsInvalid, bool(bool* is_invalid));
65 MOCK_METHOD1(InstallAttributesIsFirstInstall, bool(bool* is_first_install)); 66 MOCK_METHOD1(InstallAttributesIsFirstInstall, bool(bool* is_first_install));
66 }; 67 };
67 68
68 } // namespace chromeos 69 } // namespace chromeos
69 70
70 #endif // CHROMEOS_DBUS_MOCK_CRYPTOHOME_CLIENT_H_ 71 #endif // CHROMEOS_DBUS_MOCK_CRYPTOHOME_CLIENT_H_
OLDNEW
« no previous file with comments | « chromeos/dbus/mock_cros_disks_client.h ('k') | chromeos/dbus/mock_image_burner_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698