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

Side by Side Diff: chromeos/cryptohome/mock_homedir_methods.cc

Issue 526353002: Merge cryptohome::RetrievedKeyData with cryptohome::KeyDefinition (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@d_2_367847_add_get_key_data_ex_to_mount_flow
Patch Set: Rebased. Created 6 years, 3 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #include "chromeos/cryptohome/mock_homedir_methods.h" 5 #include "chromeos/cryptohome/mock_homedir_methods.h"
6 6
7 #include "base/memory/scoped_vector.h" 7 #include <vector>
8
8 #include "chromeos/cryptohome/cryptohome_parameters.h" 9 #include "chromeos/cryptohome/cryptohome_parameters.h"
9 #include "chromeos/cryptohome/mock_async_method_caller.h" 10 #include "chromeos/cryptohome/mock_async_method_caller.h"
10 11
11 using ::testing::Invoke; 12 using ::testing::Invoke;
12 using ::testing::WithArgs; 13 using ::testing::WithArgs;
13 using ::testing::_; 14 using ::testing::_;
14 15
15 namespace cryptohome { 16 namespace cryptohome {
16 17
17 MockHomedirMethods::MockHomedirMethods() 18 MockHomedirMethods::MockHomedirMethods()
(...skipping 16 matching lines...) Expand all
34 WithArgs<4>(Invoke(this, &MockHomedirMethods::DoCallback))); 35 WithArgs<4>(Invoke(this, &MockHomedirMethods::DoCallback)));
35 ON_CALL(*this, RemoveKeyEx(_, _, _, _)).WillByDefault( 36 ON_CALL(*this, RemoveKeyEx(_, _, _, _)).WillByDefault(
36 WithArgs<3>(Invoke(this, &MockHomedirMethods::DoCallback))); 37 WithArgs<3>(Invoke(this, &MockHomedirMethods::DoCallback)));
37 } 38 }
38 39
39 void MockHomedirMethods::DoCallback(const Callback& callback) { 40 void MockHomedirMethods::DoCallback(const Callback& callback) {
40 callback.Run(success_, return_code_); 41 callback.Run(success_, return_code_);
41 } 42 }
42 43
43 void MockHomedirMethods::DoGetDataCallback(const GetKeyDataCallback& callback) { 44 void MockHomedirMethods::DoGetDataCallback(const GetKeyDataCallback& callback) {
44 callback.Run(success_, return_code_, ScopedVector<RetrievedKeyData>()); 45 callback.Run(success_, return_code_, std::vector<KeyDefinition>());
45 } 46 }
46 47
47 void MockHomedirMethods::DoMountCallback(const MountCallback& callback) { 48 void MockHomedirMethods::DoMountCallback(const MountCallback& callback) {
48 callback.Run( 49 callback.Run(
49 success_, return_code_, MockAsyncMethodCaller::kFakeSanitizedUsername); 50 success_, return_code_, MockAsyncMethodCaller::kFakeSanitizedUsername);
50 } 51 }
51 52
52 } // namespace cryptohome 53 } // namespace cryptohome
OLDNEW
« no previous file with comments | « chromeos/cryptohome/homedir_methods_unittest.cc ('k') | chromeos/login/auth/cryptohome_authenticator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698