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

Unified Diff: components/offline_pages/client_policy_controller.h

Issue 2415473003: Query API: Introduces an OfflinePageModelQuery object. (Closed)
Patch Set: Address comments, add more tests, rename enum. 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 side-by-side diff with in-line comments
Download patch
Index: components/offline_pages/client_policy_controller.h
diff --git a/components/offline_pages/client_policy_controller.h b/components/offline_pages/client_policy_controller.h
index 2d89cc923d5a36555eaba0c2f1108abcbee19e2b..a7b068fee4e173bd9c88f59efb2a06b42c592610 100644
--- a/components/offline_pages/client_policy_controller.h
+++ b/components/offline_pages/client_policy_controller.h
@@ -35,6 +35,9 @@ class ClientPolicyController {
// Get the client policy for |name_space|.
const OfflinePageClientPolicy& GetPolicy(const std::string& name_space) const;
+ // Returns a list of all known namespaces.
+ std::vector<std::string> GetAllNamespaces() const;
+
// Returns whether pages for |name_space| should be removed on cache reset.
bool IsRemovedOnCacheReset(const std::string& name_space) const;
@@ -53,6 +56,9 @@ class ClientPolicyController {
bool IsRestrictedToOriginalTab(const std::string& name_space) const;
const std::vector<std::string>& GetNamespacesRestrictedToOriginalTab() const;
+ void AddPolicyForTest(std::string name_space,
fgorski 2016/10/26 18:05:41 why not const ref ?
dewittj 2016/10/27 22:49:17 Done. In my experience, strings were not required
+ const OfflinePageClientPolicyBuilder& builder);
+
private:
// The map from name_space to a client policy. Will be generated
// as pre-defined values for now.

Powered by Google App Engine
This is Rietveld 408576698