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

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

Issue 11444029: Added UserPolicySigninService::FetchPolicyForSignedInUser(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review feedback Created 8 years 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
« no previous file with comments | « chrome/browser/policy/cloud_policy_manager.cc ('k') | chrome/browser/policy/cloud_policy_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/policy/cloud_policy_service.h
diff --git a/chrome/browser/policy/cloud_policy_service.h b/chrome/browser/policy/cloud_policy_service.h
index 52ebe00be11dc9fdaaf0385ae7b57b7cb15af20a..86d22f1f69799ec86192369dfcb552041ab8ec7d 100644
--- a/chrome/browser/policy/cloud_policy_service.h
+++ b/chrome/browser/policy/cloud_policy_service.h
@@ -24,6 +24,10 @@ namespace policy {
class CloudPolicyService : public CloudPolicyClient::Observer,
public CloudPolicyStore::Observer {
public:
+ // Callback invoked once the policy refresh attempt has completed. Passed
+ // bool parameter is true if the refresh was successful (no error).
+ typedef base::Callback<void(bool)> RefreshPolicyCallback;
+
class Observer {
public:
// Invoked when CloudPolicyService has finished initializing (any initial
@@ -43,7 +47,7 @@ class CloudPolicyService : public CloudPolicyClient::Observer,
// Refreshes policy. |callback| will be invoked after the operation completes
// or aborts because of errors.
- void RefreshPolicy(const base::Closure& callback);
+ void RefreshPolicy(const RefreshPolicyCallback& callback);
// Adds/Removes an Observer for this object.
void AddObserver(Observer* observer);
@@ -65,8 +69,9 @@ class CloudPolicyService : public CloudPolicyClient::Observer,
// which is responsible for notifying observers.
void CheckInitializationCompleted();
- // Invokes the refresh callbacks and clears refresh state.
- void RefreshCompleted();
+ // Invokes the refresh callbacks and clears refresh state. The |success| flag
+ // is passed through to the refresh callbacks.
+ void RefreshCompleted(bool success);
// The client used to talk to the cloud.
CloudPolicyClient* client_;
@@ -85,7 +90,7 @@ class CloudPolicyService : public CloudPolicyClient::Observer,
} refresh_state_;
// Callbacks to invoke upon policy refresh.
- std::vector<base::Closure> refresh_callbacks_;
+ std::vector<RefreshPolicyCallback> refresh_callbacks_;
// Set to true once the service is initialized (initial policy load/refresh
// is complete).
« no previous file with comments | « chrome/browser/policy/cloud_policy_manager.cc ('k') | chrome/browser/policy/cloud_policy_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698