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

Side by Side Diff: chrome/browser/policy/cloud_policy_store.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_POLICY_CLOUD_POLICY_STORE_H_ 5 #ifndef CHROME_BROWSER_POLICY_CLOUD_POLICY_STORE_H_
6 #define CHROME_BROWSER_POLICY_CLOUD_POLICY_STORE_H_ 6 #define CHROME_BROWSER_POLICY_CLOUD_POLICY_STORE_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/observer_list.h" 10 #include "base/observer_list.h"
(...skipping 18 matching lines...) Expand all
29 // Loading policy from the underlying data store failed. 29 // Loading policy from the underlying data store failed.
30 STATUS_LOAD_ERROR, 30 STATUS_LOAD_ERROR,
31 // Failed to store policy to the data store. 31 // Failed to store policy to the data store.
32 STATUS_STORE_ERROR, 32 STATUS_STORE_ERROR,
33 // Failed to parse the policy read from the data store. 33 // Failed to parse the policy read from the data store.
34 STATUS_PARSE_ERROR, 34 STATUS_PARSE_ERROR,
35 // Failed to serialize policy for storage. 35 // Failed to serialize policy for storage.
36 STATUS_SERIALIZE_ERROR, 36 STATUS_SERIALIZE_ERROR,
37 // Validation error. 37 // Validation error.
38 STATUS_VALIDATION_ERROR, 38 STATUS_VALIDATION_ERROR,
39 // Store cannot accept policy (e.g. non-enterprise device).
40 STATUS_BAD_STATE,
39 }; 41 };
40 42
41 // Callbacks for policy store events. Most importantly, policy updates. 43 // Callbacks for policy store events. Most importantly, policy updates.
42 class Observer { 44 class Observer {
43 public: 45 public:
44 virtual ~Observer(); 46 virtual ~Observer();
45 47
46 // Called on changes to store->policy() and/or store->policy_map(). 48 // Called on changes to store->policy() and/or store->policy_map().
47 virtual void OnStoreLoaded(CloudPolicyStore* store) = 0; 49 virtual void OnStoreLoaded(CloudPolicyStore* store) = 0;
48 50
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 bool is_initialized_; 131 bool is_initialized_;
130 132
131 ObserverList<Observer, true> observers_; 133 ObserverList<Observer, true> observers_;
132 134
133 DISALLOW_COPY_AND_ASSIGN(CloudPolicyStore); 135 DISALLOW_COPY_AND_ASSIGN(CloudPolicyStore);
134 }; 136 };
135 137
136 } // namespace policy 138 } // namespace policy
137 139
138 #endif // CHROME_BROWSER_POLICY_CLOUD_POLICY_STORE_H_ 140 #endif // CHROME_BROWSER_POLICY_CLOUD_POLICY_STORE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698