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

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

Issue 224343003: Enable supervised users password sync/import on ChromeOS (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update tests Created 6 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/cryptohome/mock_homedir_methods.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "chromeos/cryptohome/mock_async_method_caller.h" 7 #include "chromeos/cryptohome/mock_async_method_caller.h"
8 8
9 using ::testing::Invoke; 9 using ::testing::Invoke;
10 using ::testing::WithArgs; 10 using ::testing::WithArgs;
(...skipping 10 matching lines...) Expand all
21 success_ = success; 21 success_ = success;
22 return_code_ = return_code; 22 return_code_ = return_code;
23 ON_CALL(*this, CheckKeyEx(_, _, _)).WillByDefault( 23 ON_CALL(*this, CheckKeyEx(_, _, _)).WillByDefault(
24 WithArgs<2>(Invoke(this, &MockHomedirMethods::DoCallback))); 24 WithArgs<2>(Invoke(this, &MockHomedirMethods::DoCallback)));
25 ON_CALL(*this, MountEx(_, _, _, _)).WillByDefault( 25 ON_CALL(*this, MountEx(_, _, _, _)).WillByDefault(
26 WithArgs<3>(Invoke(this, &MockHomedirMethods::DoMountCallback))); 26 WithArgs<3>(Invoke(this, &MockHomedirMethods::DoMountCallback)));
27 ON_CALL(*this, AddKeyEx(_, _, _, _, _)).WillByDefault( 27 ON_CALL(*this, AddKeyEx(_, _, _, _, _)).WillByDefault(
28 WithArgs<4>(Invoke(this, &MockHomedirMethods::DoCallback))); 28 WithArgs<4>(Invoke(this, &MockHomedirMethods::DoCallback)));
29 ON_CALL(*this, UpdateKeyEx(_, _, _, _, _)).WillByDefault( 29 ON_CALL(*this, UpdateKeyEx(_, _, _, _, _)).WillByDefault(
30 WithArgs<4>(Invoke(this, &MockHomedirMethods::DoCallback))); 30 WithArgs<4>(Invoke(this, &MockHomedirMethods::DoCallback)));
31 ON_CALL(*this, RemoveKeyEx(_, _, _, _)).WillByDefault(
32 WithArgs<3>(Invoke(this, &MockHomedirMethods::DoCallback)));
31 } 33 }
32 34
33 void MockHomedirMethods::DoCallback(const Callback& callback) { 35 void MockHomedirMethods::DoCallback(const Callback& callback) {
34 callback.Run(success_, return_code_); 36 callback.Run(success_, return_code_);
35 } 37 }
36 38
37 void MockHomedirMethods::DoMountCallback(const MountCallback& callback) { 39 void MockHomedirMethods::DoMountCallback(const MountCallback& callback) {
38 callback.Run( 40 callback.Run(
39 success_, return_code_, MockAsyncMethodCaller::kFakeSanitizedUsername); 41 success_, return_code_, MockAsyncMethodCaller::kFakeSanitizedUsername);
40 } 42 }
41 43
42 } // namespace cryptohome 44 } // namespace cryptohome
OLDNEW
« no previous file with comments | « chromeos/cryptohome/mock_homedir_methods.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698