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

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: sync 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 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 void GetManualExceptionsForHost(const std::string& host, 106 void GetManualExceptionsForHost(const std::string& host,
107 std::vector<GURL>* urls); 107 std::vector<GURL>* urls);
108 108
109 // Initializes this object. This method does nothing if the profile is not 109 // Initializes this object. This method does nothing if the profile is not
110 // managed. 110 // managed.
111 void Init(); 111 void Init();
112 112
113 // Marks the profile as managed and initializes it. 113 // Marks the profile as managed and initializes it.
114 void InitForTesting(); 114 void InitForTesting();
115 115
116 // Initializes this profile for syncing, using the provided |token| to 116 // Initializes this profile for syncing, using the provided |refresh_token| to
117 // authenticate requests. 117 // mint access tokens for Sync.
118 void InitSync(const std::string& token); 118 void InitSync(const std::string& refresh_token);
119 119
120 // Convenience method that registers this managed user with 120 // Convenience method that registers this managed user with
121 // |registration_service| and initializes sync with the returned token. 121 // |registration_service| and initializes sync with the returned token.
122 // Note that |registration_service| should belong to the custodian's profile, 122 // Note that |registration_service| should belong to the custodian's profile,
123 // not this one. The |callback| will be called when registration is complete, 123 // not this one. The |callback| will be called when registration is complete,
124 // whether it suceeded or not -- unless registration was cancelled in the 124 // whether it suceeded or not -- unless registration was cancelled in the
125 // ManagedUserRegistrationService manually, in which case the callback will 125 // ManagedUserRegistrationService manually, in which case the callback will
126 // be ignored. 126 // be ignored.
127 void RegisterAndInitSync(Profile* custodian_profile, 127 void RegisterAndInitSync(Profile* custodian_profile,
128 const ProfileManager::CreateCallback& callback); 128 const ProfileManager::CreateCallback& callback);
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 content::NotificationRegistrar registrar_; 215 content::NotificationRegistrar registrar_;
216 PrefChangeRegistrar pref_change_registrar_; 216 PrefChangeRegistrar pref_change_registrar_;
217 217
218 // Sets a profile in elevated state for testing if set to true. 218 // Sets a profile in elevated state for testing if set to true.
219 bool elevated_for_testing_; 219 bool elevated_for_testing_;
220 220
221 URLFilterContext url_filter_context_; 221 URLFilterContext url_filter_context_;
222 }; 222 };
223 223
224 #endif // CHROME_BROWSER_MANAGED_MODE_MANAGED_USER_SERVICE_H_ 224 #endif // CHROME_BROWSER_MANAGED_MODE_MANAGED_USER_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698