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

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

Issue 2180973002: [Offline pages] Adapting OfflinePageDownloadBridge to DownloadUIAdapter (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ui-adapter
Patch Set: Hooking up download ui adapter to offline page model and bridge Created 4 years, 4 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_H_ 5 #ifndef COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_MODEL_H_
6 #define COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_MODEL_H_ 6 #define COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_MODEL_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
11 #include <set> 11 #include <set>
12 #include <string> 12 #include <string>
13 #include <vector> 13 #include <vector>
14 14
15 #include "base/supports_user_data.h" 15 #include "base/supports_user_data.h"
16 #include "components/offline_pages/offline_event_logger.h" 16 #include "components/offline_pages/offline_event_logger.h"
17 #include "components/offline_pages/offline_page_archiver.h" 17 #include "components/offline_pages/offline_page_archiver.h"
18 #include "components/offline_pages/offline_page_storage_manager.h" 18 #include "components/offline_pages/offline_page_storage_manager.h"
19 #include "components/offline_pages/offline_page_types.h" 19 #include "components/offline_pages/offline_page_types.h"
20 20
21 class GURL; 21 class GURL;
22 namespace base { 22 namespace base {
23 class Time; 23 class Time;
24 } // namespace base 24 } // namespace base
25 25
26 namespace offline_pages { 26 namespace offline_pages {
27 27
28 struct ClientId; 28 struct ClientId;
29 class DownloadUIAdapter;
29 struct OfflinePageItem; 30 struct OfflinePageItem;
30 31
31 // Service for saving pages offline, storing the offline copy and metadata, and 32 // Service for saving pages offline, storing the offline copy and metadata, and
32 // retrieving them upon request. 33 // retrieving them upon request.
33 // 34 //
34 // Example usage: 35 // Example usage:
35 // class ArchiverImpl : public OfflinePageArchiver { 36 // class ArchiverImpl : public OfflinePageArchiver {
36 // // This is a class that knows how to create archiver 37 // // This is a class that knows how to create archiver
37 // void CreateArchiver(...) override; 38 // void CreateArchiver(...) override;
38 // ... 39 // ...
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 190
190 // Marks pages with |offline_ids| as expired and deletes the associated 191 // Marks pages with |offline_ids| as expired and deletes the associated
191 // archive files. 192 // archive files.
192 virtual void ExpirePages(const std::vector<int64_t>& offline_ids, 193 virtual void ExpirePages(const std::vector<int64_t>& offline_ids,
193 const base::Time& expiration_time, 194 const base::Time& expiration_time,
194 const base::Callback<void(bool)>& callback) = 0; 195 const base::Callback<void(bool)>& callback) = 0;
195 196
196 // Returns the policy controller. 197 // Returns the policy controller.
197 virtual ClientPolicyController* GetPolicyController() = 0; 198 virtual ClientPolicyController* GetPolicyController() = 0;
198 199
200 // Returns the Download UI Adapter.
201 virtual DownloadUIAdapter* GetDownloadUIAdapter() = 0;
202
199 // TODO(dougarnett): Remove this and its uses. 203 // TODO(dougarnett): Remove this and its uses.
200 virtual bool is_loaded() const = 0; 204 virtual bool is_loaded() const = 0;
201 205
202 // Returns the logger. Ownership is retained by the model. 206 // Returns the logger. Ownership is retained by the model.
203 virtual OfflineEventLogger* GetLogger() = 0; 207 virtual OfflineEventLogger* GetLogger() = 0;
204 }; 208 };
205 209
206 } // namespace offline_pages 210 } // namespace offline_pages
207 211
208 #endif // COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_MODEL_H_ 212 #endif // COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_MODEL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698