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

Side by Side Diff: components/ownership/owner_key_util_impl.h

Issue 494093002: OwnerKeyUtil is moved to components/ownership. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Restored pure base OwnerKeyUtil. Created 6 years, 3 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
(Empty)
1 // Copyright 2014 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 COMPONENTS_OWNERSHIP_OWNER_KEY_UTIL_IMPL_H_
6 #define COMPONENTS_OWNERSHIP_OWNER_KEY_UTIL_IMPL_H_
7
8 #include "base/basictypes.h"
erikwright (departed) 2014/08/28 18:39:58 what do you need from basictypes that's not in mac
ygorshenin1 2014/08/28 18:59:05 Nothing, I forget to remove it, sorry. On 2014/08
9 #include "base/compiler_specific.h"
10 #include "base/files/file_path.h"
11 #include "base/macros.h"
12 #include "base/memory/ref_counted.h"
erikwright (departed) 2014/08/28 18:39:58 not required.
ygorshenin1 2014/08/28 18:59:05 Done.
13 #include "components/ownership/owner_key_util.h"
14 #include "components/ownership/ownership_export.h"
15
16 namespace ownership {
17
18 class OWNERSHIP_EXPORT OwnerKeyUtilImpl : public OwnerKeyUtil {
19 public:
20 explicit OwnerKeyUtilImpl(const base::FilePath& public_key_file);
21
22 // Attempts to read the public key from the file system. Upon success,
23 // returns true and populates |output|. False on failure.
erikwright (departed) 2014/08/28 18:39:58 These comments should be in the pure-virtual file.
ygorshenin1 2014/08/28 18:59:05 Done.
24 virtual bool ImportPublicKey(std::vector<uint8>* output) OVERRIDE;
25
26 #if defined(USE_NSS)
27 // Looks for the private key associated with |key| in the |slot|
28 // and returns it if it can be found. Returns NULL otherwise.
29 // Caller takes ownership.
30 virtual crypto::RSAPrivateKey* FindPrivateKeyInSlot(
31 const std::vector<uint8>& key,
32 PK11SlotInfo* slot) OVERRIDE;
33 #endif // defined(USE_NSS)
34
35 // Checks whether the public key is present in the file system.
36 virtual bool IsPublicKeyPresent() OVERRIDE;
37
38 protected:
39 virtual ~OwnerKeyUtilImpl();
erikwright (departed) 2014/08/28 18:39:58 Since you don't have any 'friends' I guess this ca
ygorshenin1 2014/08/28 18:59:05 Done.
40
41 private:
42 // The file that holds the public key.
43 base::FilePath public_key_file_;
44
45 DISALLOW_COPY_AND_ASSIGN(OwnerKeyUtilImpl);
46 };
47
48 } // namespace ownership
49
50 #endif // COMPONENTS_OWNERSHIP_OWNER_KEY_UTIL_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698