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

Unified Diff: chrome/browser/policy/device_token_fetcher.h

Issue 4960003: Don't register gmail users at the device management server (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 10 years, 1 month 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: chrome/browser/policy/device_token_fetcher.h
diff --git a/chrome/browser/policy/device_token_fetcher.h b/chrome/browser/policy/device_token_fetcher.h
index 1bfff13a5e0f7e1f8c4f988ad04b96161a2120d1..9b991dea759f965af6966750ac5611beb818d0a1 100644
--- a/chrome/browser/policy/device_token_fetcher.h
+++ b/chrome/browser/policy/device_token_fetcher.h
@@ -17,7 +17,7 @@
#include "chrome/common/notification_observer.h"
#include "chrome/common/notification_registrar.h"
-class TokenService;
+class Profile;
namespace policy {
@@ -69,7 +69,7 @@ class DeviceTokenFetcher
// obtains the authentication token from |token_service|. The fetcher stores
// the device token to |token_path| once it's retrieved from the server.
DeviceTokenFetcher(DeviceManagementBackend* backend,
- TokenService* token_service,
+ Profile* profile,
const FilePath& token_path);
virtual ~DeviceTokenFetcher() {}
@@ -113,6 +113,14 @@ class DeviceTokenFetcher
// True if the device token has been fetched and is valid.
bool IsTokenValid() const;
+ protected:
+ // Returns the email address of the currently logged-in user.
+ virtual std::string GetCurrentUser();
+
+ // Used to identify GOOGLE_SIGNIN_SUCCESSFUL notifications from the owning
+ // profile, and to query for the current username.
+ Profile* profile_; // weak
+
private:
friend class DeviceTokenFetcherTest;
@@ -185,7 +193,6 @@ class DeviceTokenFetcher
ObserverList<Observer, true> observer_list_;
FilePath token_path_;
DeviceManagementBackend* backend_; // weak
- TokenService* token_service_;
FetcherState state_;
std::string device_token_;
std::string device_id_;

Powered by Google App Engine
This is Rietveld 408576698