Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 #include "chrome/browser/chromeos/cryptohome/mock_async_method_caller.h" | 5 #include "chromeos/cryptohome/mock_async_method_caller.h" |
| 6 | 6 |
| 7 using ::testing::Invoke; | 7 using ::testing::Invoke; |
| 8 using ::testing::WithArgs; | 8 using ::testing::WithArgs; |
| 9 using ::testing::_; | 9 using ::testing::_; |
| 10 | 10 |
| 11 namespace cryptohome { | 11 namespace cryptohome { |
| 12 | 12 |
| 13 MockAsyncMethodCaller::MockAsyncMethodCaller() | 13 MockAsyncMethodCaller::MockAsyncMethodCaller() |
| 14 : success_(false), return_code_(cryptohome::MOUNT_ERROR_NONE) { | 14 : success_(false), return_code_(cryptohome::MOUNT_ERROR_NONE) { |
| 15 } | 15 } |
| (...skipping 16 matching lines...) Expand all Loading... | |
| 32 .WillByDefault( | 32 .WillByDefault( |
| 33 WithArgs<0>(Invoke(this, &MockAsyncMethodCaller::DoCallback))); | 33 WithArgs<0>(Invoke(this, &MockAsyncMethodCaller::DoCallback))); |
| 34 ON_CALL(*this, AsyncRemove(_, _)) | 34 ON_CALL(*this, AsyncRemove(_, _)) |
| 35 .WillByDefault( | 35 .WillByDefault( |
| 36 WithArgs<1>(Invoke(this, &MockAsyncMethodCaller::DoCallback))); | 36 WithArgs<1>(Invoke(this, &MockAsyncMethodCaller::DoCallback))); |
| 37 } | 37 } |
| 38 | 38 |
| 39 void MockAsyncMethodCaller::DoCallback(Callback callback) { | 39 void MockAsyncMethodCaller::DoCallback(Callback callback) { |
| 40 callback.Run(success_, return_code_); | 40 callback.Run(success_, return_code_); |
| 41 } | 41 } |
| 42 | 42 |
|
oshima
2012/08/25 00:32:25
not your fault, but can you remove extra line whil
hashimoto
2012/08/25 00:43:00
Done.
Actually, this is my fault made 6 months ago
| |
| 43 | 43 |
| 44 } // namespace cryptohome | 44 } // namespace cryptohome |
| OLD | NEW |