OLD | NEW |
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 CHROME_BROWSER_SUPERVISED_USER_LEGACY_SUPERVISED_USER_REGISTRATION_UTILI
TY_STUB_H_ | 5 #ifndef CHROME_BROWSER_SUPERVISED_USER_LEGACY_SUPERVISED_USER_REGISTRATION_UTILI
TY_STUB_H_ |
6 #define CHROME_BROWSER_SUPERVISED_USER_LEGACY_SUPERVISED_USER_REGISTRATION_UTILI
TY_STUB_H_ | 6 #define CHROME_BROWSER_SUPERVISED_USER_LEGACY_SUPERVISED_USER_REGISTRATION_UTILI
TY_STUB_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
12 #include "base/strings/string16.h" | 12 #include "base/strings/string16.h" |
13 #include "chrome/browser/supervised_user/legacy/supervised_user_registration_uti
lity.h" | 13 #include "chrome/browser/supervised_user/legacy/supervised_user_registration_uti
lity.h" |
| 14 #include "components/user_manager/user_id.h" |
14 #include "google_apis/gaia/google_service_auth_error.h" | 15 #include "google_apis/gaia/google_service_auth_error.h" |
15 | 16 |
16 class SupervisedUserRegistrationUtilityStub | 17 class SupervisedUserRegistrationUtilityStub |
17 : public SupervisedUserRegistrationUtility { | 18 : public SupervisedUserRegistrationUtility { |
18 public: | 19 public: |
19 SupervisedUserRegistrationUtilityStub(); | 20 SupervisedUserRegistrationUtilityStub(); |
20 ~SupervisedUserRegistrationUtilityStub() override; | 21 ~SupervisedUserRegistrationUtilityStub() override; |
21 | 22 |
22 void Register(const std::string& supervised_user_id, | 23 void Register(const user_manager::UserID& supervised_user_id, |
23 const SupervisedUserRegistrationInfo& info, | 24 const SupervisedUserRegistrationInfo& info, |
24 const RegistrationCallback& callback) override; | 25 const RegistrationCallback& callback) override; |
25 | 26 |
26 bool register_was_called() { return register_was_called_; } | 27 bool register_was_called() { return register_was_called_; } |
27 | 28 |
28 std::string supervised_user_id() { return supervised_user_id_; } | 29 user_manager::UserID supervised_user_id() { return supervised_user_id_; } |
29 | 30 |
30 base::string16 display_name() { return display_name_; } | 31 base::string16 display_name() { return display_name_; } |
31 | 32 |
32 std::string master_key() { return master_key_; } | 33 std::string master_key() { return master_key_; } |
33 | 34 |
34 void RunSuccessCallback(const std::string& token); | 35 void RunSuccessCallback(const std::string& token); |
35 void RunFailureCallback(GoogleServiceAuthError::State error); | 36 void RunFailureCallback(GoogleServiceAuthError::State error); |
36 | 37 |
37 private: | 38 private: |
38 RegistrationCallback callback_; | 39 RegistrationCallback callback_; |
39 bool register_was_called_; | 40 bool register_was_called_; |
40 std::string supervised_user_id_; | 41 user_manager::UserID supervised_user_id_; |
41 base::string16 display_name_; | 42 base::string16 display_name_; |
42 std::string master_key_; | 43 std::string master_key_; |
43 | 44 |
44 DISALLOW_COPY_AND_ASSIGN(SupervisedUserRegistrationUtilityStub); | 45 DISALLOW_COPY_AND_ASSIGN(SupervisedUserRegistrationUtilityStub); |
45 }; | 46 }; |
46 | 47 |
47 #endif // CHROME_BROWSER_SUPERVISED_USER_LEGACY_SUPERVISED_USER_REGISTRATION_UT
ILITY_STUB_H_ | 48 #endif // CHROME_BROWSER_SUPERVISED_USER_LEGACY_SUPERVISED_USER_REGISTRATION_UT
ILITY_STUB_H_ |
OLD | NEW |