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

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

Issue 15780020: Setup Sync to use OAuth token for managed users. (Closed) Base URL: http://git.chromium.org/chromium/src.git@issue226464a
Patch Set: invalidation 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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_SERVICE_H_ 5 #ifndef CHROME_BROWSER_MANAGED_MODE_MANAGED_USER_SERVICE_H_
6 #define CHROME_BROWSER_MANAGED_MODE_MANAGED_USER_SERVICE_H_ 6 #define CHROME_BROWSER_MANAGED_MODE_MANAGED_USER_SERVICE_H_
7 7
8 #include <set> 8 #include <set>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 void GetManualExceptionsForHost(const std::string& host, 102 void GetManualExceptionsForHost(const std::string& host,
103 std::vector<GURL>* urls); 103 std::vector<GURL>* urls);
104 104
105 // Initializes this object. This method does nothing if the profile is not 105 // Initializes this object. This method does nothing if the profile is not
106 // managed. 106 // managed.
107 void Init(); 107 void Init();
108 108
109 // Marks the profile as managed and initializes it. 109 // Marks the profile as managed and initializes it.
110 void InitForTesting(); 110 void InitForTesting();
111 111
112 // Initializes this profile for syncing, using the provided |token| to 112 // Initializes this profile for syncing, using the provided |refresh_token| to
113 // authenticate requests. 113 // mint access tokens for Sync.
114 void InitSync(const std::string& token); 114 void InitSync(const std::string& refresh_token);
115 115
116 // Convenience method that registers this managed user with 116 // Convenience method that registers this managed user with
117 // |registration_service| and initializes sync with the returned token. 117 // |registration_service| and initializes sync with the returned token.
118 // Note that |registration_service| should belong to the custodian's profile, 118 // Note that |registration_service| should belong to the custodian's profile,
119 // not this one. The |callback| will be called when registration is complete, 119 // not this one. The |callback| will be called when registration is complete,
120 // whether it suceeded or not -- unless registration was cancelled in the 120 // whether it suceeded or not -- unless registration was cancelled in the
121 // ManagedUserRegistrationService manually, in which case the callback will 121 // ManagedUserRegistrationService manually, in which case the callback will
122 // be ignored. 122 // be ignored.
123 void RegisterAndInitSync(Profile* custodian_profile, 123 void RegisterAndInitSync(Profile* custodian_profile,
124 const ProfileManager::CreateCallback& callback); 124 const ProfileManager::CreateCallback& callback);
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 content::NotificationRegistrar registrar_; 213 content::NotificationRegistrar registrar_;
214 PrefChangeRegistrar pref_change_registrar_; 214 PrefChangeRegistrar pref_change_registrar_;
215 215
216 // Sets a profile in elevated state for testing if set to true. 216 // Sets a profile in elevated state for testing if set to true.
217 bool elevated_for_testing_; 217 bool elevated_for_testing_;
218 218
219 URLFilterContext url_filter_context_; 219 URLFilterContext url_filter_context_;
220 }; 220 };
221 221
222 #endif // CHROME_BROWSER_MANAGED_MODE_MANAGED_USER_SERVICE_H_ 222 #endif // CHROME_BROWSER_MANAGED_MODE_MANAGED_USER_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698