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

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

Issue 7298012: Consolidate data storage and notifications in the cloud policy subsystem (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: " Created 9 years, 5 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: chrome/browser/policy/cloud_policy_controller.h
diff --git a/chrome/browser/policy/cloud_policy_controller.h b/chrome/browser/policy/cloud_policy_controller.h
index 5b2018f2977343974847500a03e2ab1a4ce10729..be6161a0c552ab384299195e5a8e6348048c43e9 100644
--- a/chrome/browser/policy/cloud_policy_controller.h
+++ b/chrome/browser/policy/cloud_policy_controller.h
@@ -13,7 +13,7 @@
#include "base/observer_list.h"
#include "base/task.h"
Joao da Silva 2011/07/06 16:45:14 Nit: task.h and observer_list.h not used
gfeher 2011/07/07 13:51:00 Done.
#include "base/time.h"
Joao da Silva 2011/07/06 16:45:14 Nit: time.h only needed on .cc file
gfeher 2011/07/07 13:51:00 Done.
Joao da Silva 2011/07/07 16:54:16 Hmm it seems it's still in the .h, is it required
gfeher 2011/07/08 09:19:14 Sorry. Done.
-#include "chrome/browser/policy/cloud_policy_identity_strategy.h"
+#include "chrome/browser/policy/cloud_policy_data.h"
#include "chrome/browser/policy/configuration_policy_provider.h"
#include "chrome/browser/policy/delayed_work_scheduler.h"
#include "chrome/browser/policy/device_management_backend.h"
@@ -24,6 +24,7 @@ class TokenService;
namespace policy {
+class CloudPolicyData;
pastarmovj 2011/07/06 12:11:57 Why do you both include the header and forward dec
gfeher 2011/07/06 15:14:20 Done.
class CloudPolicyCacheBase;
class DeviceManagementBackend;
pastarmovj 2011/07/06 12:11:57 Ditto. Pick one.
gfeher 2011/07/06 15:14:20 Done.
@@ -32,14 +33,13 @@ class DeviceManagementBackend;
// listens to their callbacks/notifications.
class CloudPolicyController
: public DeviceManagementBackend::DevicePolicyResponseDelegate,
- public DeviceTokenFetcher::Observer,
- public CloudPolicyIdentityStrategy::Observer {
+ public CloudPolicyData::Observer {
public:
// All parameters are weak pointers.
CloudPolicyController(DeviceManagementService* service,
CloudPolicyCacheBase* cache,
DeviceTokenFetcher* token_fetcher,
- CloudPolicyIdentityStrategy* identity_strategy,
+ CloudPolicyData* data,
PolicyNotifier* notifier);
virtual ~CloudPolicyController();
@@ -58,12 +58,10 @@ class CloudPolicyController
const em::DevicePolicyResponse& response);
virtual void OnError(DeviceManagementBackend::ErrorCode code);
Joao da Silva 2011/07/06 16:45:14 Nit: OVERRIDE on these 2 methods
gfeher 2011/07/07 13:51:00 Done.
- // DeviceTokenFetcher::Observer implementation:
- virtual void OnDeviceTokenAvailable();
-
- // CloudPolicyIdentityStrategy::Observer implementation:
+ // CloudPolicyData::Observer implementation:
virtual void OnDeviceTokenChanged();
virtual void OnCredentialsChanged();
+ virtual void OnPolicyDataGoingAway();
Joao da Silva 2011/07/06 16:45:14 Nit: OVERRIDE on these 3 methods
gfeher 2011/07/07 13:51:00 Done.
private:
// Indicates the current state the controller is in.
@@ -92,7 +90,7 @@ class CloudPolicyController
CloudPolicyController(DeviceManagementService* service,
CloudPolicyCacheBase* cache,
DeviceTokenFetcher* token_fetcher,
- CloudPolicyIdentityStrategy* identity_strategy,
+ CloudPolicyData* data,
PolicyNotifier* notifier,
DelayedWorkScheduler* scheduler);
@@ -100,7 +98,7 @@ class CloudPolicyController
void Initialize(DeviceManagementService* service,
CloudPolicyCacheBase* cache,
DeviceTokenFetcher* token_fetcher,
- CloudPolicyIdentityStrategy* identity_strategy,
+ CloudPolicyData* data,
PolicyNotifier* notifier,
DelayedWorkScheduler* scheduler);
@@ -124,7 +122,7 @@ class CloudPolicyController
DeviceManagementService* service_;
CloudPolicyCacheBase* cache_;
- CloudPolicyIdentityStrategy* identity_strategy_;
+ CloudPolicyData* data_;
DeviceTokenFetcher* token_fetcher_;
scoped_ptr<DeviceManagementBackend> backend_;
ControllerState state_;

Powered by Google App Engine
This is Rietveld 408576698