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

Side by Side Diff: chromeos/cryptohome/homedir_methods.h

Issue 526353002: Merge cryptohome::RetrievedKeyData with cryptohome::KeyDefinition (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@d_2_367847_add_get_key_data_ex_to_mount_flow
Patch Set: Rebased. 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
« no previous file with comments | « chromeos/cryptohome/cryptohome_parameters.cc ('k') | chromeos/cryptohome/homedir_methods.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 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 CHROMEOS_CRYPTOHOME_HOMEDIR_METHODS_H_ 5 #ifndef CHROMEOS_CRYPTOHOME_HOMEDIR_METHODS_H_
6 #define CHROMEOS_CRYPTOHOME_HOMEDIR_METHODS_H_ 6 #define CHROMEOS_CRYPTOHOME_HOMEDIR_METHODS_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector>
9 10
10 #include "base/basictypes.h" 11 #include "base/basictypes.h"
11 #include "base/callback_forward.h" 12 #include "base/callback_forward.h"
12 #include "base/memory/scoped_vector.h"
13 #include "chromeos/chromeos_export.h" 13 #include "chromeos/chromeos_export.h"
14 #include "chromeos/cryptohome/cryptohome_parameters.h" 14 #include "chromeos/cryptohome/cryptohome_parameters.h"
15 #include "chromeos/dbus/cryptohome_client.h" 15 #include "chromeos/dbus/cryptohome_client.h"
16 #include "third_party/cros_system_api/dbus/service_constants.h" 16 #include "third_party/cros_system_api/dbus/service_constants.h"
17 17
18 namespace cryptohome { 18 namespace cryptohome {
19 19
20 // This class manages calls to Cryptohome service's home directory methods: 20 // This class manages calls to Cryptohome service's home directory methods:
21 // Mount, CheckKey, Add/UpdateKey. 21 // Mount, CheckKey, Add/UpdateKey.
22 class CHROMEOS_EXPORT HomedirMethods { 22 class CHROMEOS_EXPORT HomedirMethods {
23 public: 23 public:
24 // Callbacks that are called back on the UI thread when the results of the 24 // Callbacks that are called back on the UI thread when the results of the
25 // respective method calls are ready. 25 // respective method calls are ready.
26 typedef base::Callback<void(bool success, MountError return_code)> Callback; 26 typedef base::Callback<void(bool success, MountError return_code)> Callback;
27 typedef base::Callback<void( 27 typedef base::Callback<void(
28 bool success, 28 bool success,
29 MountError return_code, 29 MountError return_code,
30 ScopedVector<RetrievedKeyData> key_data)> GetKeyDataCallback; 30 const std::vector<KeyDefinition>& key_definitions)> GetKeyDataCallback;
31 typedef base::Callback< 31 typedef base::Callback<
32 void(bool success, MountError return_code, const std::string& mount_hash)> 32 void(bool success, MountError return_code, const std::string& mount_hash)>
33 MountCallback; 33 MountCallback;
34 34
35 virtual ~HomedirMethods() {} 35 virtual ~HomedirMethods() {}
36 36
37 // Asks cryptohomed to return data about the key identified by |label| for the 37 // Asks cryptohomed to return data about the key identified by |label| for the
38 // user identified by |id|. At present, this does not return any secret 38 // user identified by |id|. At present, this does not return any secret
39 // information and the request does not need to be authenticated. 39 // information and the request does not need to be authenticated.
40 virtual void GetKeyDataEx(const Identification& id, 40 virtual void GetKeyDataEx(const Identification& id,
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 static void Shutdown(); 103 static void Shutdown();
104 104
105 // Returns a pointer to the global HomedirMethods instance. 105 // Returns a pointer to the global HomedirMethods instance.
106 // Initialize() should already have been called. 106 // Initialize() should already have been called.
107 static HomedirMethods* GetInstance(); 107 static HomedirMethods* GetInstance();
108 }; 108 };
109 109
110 } // namespace cryptohome 110 } // namespace cryptohome
111 111
112 #endif // CHROMEOS_CRYPTOHOME_HOMEDIR_METHODS_H_ 112 #endif // CHROMEOS_CRYPTOHOME_HOMEDIR_METHODS_H_
OLDNEW
« no previous file with comments | « chromeos/cryptohome/cryptohome_parameters.cc ('k') | chromeos/cryptohome/homedir_methods.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698