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

Unified Diff: components/offline_pages/client_policies.h

Issue 1934743003: Implementing client policy and controller. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments. Created 4 years, 8 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_policies.h
diff --git a/components/offline_pages/client_policies.h b/components/offline_pages/client_policies.h
new file mode 100644
index 0000000000000000000000000000000000000000..cc95b93c88042ab72d16b42f7866e309bad3c451
--- /dev/null
+++ b/components/offline_pages/client_policies.h
@@ -0,0 +1,26 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#undef kUnlimitedPages
+#define kUnlimitedPages 0
+
+/**
+ * This macro is used to define client policies.
+ * For some details please see offline_page_client_policy.h
+ *
+ * Use Example:
+ * POLICY(name_space, // The name_space of this policy.
+ * type, // TEMPORARY/PERSISTENT, defined in LifetimePolicy
+ * expire_days, // Number of days before expire of pages, in days.
+ * page_limit, // As defined in client policy. Use kUnlimitedPages
+ * // for unlimited number.
+ */
+
+#undef CLIENT_POLICIES
+#define CLIENT_POLICIES \
fgorski 2016/05/02 23:10:31 no let's have a static method instead of a macro f
romax 2016/05/03 00:29:24 Done.
+ POLICY(bookmark, TEMPORARY, 7, kUnlimitedPages) \
+ POLICY(last_n, TEMPORARY, 2, 20) \
+ POLICY(defaultPolicy, TEMPORARY, 1, kUnlimitedPages)
+
+#undef kUnlimitedPages

Powered by Google App Engine
This is Rietveld 408576698