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

Unified Diff: chrome/browser/policy/device_management_policy_provider.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: " 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_management_policy_provider.h
diff --git a/chrome/browser/policy/device_management_policy_provider.h b/chrome/browser/policy/device_management_policy_provider.h
index d73afc52ee1823a8e2779eb14ad91f1cf2b31bb9..e70d8d716cc73cf4d522dda53b7499b4adf97f1e 100644
--- a/chrome/browser/policy/device_management_policy_provider.h
+++ b/chrome/browser/policy/device_management_policy_provider.h
@@ -18,6 +18,7 @@
#include "chrome/common/notification_registrar.h"
#include "chrome/common/notification_source.h"
+class Profile;
class TokenService;
namespace policy {
@@ -37,8 +38,7 @@ class DeviceManagementPolicyProvider
public:
DeviceManagementPolicyProvider(const PolicyDefinitionList* policy_list,
DeviceManagementBackend* backend,
- TokenService* token_service,
- const FilePath& storage_dir);
+ Profile* profile);
virtual ~DeviceManagementPolicyProvider();
@@ -64,8 +64,16 @@ class DeviceManagementPolicyProvider
void Shutdown();
private:
+ friend class DeviceManagementPolicyProviderTest;
+
class InitializeAfterIOThreadExistsTask;
+ // Used for testing only.
+ DeviceManagementPolicyProvider(const PolicyDefinitionList* policy_list,
+ DeviceManagementBackend* backend,
+ Profile* profile,
+ DeviceTokenFetcher* token_fetcher);
+
// Returns the device management backend to use for backend requests, lazily
// creating a new one if one doesn't already exist.
DeviceManagementBackend* GetBackend();
@@ -98,7 +106,7 @@ class DeviceManagementPolicyProvider
const FilePath& user_data_dir);
scoped_ptr<DeviceManagementBackend> backend_;
- TokenService* token_service_; // weak
+ Profile* profile_; // weak
scoped_ptr<DeviceManagementPolicyCache> cache_;
scoped_refptr<DeviceTokenFetcher> token_fetcher_;
NotificationRegistrar registrar_;

Powered by Google App Engine
This is Rietveld 408576698