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

Side by Side Diff: chrome/browser/chromeos/cros/fake/fake_cryptohome_library.h

Issue 2847072: Green Tree Tactical Force: Revert skrul's bad commits (probably a git-cl bug). (Closed)
Patch Set: Created 10 years, 5 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
(Empty)
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_CHROMEOS_CROS_FAKE_FAKE_CRYPTOHOME_LIBRARY_H_
6 #define CHROME_BROWSER_CHROMEOS_CROS_FAKE_FAKE_CRYPTOHOME_LIBRARY_H_
7
8 #include <string>
9
10 #include "chrome/browser/chromeos/cros/cryptohome_library.h"
11
12 namespace chromeos {
13
14 class FakeCryptohomeLibrary : public CryptohomeLibrary {
15 public:
16 FakeCryptohomeLibrary() {
17 // The salt must be non-empty and an even length.
18 salt_.push_back(0);
19 salt_.push_back(0);
20 }
21
22 virtual ~FakeCryptohomeLibrary() {}
23 virtual bool Mount(const std::string& user_email,
24 const std::string& passhash,
25 int* error_code) {
26 return true;
27 }
28
29 virtual bool MountForBwsi(int* error_code) {
30 return true;
31 }
32
33 virtual bool CheckKey(const std::string& user_email,
34 const std::string& passhash) {
35 return true;
36 }
37
38 virtual bool MigrateKey(const std::string& user_email,
39 const std::string& old_hash,
40 const std::string& new_hash) {
41 return true;
42 }
43
44 virtual bool Remove(const std::string& user_email) {
45 return true;
46 }
47
48 virtual bool IsMounted() {
49 return true;
50 }
51
52 virtual CryptohomeBlob GetSystemSalt() {
53 return salt_;
54 }
55
56 private:
57 CryptohomeBlob salt_;
58 };
59
60 } // namespace chromeos
61
62 #endif // CHROME_BROWSER_CHROMEOS_CROS_FAKE_FAKE_CRYPTOHOME_LIBRARY_H_
OLDNEW
« no previous file with comments | « chrome/browser/browser_main.cc ('k') | chrome/browser/chromeos/cros/fake/fake_input_method_library.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698