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

Side by Side Diff: chrome/browser/extensions/api/storage/managed_value_store_cache.h

Issue 2441653003: Enable fetching of admin policies for login screen apps (Closed)
Patch Set: Created 4 years, 2 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
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_EXTENSIONS_API_STORAGE_MANAGED_VALUE_STORE_CACHE_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_STORAGE_MANAGED_VALUE_STORE_CACHE_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_STORAGE_MANAGED_VALUE_STORE_CACHE_H_ 6 #define CHROME_BROWSER_EXTENSIONS_API_STORAGE_MANAGED_VALUE_STORE_CACHE_H_
7 7
8 #include <map> 8 #include <map>
9 #include <memory> 9 #include <memory>
10 #include <string> 10 #include <string>
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 const StorageCallback& callback, 62 const StorageCallback& callback,
63 scoped_refptr<const Extension> extension) override; 63 scoped_refptr<const Extension> extension) override;
64 void DeleteStorageSoon(const std::string& extension_id) override; 64 void DeleteStorageSoon(const std::string& extension_id) override;
65 65
66 // PolicyService::Observer implementation: 66 // PolicyService::Observer implementation:
67 void OnPolicyServiceInitialized(policy::PolicyDomain domain) override; 67 void OnPolicyServiceInitialized(policy::PolicyDomain domain) override;
68 void OnPolicyUpdated(const policy::PolicyNamespace& ns, 68 void OnPolicyUpdated(const policy::PolicyNamespace& ns,
69 const policy::PolicyMap& previous, 69 const policy::PolicyMap& previous,
70 const policy::PolicyMap& current) override; 70 const policy::PolicyMap& current) override;
71 71
72 // Returns the policy domain that should be used for the specified profile.
73 static policy::PolicyDomain GetPolicyDomain(Profile* profile);
74
72 // Posted by OnPolicyUpdated() to update a PolicyValueStore on the FILE 75 // Posted by OnPolicyUpdated() to update a PolicyValueStore on the FILE
73 // thread. 76 // thread.
74 void UpdatePolicyOnFILE(const std::string& extension_id, 77 void UpdatePolicyOnFILE(const std::string& extension_id,
75 std::unique_ptr<policy::PolicyMap> current_policy); 78 std::unique_ptr<policy::PolicyMap> current_policy);
76 79
77 // Returns an existing PolicyValueStore for |extension_id|, or NULL. 80 // Returns an existing PolicyValueStore for |extension_id|, or NULL.
78 PolicyValueStore* GetStoreFor(const std::string& extension_id); 81 PolicyValueStore* GetStoreFor(const std::string& extension_id);
79 82
80 // Returns true if a backing store has been created for |extension_id|. 83 // Returns true if a backing store has been created for |extension_id|.
81 bool HasStore(const std::string& extension_id) const; 84 bool HasStore(const std::string& extension_id) const;
(...skipping 20 matching lines...) Expand all
102 // All the PolicyValueStores live on the FILE thread, and |store_map_| can be 105 // All the PolicyValueStores live on the FILE thread, and |store_map_| can be
103 // accessed only on the FILE thread as well. 106 // accessed only on the FILE thread as well.
104 PolicyValueStoreMap store_map_; 107 PolicyValueStoreMap store_map_;
105 108
106 DISALLOW_COPY_AND_ASSIGN(ManagedValueStoreCache); 109 DISALLOW_COPY_AND_ASSIGN(ManagedValueStoreCache);
107 }; 110 };
108 111
109 } // namespace extensions 112 } // namespace extensions
110 113
111 #endif // CHROME_BROWSER_EXTENSIONS_API_STORAGE_MANAGED_VALUE_STORE_CACHE_H_ 114 #endif // CHROME_BROWSER_EXTENSIONS_API_STORAGE_MANAGED_VALUE_STORE_CACHE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698