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

Side by Side Diff: chromeos/dbus/cryptohome_client.h

Issue 880303003: Cryptohome: Notify about error in async calls if cryptohome is not ready yet. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update 1 Created 5 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
« no previous file with comments | « chromeos/cryptohome/async_method_caller.cc ('k') | chromeos/dbus/cryptohome_client.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 (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 CHROMEOS_DBUS_CRYPTOHOME_CLIENT_H_ 5 #ifndef CHROMEOS_DBUS_CRYPTOHOME_CLIENT_H_
6 #define CHROMEOS_DBUS_CRYPTOHOME_CLIENT_H_ 6 #define CHROMEOS_DBUS_CRYPTOHOME_CLIENT_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 21 matching lines...) Expand all
32 32
33 } // namespace cryptohome 33 } // namespace cryptohome
34 34
35 namespace chromeos { 35 namespace chromeos {
36 36
37 // CryptohomeClient is used to communicate with the Cryptohome service. 37 // CryptohomeClient is used to communicate with the Cryptohome service.
38 // All method should be called from the origin thread (UI thread) which 38 // All method should be called from the origin thread (UI thread) which
39 // initializes the DBusThreadManager instance. 39 // initializes the DBusThreadManager instance.
40 class CHROMEOS_EXPORT CryptohomeClient : public DBusClient { 40 class CHROMEOS_EXPORT CryptohomeClient : public DBusClient {
41 public: 41 public:
42 // Constant that will be passed to AsyncMethodCallback to indicate that
43 // cryptohome is not ready yet.
44 static const int kNotReadyAsyncId;
45
42 // A callback to handle AsyncCallStatus signals. 46 // A callback to handle AsyncCallStatus signals.
43 typedef base::Callback<void(int async_id, 47 typedef base::Callback<void(int async_id,
44 bool return_status, 48 bool return_status,
45 int return_code)> 49 int return_code)>
46 AsyncCallStatusHandler; 50 AsyncCallStatusHandler;
47 // A callback to handle AsyncCallStatusWithData signals. 51 // A callback to handle AsyncCallStatusWithData signals.
48 typedef base::Callback<void(int async_id, 52 typedef base::Callback<void(int async_id,
49 bool return_status, 53 bool return_status,
50 const std::string& data)> 54 const std::string& data)>
51 AsyncCallStatusWithDataHandler; 55 AsyncCallStatusWithDataHandler;
(...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after
542 // Create() should be used instead. 546 // Create() should be used instead.
543 CryptohomeClient(); 547 CryptohomeClient();
544 548
545 private: 549 private:
546 DISALLOW_COPY_AND_ASSIGN(CryptohomeClient); 550 DISALLOW_COPY_AND_ASSIGN(CryptohomeClient);
547 }; 551 };
548 552
549 } // namespace chromeos 553 } // namespace chromeos
550 554
551 #endif // CHROMEOS_DBUS_CRYPTOHOME_CLIENT_H_ 555 #endif // CHROMEOS_DBUS_CRYPTOHOME_CLIENT_H_
OLDNEW
« no previous file with comments | « chromeos/cryptohome/async_method_caller.cc ('k') | chromeos/dbus/cryptohome_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698