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

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: Rebase Created 4 years, 1 month 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 const StorageCallback& callback, 57 const StorageCallback& callback,
58 scoped_refptr<const Extension> extension) override; 58 scoped_refptr<const Extension> extension) override;
59 void DeleteStorageSoon(const std::string& extension_id) override; 59 void DeleteStorageSoon(const std::string& extension_id) override;
60 60
61 // PolicyService::Observer implementation: 61 // PolicyService::Observer implementation:
62 void OnPolicyServiceInitialized(policy::PolicyDomain domain) override; 62 void OnPolicyServiceInitialized(policy::PolicyDomain domain) override;
63 void OnPolicyUpdated(const policy::PolicyNamespace& ns, 63 void OnPolicyUpdated(const policy::PolicyNamespace& ns,
64 const policy::PolicyMap& previous, 64 const policy::PolicyMap& previous,
65 const policy::PolicyMap& current) override; 65 const policy::PolicyMap& current) override;
66 66
67 // Returns the policy domain that should be used for the specified profile.
68 static policy::PolicyDomain GetPolicyDomain(Profile* profile);
69
67 // Posted by OnPolicyUpdated() to update a PolicyValueStore on the FILE 70 // Posted by OnPolicyUpdated() to update a PolicyValueStore on the FILE
68 // thread. 71 // thread.
69 void UpdatePolicyOnFILE(const std::string& extension_id, 72 void UpdatePolicyOnFILE(const std::string& extension_id,
70 std::unique_ptr<policy::PolicyMap> current_policy); 73 std::unique_ptr<policy::PolicyMap> current_policy);
71 74
72 // Returns an existing PolicyValueStore for |extension_id|, or NULL. 75 // Returns an existing PolicyValueStore for |extension_id|, or NULL.
73 PolicyValueStore* GetStoreFor(const std::string& extension_id); 76 PolicyValueStore* GetStoreFor(const std::string& extension_id);
74 77
75 // Returns true if a backing store has been created for |extension_id|. 78 // Returns true if a backing store has been created for |extension_id|.
76 bool HasStore(const std::string& extension_id) const; 79 bool HasStore(const std::string& extension_id) const;
(...skipping 20 matching lines...) Expand all
97 // All the PolicyValueStores live on the FILE thread, and |store_map_| can be 100 // All the PolicyValueStores live on the FILE thread, and |store_map_| can be
98 // accessed only on the FILE thread as well. 101 // accessed only on the FILE thread as well.
99 std::map<std::string, std::unique_ptr<PolicyValueStore>> store_map_; 102 std::map<std::string, std::unique_ptr<PolicyValueStore>> store_map_;
100 103
101 DISALLOW_COPY_AND_ASSIGN(ManagedValueStoreCache); 104 DISALLOW_COPY_AND_ASSIGN(ManagedValueStoreCache);
102 }; 105 };
103 106
104 } // namespace extensions 107 } // namespace extensions
105 108
106 #endif // CHROME_BROWSER_EXTENSIONS_API_STORAGE_MANAGED_VALUE_STORE_CACHE_H_ 109 #endif // CHROME_BROWSER_EXTENSIONS_API_STORAGE_MANAGED_VALUE_STORE_CACHE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698