| 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_OFFLINE_PAGE_MODEL_IMPL_H_ | 5 #ifndef COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_MODEL_IMPL_H_ |
| 6 #define COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_MODEL_IMPL_H_ | 6 #define COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_MODEL_IMPL_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 void GetOfflineIdsForClientId( | 89 void GetOfflineIdsForClientId( |
| 90 const ClientId& client_id, | 90 const ClientId& client_id, |
| 91 const MultipleOfflineIdCallback& callback) override; | 91 const MultipleOfflineIdCallback& callback) override; |
| 92 const std::vector<int64_t> MaybeGetOfflineIdsForClientId( | 92 const std::vector<int64_t> MaybeGetOfflineIdsForClientId( |
| 93 const ClientId& client_id) const override; | 93 const ClientId& client_id) const override; |
| 94 void GetPageByOfflineId( | 94 void GetPageByOfflineId( |
| 95 int64_t offline_id, | 95 int64_t offline_id, |
| 96 const SingleOfflinePageItemCallback& callback) override; | 96 const SingleOfflinePageItemCallback& callback) override; |
| 97 const OfflinePageItem* MaybeGetPageByOfflineId( | 97 const OfflinePageItem* MaybeGetPageByOfflineId( |
| 98 int64_t offline_id) const override; | 98 int64_t offline_id) const override; |
| 99 void GetPageByOfflineURL( | |
| 100 const GURL& offline_url, | |
| 101 const SingleOfflinePageItemCallback& callback) override; | |
| 102 const OfflinePageItem* MaybeGetPageByOfflineURL( | |
| 103 const GURL& offline_url) const override; | |
| 104 void GetPagesByOnlineURL( | 99 void GetPagesByOnlineURL( |
| 105 const GURL& online_url, | 100 const GURL& online_url, |
| 106 const MultipleOfflinePageItemCallback& callback) override; | 101 const MultipleOfflinePageItemCallback& callback) override; |
| 107 const OfflinePageItem* MaybeGetBestPageForOnlineURL( | 102 const OfflinePageItem* MaybeGetBestPageForOnlineURL( |
| 108 const GURL& online_url) const override; | 103 const GURL& online_url) const override; |
| 109 void CheckMetadataConsistency() override; | 104 void CheckMetadataConsistency() override; |
| 110 void ExpirePages(const std::vector<int64_t>& offline_ids, | 105 void ExpirePages(const std::vector<int64_t>& offline_ids, |
| 111 const base::Time& expiration_time, | 106 const base::Time& expiration_time, |
| 112 const base::Callback<void(bool)>& callback) override; | 107 const base::Callback<void(bool)>& callback) override; |
| 113 ClientPolicyController* GetPolicyController() override; | 108 ClientPolicyController* GetPolicyController() override; |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 void CheckPagesExistOfflineAfterLoadDone( | 140 void CheckPagesExistOfflineAfterLoadDone( |
| 146 const std::set<GURL>& urls, | 141 const std::set<GURL>& urls, |
| 147 const CheckPagesExistOfflineCallback& callback); | 142 const CheckPagesExistOfflineCallback& callback); |
| 148 void GetOfflineIdsForClientIdWhenLoadDone( | 143 void GetOfflineIdsForClientIdWhenLoadDone( |
| 149 const ClientId& client_id, | 144 const ClientId& client_id, |
| 150 const MultipleOfflineIdCallback& callback) const; | 145 const MultipleOfflineIdCallback& callback) const; |
| 151 void GetPageByOfflineIdWhenLoadDone( | 146 void GetPageByOfflineIdWhenLoadDone( |
| 152 int64_t offline_id, | 147 int64_t offline_id, |
| 153 const SingleOfflinePageItemCallback& callback) const; | 148 const SingleOfflinePageItemCallback& callback) const; |
| 154 void GetPagesByOnlineURLWhenLoadDone( | 149 void GetPagesByOnlineURLWhenLoadDone( |
| 155 const GURL& offline_url, | 150 const GURL& online_url, |
| 156 const MultipleOfflinePageItemCallback& callback) const; | 151 const MultipleOfflinePageItemCallback& callback) const; |
| 157 void GetPageByOfflineURLWhenLoadDone( | |
| 158 const GURL& offline_url, | |
| 159 const SingleOfflinePageItemCallback& callback) const; | |
| 160 void MarkPageAccessedWhenLoadDone(int64_t offline_id); | 152 void MarkPageAccessedWhenLoadDone(int64_t offline_id); |
| 161 void CheckMetadataConsistencyWhenLoadDone(); | 153 void CheckMetadataConsistencyWhenLoadDone(); |
| 162 | 154 |
| 163 // Callback for checking whether we have offline pages. | 155 // Callback for checking whether we have offline pages. |
| 164 void HasPagesAfterLoadDone(const std::string& name_space, | 156 void HasPagesAfterLoadDone(const std::string& name_space, |
| 165 const HasPagesCallback& callback) const; | 157 const HasPagesCallback& callback) const; |
| 166 | 158 |
| 167 // Callback for loading pages from the offline page metadata store. | 159 // Callback for loading pages from the offline page metadata store. |
| 168 void OnLoadDone(const base::TimeTicks& start_time, | 160 void OnLoadDone(const base::TimeTicks& start_time, |
| 169 OfflinePageMetadataStore::LoadStatus load_status, | 161 OfflinePageMetadataStore::LoadStatus load_status, |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 301 OfflinePageModelEventLogger offline_event_logger_; | 293 OfflinePageModelEventLogger offline_event_logger_; |
| 302 | 294 |
| 303 base::WeakPtrFactory<OfflinePageModelImpl> weak_ptr_factory_; | 295 base::WeakPtrFactory<OfflinePageModelImpl> weak_ptr_factory_; |
| 304 | 296 |
| 305 DISALLOW_COPY_AND_ASSIGN(OfflinePageModelImpl); | 297 DISALLOW_COPY_AND_ASSIGN(OfflinePageModelImpl); |
| 306 }; | 298 }; |
| 307 | 299 |
| 308 } // namespace offline_pages | 300 } // namespace offline_pages |
| 309 | 301 |
| 310 #endif // COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_MODEL_IMPL_H_ | 302 #endif // COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_MODEL_IMPL_H_ |
| OLD | NEW |