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

Side by Side Diff: chrome/browser/managed_mode/managed_user_registration_utility_stub.h

Issue 23691045: Update managed user registration to allow updating the avatar (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ... Created 7 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 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 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_MANAGED_MODE_MANAGED_USER_REGISTRATION_UTILITY_STUB_H_ 5 #ifndef CHROME_BROWSER_MANAGED_MODE_MANAGED_USER_REGISTRATION_UTILITY_STUB_H_
6 #define CHROME_BROWSER_MANAGED_MODE_MANAGED_USER_REGISTRATION_UTILITY_STUB_H_ 6 #define CHROME_BROWSER_MANAGED_MODE_MANAGED_USER_REGISTRATION_UTILITY_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/managed_mode/managed_user_registration_utility.h" 13 #include "chrome/browser/managed_mode/managed_user_registration_utility.h"
14 #include "google_apis/gaia/google_service_auth_error.h" 14 #include "google_apis/gaia/google_service_auth_error.h"
15 15
16 class ManagedUserRegistrationUtilityStub 16 class ManagedUserRegistrationUtilityStub
17 : public ManagedUserRegistrationUtility { 17 : public ManagedUserRegistrationUtility {
18 public: 18 public:
19 ManagedUserRegistrationUtilityStub(); 19 ManagedUserRegistrationUtilityStub();
20 virtual ~ManagedUserRegistrationUtilityStub(); 20 virtual ~ManagedUserRegistrationUtilityStub();
21 21
22 virtual void Register(const std::string& managed_user_id, 22 virtual void Register(const std::string& managed_user_id,
23 bool update_avatar,
23 const ManagedUserRegistrationInfo& info, 24 const ManagedUserRegistrationInfo& 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 managed_user_id() { return managed_user_id_; } 29 std::string managed_user_id() { return managed_user_id_; }
29 30
30 string16 display_name() { return display_name_; } 31 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
35 bool update_avatar() const { return update_avatar_; }
36
34 void RunSuccessCallback(const std::string& token); 37 void RunSuccessCallback(const std::string& token);
35 void RunFailureCallback(GoogleServiceAuthError::State error); 38 void RunFailureCallback(GoogleServiceAuthError::State error);
36 39
37 private: 40 private:
38 RegistrationCallback callback_; 41 RegistrationCallback callback_;
39 bool register_was_called_; 42 bool register_was_called_;
40 std::string managed_user_id_; 43 std::string managed_user_id_;
41 string16 display_name_; 44 string16 display_name_;
42 std::string master_key_; 45 std::string master_key_;
46 bool update_avatar_;
43 47
44 DISALLOW_COPY_AND_ASSIGN(ManagedUserRegistrationUtilityStub); 48 DISALLOW_COPY_AND_ASSIGN(ManagedUserRegistrationUtilityStub);
45 }; 49 };
46 50
47 #endif // CHROME_BROWSER_MANAGED_MODE_MANAGED_USER_REGISTRATION_UTILITY_STUB_H_ 51 #endif // CHROME_BROWSER_MANAGED_MODE_MANAGED_USER_REGISTRATION_UTILITY_STUB_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698