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

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

Issue 15517005: Remove references to Profile from browser_context_keyed_service. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase & style Created 7 years, 7 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"
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "base/string16.h" 12 #include "base/string16.h"
13 #include "chrome/browser/profiles/profile_manager.h" 13 #include "chrome/browser/profiles/profile_manager.h"
14 #include "components/browser_context_keyed_service/browser_context_keyed_service .h" 14 #include "components/browser_context_keyed_service/browser_context_keyed_service .h"
15 15
16 class GoogleServiceAuthError; 16 class GoogleServiceAuthError;
17 17
18 // Holds the state necessary for registering a new managed user with the 18 // Holds the state necessary for registering a new managed user with the
19 // management server and associating it with its custodian. It is owned by the 19 // management server and associating it with its custodian. It is owned by the
20 // custodian's profile. 20 // custodian's profile.
21 class ManagedUserRegistrationService : public ProfileKeyedService { 21 class ManagedUserRegistrationService : public BrowserContextKeyedService {
22 public: 22 public:
23 // Callback for Register() below. If registration is successful, |token| will 23 // Callback for Register() below. If registration is successful, |token| will
24 // contain an authentication token for the newly registered managed user, 24 // contain an authentication token for the newly registered managed user,
25 // otherwise |token| will be empty and |error| will contain the authentication 25 // otherwise |token| will be empty and |error| will contain the authentication
26 // error for the custodian. 26 // error for the custodian.
27 typedef base::Callback<void(const GoogleServiceAuthError& /* error */, 27 typedef base::Callback<void(const GoogleServiceAuthError& /* error */,
28 const std::string& /* token */)> 28 const std::string& /* token */)>
29 RegistrationCallback; 29 RegistrationCallback;
30 30
31 ManagedUserRegistrationService(); 31 ManagedUserRegistrationService();
(...skipping 21 matching lines...) Expand all
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

Powered by Google App Engine
This is Rietveld 408576698