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

Side by Side Diff: chrome/browser/chromeos/settings/session_manager_operation.h

Issue 10885015: Implement new-style CloudPolicyStore for Chrome OS device policy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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 unified diff | Download patch | Annotate | Revision Log
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_SETTINGS_SESSION_MANAGER_OPERATION_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_SETTINGS_SESSION_MANAGER_OPERATION_H_
6 #define CHROME_BROWSER_CHROMEOS_SETTINGS_SESSION_MANAGER_OPERATION_H_ 6 #define CHROME_BROWSER_CHROMEOS_SETTINGS_SESSION_MANAGER_OPERATION_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 132
133 private: 133 private:
134 DISALLOW_COPY_AND_ASSIGN(LoadSettingsOperation); 134 DISALLOW_COPY_AND_ASSIGN(LoadSettingsOperation);
135 }; 135 };
136 136
137 // Stores a pre-generated policy blob and reloads the device settings from 137 // Stores a pre-generated policy blob and reloads the device settings from
138 // session_manager. 138 // session_manager.
139 class StoreSettingsOperation : public SessionManagerOperation { 139 class StoreSettingsOperation : public SessionManagerOperation {
140 public: 140 public:
141 // Creates a new store operation. 141 // Creates a new store operation.
142 StoreSettingsOperation(const Callback& callback, 142 StoreSettingsOperation(
143 const std::string& policy_blob); 143 const Callback& callback,
144 scoped_ptr<enterprise_management::PolicyFetchResponse> policy);
Joao da Silva 2012/08/28 19:56:57 PolicyFetchResponse needs a forward declaration
Mattias Nissler (ping if slow) 2012/08/31 14:13:18 Done.
144 virtual ~StoreSettingsOperation(); 145 virtual ~StoreSettingsOperation();
145 146
146 protected: 147 protected:
147 // SessionManagerOperation: 148 // SessionManagerOperation:
148 virtual void Run() OVERRIDE; 149 virtual void Run() OVERRIDE;
149 150
150 private: 151 private:
151 // Handles the result of the store operation and triggers the load. 152 // Handles the result of the store operation and triggers the load.
152 void HandleStoreResult(bool success); 153 void HandleStoreResult(bool success);
153 154
154 std::string policy_blob_; 155 scoped_ptr<enterprise_management::PolicyFetchResponse> policy_;
155 156
156 base::WeakPtrFactory<StoreSettingsOperation> weak_factory_; 157 base::WeakPtrFactory<StoreSettingsOperation> weak_factory_;
157 158
158 DISALLOW_COPY_AND_ASSIGN(StoreSettingsOperation); 159 DISALLOW_COPY_AND_ASSIGN(StoreSettingsOperation);
159 }; 160 };
160 161
161 // Signs device settings and stores the resulting blob to session_manager. 162 // Signs device settings and stores the resulting blob to session_manager.
162 class SignAndStoreSettingsOperation : public SessionManagerOperation { 163 class SignAndStoreSettingsOperation : public SessionManagerOperation {
163 public: 164 public:
164 // Creates a new sign-and-store operation. 165 // Creates a new sign-and-store operation.
(...skipping 26 matching lines...) Expand all
191 std::string username_; 192 std::string username_;
192 193
193 base::WeakPtrFactory<SignAndStoreSettingsOperation> weak_factory_; 194 base::WeakPtrFactory<SignAndStoreSettingsOperation> weak_factory_;
194 195
195 DISALLOW_COPY_AND_ASSIGN(SignAndStoreSettingsOperation); 196 DISALLOW_COPY_AND_ASSIGN(SignAndStoreSettingsOperation);
196 }; 197 };
197 198
198 } // namespace 199 } // namespace
199 200
200 #endif // CHROME_BROWSER_CHROMEOS_SETTINGS_SESSION_MANAGER_OPERATION_H_ 201 #endif // CHROME_BROWSER_CHROMEOS_SETTINGS_SESSION_MANAGER_OPERATION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698