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

Side by Side Diff: chrome/browser/chromeos/cryptohome/mock_async_method_caller.h

Issue 10878061: chromeos: Move src/chrome/browser/chromeos/cryptohome to src/chromeos (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 4 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
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 CHROME_BROWSER_CHROMEOS_CRYPTOHOME_MOCK_ASYNC_METHOD_CALLER_H_
6 #define CHROME_BROWSER_CHROMEOS_CRYPTOHOME_MOCK_ASYNC_METHOD_CALLER_H_
7
8 #include <string>
9
10 #include "base/basictypes.h"
11 #include "chrome/browser/chromeos/cryptohome/async_method_caller.h"
12 #include "testing/gmock/include/gmock/gmock.h"
13
14 namespace cryptohome {
15
16 class MockAsyncMethodCaller : public AsyncMethodCaller {
17 public:
18 MockAsyncMethodCaller();
19 virtual ~MockAsyncMethodCaller();
20
21 void SetUp(bool success, MountError return_code);
22
23 MOCK_METHOD3(AsyncCheckKey, void(const std::string& user_email,
24 const std::string& passhash,
25 Callback callback));
26 MOCK_METHOD4(AsyncMigrateKey, void(const std::string& user_email,
27 const std::string& old_hash,
28 const std::string& new_hash,
29 Callback callback));
30 MOCK_METHOD4(AsyncMount, void(const std::string& user_email,
31 const std::string& passhash,
32 const bool create_if_missing,
33 Callback callback));
34 MOCK_METHOD1(AsyncMountGuest, void(Callback callback));
35 MOCK_METHOD2(AsyncRemove, void(const std::string& user_email,
36 Callback callback));
37
38 private:
39 bool success_;
40 MountError return_code_;
41
42 void DoCallback(Callback callback);
43
44 DISALLOW_COPY_AND_ASSIGN(MockAsyncMethodCaller);
45 };
46
47 } // namespace cryptohome
48
49 #endif // CHROME_BROWSER_CHROMEOS_CRYPTOHOME_MOCK_ASYNC_METHOD_CALLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698