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

Side by Side Diff: components/offline_pages/client_policy_controller.h

Issue 2006923005: [Offline Pages] Two-step expiration in storage manager. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more comments, commit ready. Created 4 years, 6 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
« no previous file with comments | « no previous file | components/offline_pages/client_policy_controller.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 COMPONENTS_OFFLINE_PAGES_CLIENT_POLICY_CONTROLLER_H_ 5 #ifndef COMPONENTS_OFFLINE_PAGES_CLIENT_POLICY_CONTROLLER_H_
6 #define COMPONENTS_OFFLINE_PAGES_CLIENT_POLICY_CONTROLLER_H_ 6 #define COMPONENTS_OFFLINE_PAGES_CLIENT_POLICY_CONTROLLER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 12 matching lines...) Expand all
23 class ClientPolicyController { 23 class ClientPolicyController {
24 public: 24 public:
25 ClientPolicyController(); 25 ClientPolicyController();
26 ~ClientPolicyController(); 26 ~ClientPolicyController();
27 27
28 // Generates a client policy from the input values. 28 // Generates a client policy from the input values.
29 static const OfflinePageClientPolicy MakePolicy( 29 static const OfflinePageClientPolicy MakePolicy(
30 const std::string& name_space, 30 const std::string& name_space,
31 LifetimePolicy::LifetimeType lifetime_type, 31 LifetimePolicy::LifetimeType lifetime_type,
32 const base::TimeDelta& expiration_period, 32 const base::TimeDelta& expiration_period,
33 int page_limit); 33 size_t page_limit);
34 34
35 // Get the client policy for |name_space|. 35 // Get the client policy for |name_space|.
36 const OfflinePageClientPolicy& GetPolicy(const std::string& name_space) const; 36 const OfflinePageClientPolicy& GetPolicy(const std::string& name_space) const;
37 37
38 private: 38 private:
39 // The map from name_space to a client policy. Will be generated 39 // The map from name_space to a client policy. Will be generated
40 // as pre-defined values for now. 40 // as pre-defined values for now.
41 std::map<std::string, OfflinePageClientPolicy> policies_; 41 std::map<std::string, OfflinePageClientPolicy> policies_;
42 42
43 DISALLOW_COPY_AND_ASSIGN(ClientPolicyController); 43 DISALLOW_COPY_AND_ASSIGN(ClientPolicyController);
44 }; 44 };
45 45
46 } // namespace offline_pages 46 } // namespace offline_pages
47 47
48 #endif // COMPONENTS_OFFLINE_PAGES_CLIENT_POLICY_CONTROLLER_H_ 48 #endif // COMPONENTS_OFFLINE_PAGES_CLIENT_POLICY_CONTROLLER_H_
OLDNEW
« no previous file with comments | « no previous file | components/offline_pages/client_policy_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698