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

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

Issue 2536573003: [Offline pages] Preventing GetPagesMatchingQuery from running before model is loaded (Closed)
Patch Set: Adding a test for public method GetPagesMatchingQuery Created 4 years 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
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_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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 OfflinePageModelImpl(); 122 OfflinePageModelImpl();
123 123
124 private: 124 private:
125 FRIEND_TEST_ALL_PREFIXES(OfflinePageModelImplTest, MarkPageForDeletion); 125 FRIEND_TEST_ALL_PREFIXES(OfflinePageModelImplTest, MarkPageForDeletion);
126 126
127 typedef ScopedVector<OfflinePageArchiver> PendingArchivers; 127 typedef ScopedVector<OfflinePageArchiver> PendingArchivers;
128 128
129 // Callback for ensuring archive directory is created. 129 // Callback for ensuring archive directory is created.
130 void OnEnsureArchivesDirCreatedDone(const base::TimeTicks& start_time); 130 void OnEnsureArchivesDirCreatedDone(const base::TimeTicks& start_time);
131 131
132 void CheckPagesExistOfflineAfterLoadDone( 132 void GetPagesMatchingQueryWhenLoadDone(
133 const std::set<GURL>& urls, 133 std::unique_ptr<OfflinePageModelQuery> query,
134 const CheckPagesExistOfflineCallback& callback); 134 const MultipleOfflinePageItemCallback& callback);
135 void GetOfflineIdsForClientIdWhenLoadDone( 135 void GetOfflineIdsForClientIdWhenLoadDone(
136 const ClientId& client_id, 136 const ClientId& client_id,
137 const MultipleOfflineIdCallback& callback) const; 137 const MultipleOfflineIdCallback& callback) const;
138 void GetPageByOfflineIdWhenLoadDone(
139 int64_t offline_id,
140 const SingleOfflinePageItemCallback& callback) const;
141 const std::vector<int64_t> MaybeGetOfflineIdsForClientId( 138 const std::vector<int64_t> MaybeGetOfflineIdsForClientId(
142 const ClientId& client_id) const; 139 const ClientId& client_id) const;
143 void GetPagesByURLWhenLoadDone( 140 void GetPagesByURLWhenLoadDone(
144 const GURL& url, 141 const GURL& url,
145 URLSearchMode url_search_mode, 142 URLSearchMode url_search_mode,
146 const MultipleOfflinePageItemCallback& callback) const; 143 const MultipleOfflinePageItemCallback& callback) const;
147 void MarkPageAccessedWhenLoadDone(int64_t offline_id); 144 void MarkPageAccessedWhenLoadDone(int64_t offline_id);
148 145
149 void CheckMetadataConsistency(); 146 void CheckMetadataConsistency();
150 147
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 base::Clock* testing_clock_; 291 base::Clock* testing_clock_;
295 292
296 base::WeakPtrFactory<OfflinePageModelImpl> weak_ptr_factory_; 293 base::WeakPtrFactory<OfflinePageModelImpl> weak_ptr_factory_;
297 294
298 DISALLOW_COPY_AND_ASSIGN(OfflinePageModelImpl); 295 DISALLOW_COPY_AND_ASSIGN(OfflinePageModelImpl);
299 }; 296 };
300 297
301 } // namespace offline_pages 298 } // namespace offline_pages
302 299
303 #endif // COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_MODEL_IMPL_H_ 300 #endif // COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_MODEL_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698