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/cros/mock_cryptohome_library.h

Issue 10382086: Determine whether user is ephemeral when coming back from a crash (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 7 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 (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 #ifndef CHROME_BROWSER_CHROMEOS_CROS_MOCK_CRYPTOHOME_LIBRARY_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_CROS_MOCK_CRYPTOHOME_LIBRARY_H_
6 #define CHROME_BROWSER_CHROMEOS_CROS_MOCK_CRYPTOHOME_LIBRARY_H_ 6 #define CHROME_BROWSER_CHROMEOS_CROS_MOCK_CRYPTOHOME_LIBRARY_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "chrome/browser/chromeos/cros/cryptohome_library.h" 12 #include "chrome/browser/chromeos/cros/cryptohome_library.h"
13 #include "testing/gmock/include/gmock/gmock.h" 13 #include "testing/gmock/include/gmock/gmock.h"
14 14
15 using ::testing::Invoke; 15 using ::testing::Invoke;
16 using ::testing::WithArgs; 16 using ::testing::WithArgs;
17 using ::testing::_; 17 using ::testing::_;
18 18
19 namespace chromeos { 19 namespace chromeos {
20 20
21 class MockCryptohomeLibrary : public CryptohomeLibrary { 21 class MockCryptohomeLibrary : public CryptohomeLibrary {
22 public: 22 public:
23 MockCryptohomeLibrary(); 23 MockCryptohomeLibrary();
24 virtual ~MockCryptohomeLibrary(); 24 virtual ~MockCryptohomeLibrary();
25 MOCK_METHOD0(IsMounted, bool(void)); 25 MOCK_METHOD0(IsMounted, bool(void));
26 MOCK_METHOD3(IsMountedForUser, bool(const std::string& username,
27 bool* is_mounted,
28 bool* is_ephemeral_mount));
26 MOCK_METHOD1(HashPassword, std::string(const std::string& password)); 29 MOCK_METHOD1(HashPassword, std::string(const std::string& password));
27 MOCK_METHOD0(GetSystemSalt, std::string(void)); 30 MOCK_METHOD0(GetSystemSalt, std::string(void));
28 31
29 MOCK_METHOD0(TpmIsReady, bool(void)); 32 MOCK_METHOD0(TpmIsReady, bool(void));
30 MOCK_METHOD0(TpmIsEnabled, bool(void)); 33 MOCK_METHOD0(TpmIsEnabled, bool(void));
31 MOCK_METHOD0(TpmIsOwned, bool(void)); 34 MOCK_METHOD0(TpmIsOwned, bool(void));
32 MOCK_METHOD0(TpmIsBeingOwned, bool(void)); 35 MOCK_METHOD0(TpmIsBeingOwned, bool(void));
33 MOCK_METHOD1(TpmGetPassword, bool(std::string* password)); 36 MOCK_METHOD1(TpmGetPassword, bool(std::string* password));
34 MOCK_METHOD0(TpmCanAttemptOwnership, void(void)); 37 MOCK_METHOD0(TpmCanAttemptOwnership, void(void));
35 MOCK_METHOD0(TpmClearStoredPassword, void(void)); 38 MOCK_METHOD0(TpmClearStoredPassword, void(void));
36 39
37 MOCK_METHOD2(InstallAttributesGet, bool(const std::string&, std::string*)); 40 MOCK_METHOD2(InstallAttributesGet, bool(const std::string&, std::string*));
38 MOCK_METHOD2(InstallAttributesSet, bool(const std::string&, 41 MOCK_METHOD2(InstallAttributesSet, bool(const std::string&,
39 const std::string&)); 42 const std::string&));
40 MOCK_METHOD0(InstallAttributesFinalize, bool(void)); 43 MOCK_METHOD0(InstallAttributesFinalize, bool(void));
41 MOCK_METHOD0(InstallAttributesIsReady, bool(void)); 44 MOCK_METHOD0(InstallAttributesIsReady, bool(void));
42 MOCK_METHOD0(InstallAttributesIsInvalid, bool(void)); 45 MOCK_METHOD0(InstallAttributesIsInvalid, bool(void));
43 MOCK_METHOD0(InstallAttributesIsFirstInstall, bool(void)); 46 MOCK_METHOD0(InstallAttributesIsFirstInstall, bool(void));
44 private: 47 private:
45 DISALLOW_COPY_AND_ASSIGN(MockCryptohomeLibrary); 48 DISALLOW_COPY_AND_ASSIGN(MockCryptohomeLibrary);
46 }; 49 };
47 50
48 } // namespace chromeos 51 } // namespace chromeos
49 52
50 #endif // CHROME_BROWSER_CHROMEOS_CROS_MOCK_CRYPTOHOME_LIBRARY_H_ 53 #endif // CHROME_BROWSER_CHROMEOS_CROS_MOCK_CRYPTOHOME_LIBRARY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698