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

Side by Side Diff: chrome/browser/policy/cloud/resource_cache.h

Issue 72793003: ComponentCloudPolicyService tracks the signin state. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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_RESOURCE_CACHE_H_ 5 #ifndef CHROME_BROWSER_POLICY_CLOUD_RESOURCE_CACHE_H_
6 #define CHROME_BROWSER_POLICY_CLOUD_RESOURCE_CACHE_H_ 6 #define CHROME_BROWSER_POLICY_CLOUD_RESOURCE_CACHE_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 const std::string& subkey, 45 const std::string& subkey,
46 std::string* data); 46 std::string* data);
47 47
48 // Loads all the subkeys of |key| into |contents|. 48 // Loads all the subkeys of |key| into |contents|.
49 void LoadAllSubkeys(const std::string& key, 49 void LoadAllSubkeys(const std::string& key,
50 std::map<std::string, std::string>* contents); 50 std::map<std::string, std::string>* contents);
51 51
52 // Deletes (key, subkey). 52 // Deletes (key, subkey).
53 void Delete(const std::string& key, const std::string& subkey); 53 void Delete(const std::string& key, const std::string& subkey);
54 54
55 // Deletes all the subkeys of |key|.
56 void Clear(const std::string& key);
57
55 // Deletes the subkeys of |key| for which the |filter| returns true. 58 // Deletes the subkeys of |key| for which the |filter| returns true.
56 typedef base::Callback<bool(const std::string&)> SubkeyFilter; 59 typedef base::Callback<bool(const std::string&)> SubkeyFilter;
57 void FilterSubkeys(const std::string& key, const SubkeyFilter& filter); 60 void FilterSubkeys(const std::string& key, const SubkeyFilter& filter);
58 61
59 // Deletes all keys not in |keys_to_keep|, along with their subkeys. 62 // Deletes all keys not in |keys_to_keep|, along with their subkeys.
60 void PurgeOtherKeys(const std::set<std::string>& keys_to_keep); 63 void PurgeOtherKeys(const std::set<std::string>& keys_to_keep);
61 64
62 // Deletes all the subkeys of |key| not in |subkeys_to_keep|. 65 // Deletes all the subkeys of |key| not in |subkeys_to_keep|.
63 void PurgeOtherSubkeys(const std::string& key, 66 void PurgeOtherSubkeys(const std::string& key,
64 const std::set<std::string>& subkeys_to_keep); 67 const std::set<std::string>& subkeys_to_keep);
(...skipping 19 matching lines...) Expand all
84 87
85 // Task runner that |this| runs on. 88 // Task runner that |this| runs on.
86 scoped_refptr<base::SequencedTaskRunner> task_runner_; 89 scoped_refptr<base::SequencedTaskRunner> task_runner_;
87 90
88 DISALLOW_COPY_AND_ASSIGN(ResourceCache); 91 DISALLOW_COPY_AND_ASSIGN(ResourceCache);
89 }; 92 };
90 93
91 } // namespace policy 94 } // namespace policy
92 95
93 #endif // CHROME_BROWSER_POLICY_CLOUD_RESOURCE_CACHE_H_ 96 #endif // CHROME_BROWSER_POLICY_CLOUD_RESOURCE_CACHE_H_
OLDNEW
« no previous file with comments | « chrome/browser/policy/cloud/component_cloud_policy_store.cc ('k') | chrome/browser/policy/cloud/resource_cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698