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

Side by Side Diff: chrome/browser/chromeos/settings/owner_key_util.h

Issue 12218078: Implement a policy to autologin a public account. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: split out FakeSessionManagerClient Created 7 years, 10 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
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_SETTINGS_OWNER_KEY_UTIL_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_SETTINGS_OWNER_KEY_UTIL_H_
6 #define CHROME_BROWSER_CHROMEOS_SETTINGS_OWNER_KEY_UTIL_H_ 6 #define CHROME_BROWSER_CHROMEOS_SETTINGS_OWNER_KEY_UTIL_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 50
51 private: 51 private:
52 friend class base::RefCountedThreadSafe<OwnerKeyUtil>; 52 friend class base::RefCountedThreadSafe<OwnerKeyUtil>;
53 53
54 FRIEND_TEST_ALL_PREFIXES(OwnerKeyUtilTest, ExportImportPublicKey); 54 FRIEND_TEST_ALL_PREFIXES(OwnerKeyUtilTest, ExportImportPublicKey);
55 }; 55 };
56 56
57 // Implementation of OwnerKeyUtil that is used in production code. 57 // Implementation of OwnerKeyUtil that is used in production code.
58 class OwnerKeyUtilImpl : public OwnerKeyUtil { 58 class OwnerKeyUtilImpl : public OwnerKeyUtil {
59 public: 59 public:
60
bartfab (slow) 2013/02/25 16:51:23 Why the blank line?
dconnelly 2013/02/26 18:04:15 Done.
60 explicit OwnerKeyUtilImpl(const base::FilePath& public_key_file); 61 explicit OwnerKeyUtilImpl(const base::FilePath& public_key_file);
61 62
62 // OwnerKeyUtil: 63 // OwnerKeyUtil:
63 virtual bool ImportPublicKey(std::vector<uint8>* output) OVERRIDE; 64 virtual bool ImportPublicKey(std::vector<uint8>* output) OVERRIDE;
64 virtual crypto::RSAPrivateKey* FindPrivateKey( 65 virtual crypto::RSAPrivateKey* FindPrivateKey(
65 const std::vector<uint8>& key) OVERRIDE; 66 const std::vector<uint8>& key) OVERRIDE;
66 virtual bool IsPublicKeyPresent() OVERRIDE; 67 virtual bool IsPublicKeyPresent() OVERRIDE;
67 68
68 protected: 69 protected:
69 virtual ~OwnerKeyUtilImpl(); 70 virtual ~OwnerKeyUtilImpl();
70 71
71 private: 72 private:
72 // The file that holds the public key. 73 // The file that holds the public key.
73 base::FilePath key_file_; 74 base::FilePath key_file_;
74 75
75 DISALLOW_COPY_AND_ASSIGN(OwnerKeyUtilImpl); 76 DISALLOW_COPY_AND_ASSIGN(OwnerKeyUtilImpl);
76 }; 77 };
77 78
78 } // namespace chromeos 79 } // namespace chromeos
79 80
80 #endif // CHROME_BROWSER_CHROMEOS_SETTINGS_OWNER_KEY_UTIL_H_ 81 #endif // CHROME_BROWSER_CHROMEOS_SETTINGS_OWNER_KEY_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698