Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 17 matching lines...) Expand all Loading... | |
| 28 static const OfflinePageClientPolicy MakePolicy( | 28 static const OfflinePageClientPolicy MakePolicy( |
| 29 const std::string& name_space, | 29 const std::string& name_space, |
| 30 LifetimePolicy::LifetimeType lifetime_type, | 30 LifetimePolicy::LifetimeType lifetime_type, |
| 31 const base::TimeDelta& expiration_period, | 31 const base::TimeDelta& expiration_period, |
| 32 size_t page_limit, | 32 size_t page_limit, |
| 33 size_t pages_allowed_per_url); | 33 size_t pages_allowed_per_url); |
| 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 // Returns a list of all namespaces that are not in the list of exceptions. | |
| 39 std::vector<std::string> GetAllNamespacesExcept( | |
|
Dmitry Titov
2016/10/20 19:40:53
It's a weird method to have here... Why not "GetAl
dewittj
2016/10/21 17:49:46
Can do.
| |
| 40 const std::vector<std::string>& exceptions) const; | |
| 41 | |
| 38 // Returns whether pages for |name_space| should be removed on cache reset. | 42 // Returns whether pages for |name_space| should be removed on cache reset. |
| 39 bool IsRemovedOnCacheReset(const std::string& name_space) const; | 43 bool IsRemovedOnCacheReset(const std::string& name_space) const; |
| 40 | 44 |
| 41 // Returns whether pages for |name_space| are shown in Download UI. | 45 // Returns whether pages for |name_space| are shown in Download UI. |
| 42 bool IsSupportedByDownload(const std::string& name_space) const; | 46 bool IsSupportedByDownload(const std::string& name_space) const; |
| 43 const std::vector<std::string>& GetNamespacesSupportedByDownload() const; | 47 const std::vector<std::string>& GetNamespacesSupportedByDownload() const; |
| 44 | 48 |
| 45 // Returns whether pages for |name_space| are shown in recent tabs UI, | 49 // Returns whether pages for |name_space| are shown in recent tabs UI, |
| 46 // currently only available on NTP. | 50 // currently only available on NTP. |
| 47 bool IsShownAsRecentlyVisitedSite(const std::string& name_space) const; | 51 bool IsShownAsRecentlyVisitedSite(const std::string& name_space) const; |
| (...skipping 14 matching lines...) Expand all Loading... | |
| 62 mutable std::unique_ptr<std::vector<std::string>> download_namespace_cache_; | 66 mutable std::unique_ptr<std::vector<std::string>> download_namespace_cache_; |
| 63 mutable std::unique_ptr<std::vector<std::string>> recent_tab_namespace_cache_; | 67 mutable std::unique_ptr<std::vector<std::string>> recent_tab_namespace_cache_; |
| 64 mutable std::unique_ptr<std::vector<std::string>> show_in_original_tab_cache_; | 68 mutable std::unique_ptr<std::vector<std::string>> show_in_original_tab_cache_; |
| 65 | 69 |
| 66 DISALLOW_COPY_AND_ASSIGN(ClientPolicyController); | 70 DISALLOW_COPY_AND_ASSIGN(ClientPolicyController); |
| 67 }; | 71 }; |
| 68 | 72 |
| 69 } // namespace offline_pages | 73 } // namespace offline_pages |
| 70 | 74 |
| 71 #endif // COMPONENTS_OFFLINE_PAGES_CLIENT_POLICY_CONTROLLER_H_ | 75 #endif // COMPONENTS_OFFLINE_PAGES_CLIENT_POLICY_CONTROLLER_H_ |
| OLD | NEW |