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

Unified Diff: trunk/src/chrome/browser/managed_mode/managed_user_registration_service.h

Issue 15675014: Revert 203015 "Add ManagedUserTokenFetcher to fetch scoped-down ..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: 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 side-by-side diff with in-line comments
Download patch
Index: trunk/src/chrome/browser/managed_mode/managed_user_registration_service.h
===================================================================
--- trunk/src/chrome/browser/managed_mode/managed_user_registration_service.h (revision 203118)
+++ trunk/src/chrome/browser/managed_mode/managed_user_registration_service.h (working copy)
@@ -17,13 +17,8 @@
#include "sync/api/syncable_service.h"
class GoogleServiceAuthError;
-class ManagedUserRefreshTokenFetcher;
class PrefService;
-namespace browser_sync {
-class DeviceInfo;
-}
-
namespace user_prefs {
class PrefRegistrySyncable;
}
@@ -42,17 +37,13 @@
const std::string& /* token */)>
RegistrationCallback;
- ManagedUserRegistrationService(
- PrefService* prefs,
- scoped_ptr<ManagedUserRefreshTokenFetcher> token_fetcher);
+ explicit ManagedUserRegistrationService(PrefService* prefs);
virtual ~ManagedUserRegistrationService();
static void RegisterUserPrefs(user_prefs::PrefRegistrySyncable* registry);
// Registers a new managed user with the server. |name| is the display name of
// the user. |callback| is called with the result of the registration.
- // TODO(bauerb): There should be a way to cancel a pending managed user
- // registration.
void Register(const string16& name, const RegistrationCallback& callback);
// Convenience method that registers a new managed user with the server and
@@ -86,13 +77,8 @@
// Called when the Sync server has acknowledged a newly created managed user.
void OnManagedUserAcknowledged(const std::string& managed_user_id);
- // Fetches the managed user token when we have the device info.
- void FetchToken(const string16& name,
- const browser_sync::DeviceInfo& device_info);
-
// Called when we have received a token for the managed user.
- void OnReceivedToken(const GoogleServiceAuthError& error,
- const std::string& token);
+ void OnReceivedToken(const std::string& token);
// Dispatches the callback if all the conditions have been met.
void DispatchCallbackIfReady();
@@ -108,7 +94,6 @@
base::WeakPtrFactory<ManagedUserRegistrationService> weak_ptr_factory_;
PrefService* prefs_;
PrefChangeRegistrar pref_change_registrar_;
- scoped_ptr<ManagedUserRefreshTokenFetcher> token_fetcher_;
scoped_ptr<syncer::SyncChangeProcessor> sync_processor_;
scoped_ptr<syncer::SyncErrorFactory> error_handler_;

Powered by Google App Engine
This is Rietveld 408576698