1 // Copyright 2013 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.
5 #ifndef CHROME_BROWSER_MANAGED_MODE_MANAGED_USER_REGISTRATION_UTILITY_STUB_H_
6 #define CHROME_BROWSER_MANAGED_MODE_MANAGED_USER_REGISTRATION_UTILITY_STUB_H_
10 #include "base/basictypes.h"
11 #include "base/compiler_specific.h"
12 #include "base/strings/string16.h"
13 #include "chrome/browser/managed_mode/managed_user_registration_utility.h"
14 #include "google_apis/gaia/google_service_auth_error.h"
16 class ManagedUserRegistrationUtilityStub
17 : public ManagedUserRegistrationUtility {
19 ManagedUserRegistrationUtilityStub();
20 virtual ~ManagedUserRegistrationUtilityStub();
22 virtual void Register(const std::string& managed_user_id,
23 const ManagedUserRegistrationInfo& info,
24 const RegistrationCallback& callback) OVERRIDE;
26 bool register_was_called() { return register_was_called_; }
28 std::string managed_user_id() { return managed_user_id_; }
30 string16 display_name() { return display_name_; }
32 std::string master_key() { return master_key_; }
34 void RunSuccessCallback(const std::string& token);
35 void RunFailureCallback(GoogleServiceAuthError::State error);
38 RegistrationCallback callback_;
39 bool register_was_called_;
40 std::string managed_user_id_;
41 string16 display_name_;
42 std::string master_key_;
44 DISALLOW_COPY_AND_ASSIGN(ManagedUserRegistrationUtilityStub);
47 #endif // CHROME_BROWSER_MANAGED_MODE_MANAGED_USER_REGISTRATION_UTILITY_STUB_H_