blob: 664f88a1eca7c9540ef0981fe5c1cb6f2788d59a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROME_BROWSER_CHROMEOS_CROS_MOCK_CRYPTOHOME_LIBRARY_H_
#define CHROME_BROWSER_CHROMEOS_CROS_MOCK_CRYPTOHOME_LIBRARY_H_
#include <string>
#include "chrome/browser/chromeos/cros/cryptohome_library.h"
#include "testing/gmock/include/gmock/gmock.h"
namespace chromeos {
class MockCryptohomeLibrary : public CryptohomeLibrary {
public:
MockCryptohomeLibrary() {}
virtual ~MockCryptohomeLibrary() {}
MOCK_METHOD3(Mount, bool(const std::string& user_email,
const std::string& passhash,
int* error_code));
MOCK_METHOD1(MountForBwsi, bool(int*));
MOCK_METHOD2(CheckKey, bool(const std::string& user_email,
const std::string& passhash));
MOCK_METHOD3(MigrateKey, bool(const std::string& user_email,
const std::string& old_hash,
const std::string& new_hash));
MOCK_METHOD1(Remove, bool(const std::string& user_email));
MOCK_METHOD0(IsMounted, bool(void));
MOCK_METHOD0(GetSystemSalt, CryptohomeBlob(void));
};
} // namespace chromeos
#endif // CHROME_BROWSER_CHROMEOS_CROS_MOCK_CRYPTOHOME_LIBRARY_H_
|