Chromium Code Reviews

Side by Side Diff: chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos.h

Issue 19733003: Implement cloud policy invalidations using the invalidation service framework. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff |
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_CHROMEOS_POLICY_USER_CLOUD_POLICY_MANAGER_CHROMEOS_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_POLICY_USER_CLOUD_POLICY_MANAGER_CHROMEOS_H_
6 #define CHROME_BROWSER_CHROMEOS_POLICY_USER_CLOUD_POLICY_MANAGER_CHROMEOS_H_ 6 #define CHROME_BROWSER_CHROMEOS_POLICY_USER_CLOUD_POLICY_MANAGER_CHROMEOS_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 89 matching lines...)
100 // Completion handler for the explicit policy fetch triggered on startup in 100 // Completion handler for the explicit policy fetch triggered on startup in
101 // case |wait_for_policy_fetch_| is true. |success| is true if the fetch was 101 // case |wait_for_policy_fetch_| is true. |success| is true if the fetch was
102 // successful. 102 // successful.
103 void OnInitialPolicyFetchComplete(bool success); 103 void OnInitialPolicyFetchComplete(bool success);
104 104
105 // Cancels waiting for the policy fetch and flags the 105 // Cancels waiting for the policy fetch and flags the
106 // ConfigurationPolicyProvider ready (assuming all other initialization tasks 106 // ConfigurationPolicyProvider ready (assuming all other initialization tasks
107 // have completed). 107 // have completed).
108 void CancelWaitForPolicyFetch(); 108 void CancelWaitForPolicyFetch();
109 109
110 void StartRefreshScheduler(); 110 void StartRefreshSchedulerIfReady();
111 111
112 // Owns the store, note that CloudPolicyManager just keeps a plain pointer. 112 // Owns the store, note that CloudPolicyManager just keeps a plain pointer.
113 scoped_ptr<CloudPolicyStore> store_; 113 scoped_ptr<CloudPolicyStore> store_;
114 114
115 // Handles fetching and storing cloud policy for components. It uses the 115 // Handles fetching and storing cloud policy for components. It uses the
116 // |store_|, so destroy it first. 116 // |store_|, so destroy it first.
117 scoped_ptr<ComponentCloudPolicyService> component_policy_service_; 117 scoped_ptr<ComponentCloudPolicyService> component_policy_service_;
118 118
119 // Whether to wait for a policy fetch to complete before reporting 119 // Whether to wait for a policy fetch to complete before reporting
120 // IsInitializationComplete(). 120 // IsInitializationComplete().
121 bool wait_for_policy_fetch_; 121 bool wait_for_policy_fetch_;
122 122
123 // The pref service to pass to the refresh scheduler on initialization. 123 // The pref service to pass to the refresh scheduler on initialization.
124 PrefService* local_state_; 124 PrefService* local_state_;
125 125
126 // Used to fetch the policy OAuth token, when necessary. This object holds 126 // Used to fetch the policy OAuth token, when necessary. This object holds
127 // a callback with an unretained reference to the manager, when it exists. 127 // a callback with an unretained reference to the manager, when it exists.
128 scoped_ptr<PolicyOAuth2TokenFetcher> token_fetcher_; 128 scoped_ptr<PolicyOAuth2TokenFetcher> token_fetcher_;
129 129
130 // The OAuth2 login tokens fetched by the |token_fetcher_|, which can be 130 // The OAuth2 login tokens fetched by the |token_fetcher_|, which can be
131 // retrieved using oauth2_tokens(). 131 // retrieved using oauth2_tokens().
132 GaiaAuthConsumer::ClientOAuthResult oauth2_login_tokens_; 132 GaiaAuthConsumer::ClientOAuthResult oauth2_login_tokens_;
133 133
134 DISALLOW_COPY_AND_ASSIGN(UserCloudPolicyManagerChromeOS); 134 DISALLOW_COPY_AND_ASSIGN(UserCloudPolicyManagerChromeOS);
135 }; 135 };
136 136
137 } // namespace policy 137 } // namespace policy
138 138
139 #endif // CHROME_BROWSER_CHROMEOS_POLICY_USER_CLOUD_POLICY_MANAGER_CHROMEOS_H_ 139 #endif // CHROME_BROWSER_CHROMEOS_POLICY_USER_CLOUD_POLICY_MANAGER_CHROMEOS_H_
OLDNEW

Powered by Google App Engine