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

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

Issue 15734006: Restructure user-creation flow and surface errors (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Removed log; patch for commit. Created 7 years, 6 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 | Annotate | Revision Log
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_SERVICE_H_ 5 #ifndef CHROME_BROWSER_MANAGED_MODE_MANAGED_USER_REGISTRATION_SERVICE_H_
6 #define CHROME_BROWSER_MANAGED_MODE_MANAGED_USER_REGISTRATION_SERVICE_H_ 6 #define CHROME_BROWSER_MANAGED_MODE_MANAGED_USER_REGISTRATION_SERVICE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 24 matching lines...) Expand all
35 // the user. |callback| is called with the result of the registration. 35 // the user. |callback| is called with the result of the registration.
36 void Register(const string16& name, 36 void Register(const string16& name,
37 const RegistrationCallback& callback); 37 const RegistrationCallback& callback);
38 38
39 // Convenience method that registers a new managed user with the server and 39 // Convenience method that registers a new managed user with the server and
40 // initializes it locally. The callback allows it to be run after a new 40 // initializes it locally. The callback allows it to be run after a new
41 // profile has been created: 41 // profile has been created:
42 // ProfileManager::CreateMultiProfileAsync( 42 // ProfileManager::CreateMultiProfileAsync(
43 // name, icon, 43 // name, icon,
44 // managed_user_registration_service->GetRegistrationAndInitCallback(), 44 // managed_user_registration_service->GetRegistrationAndInitCallback(),
45 // desktop_type, managed_user); 45 // managed_user);
46 ProfileManager::CreateCallback GetRegistrationAndInitCallback(); 46 ProfileManager::CreateCallback GetRegistrationAndInitCallback();
47 47
48 private: 48 private:
49 void DispatchCallback(); 49 void DispatchCallback();
50 50
51 void OnProfileCreated(Profile* profile, 51 void OnProfileCreated(Profile* profile,
52 Profile::CreateStatus status); 52 Profile::CreateStatus status);
53 53
54 base::WeakPtrFactory<ManagedUserRegistrationService> weak_ptr_factory_; 54 base::WeakPtrFactory<ManagedUserRegistrationService> weak_ptr_factory_;
55 55
56 string16 display_name_; 56 string16 display_name_;
57 RegistrationCallback callback_; 57 RegistrationCallback callback_;
58 58
59 DISALLOW_COPY_AND_ASSIGN(ManagedUserRegistrationService); 59 DISALLOW_COPY_AND_ASSIGN(ManagedUserRegistrationService);
60 }; 60 };
61 61
62 #endif // CHROME_BROWSER_MANAGED_MODE_MANAGED_USER_REGISTRATION_SERVICE_H_ 62 #endif // CHROME_BROWSER_MANAGED_MODE_MANAGED_USER_REGISTRATION_SERVICE_H_
OLDNEW
« no previous file with comments | « chrome/browser/automation/testing_automation_provider.cc ('k') | chrome/browser/profiles/profile_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698