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

Unified Diff: components/offline_pages/offline_page_model.h

Issue 1947323002: [Offline Pages] Implement OfflinePageStorageManager. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: components/offline_pages/offline_page_model.h
diff --git a/components/offline_pages/offline_page_model.h b/components/offline_pages/offline_page_model.h
index 99d306cbf648f1bd121f6847da232d842efe1372..ee4f72579920c0beb58d691c0da4be5afaf085d9 100644
--- a/components/offline_pages/offline_page_model.h
+++ b/components/offline_pages/offline_page_model.h
@@ -40,8 +40,10 @@ static const int64_t kInvalidOfflineId = 0;
struct ClientId;
+class ClientPolicyController;
struct OfflinePageItem;
class OfflinePageMetadataStore;
+class OfflinePageStorageManager;
// Service for saving pages offline, storing the offline copy and metadata, and
// retrieving them upon request.
@@ -257,9 +259,14 @@ class OfflinePageModel : public KeyedService, public base::SupportsUserData {
int64_t free_space_bytes,
bool reporting_after_delete);
+ // Returns the policy controller.
+ ClientPolicyController* GetPolicyController();
+
// Methods for testing only:
OfflinePageMetadataStore* GetStoreForTesting();
+ OfflinePageStorageManager* GetStorageManager();
+
bool is_loaded() const { return is_loaded_; }
private:
@@ -381,6 +388,12 @@ class OfflinePageModel : public KeyedService, public base::SupportsUserData {
// Delayed tasks that should be invoked after the loading is done.
std::vector<base::Closure> delayed_tasks_;
+ // Controller of the client policies.
+ std::unique_ptr<ClientPolicyController> policy_controller_;
+
+ // Storage manager of this model.
fgorski 2016/05/05 04:53:08 I believe we will run into a problem of distinguis
romax 2016/05/05 21:00:02 Done.
+ std::unique_ptr<OfflinePageStorageManager> storage_manager_;
+
base::WeakPtrFactory<OfflinePageModel> weak_ptr_factory_;
DISALLOW_COPY_AND_ASSIGN(OfflinePageModel);

Powered by Google App Engine
This is Rietveld 408576698