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

Unified Diff: components/offline_pages/core/offline_page_model.h

Issue 2564163002: [Offline Pages] Remove load state from public OfflinePageModel API. (Closed)
Patch Set: Fix broken tests. 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 side-by-side diff with in-line comments
Download patch
Index: components/offline_pages/core/offline_page_model.h
diff --git a/components/offline_pages/core/offline_page_model.h b/components/offline_pages/core/offline_page_model.h
index 584d81a9566c1e73eea61ba90600c5b4a2c8864b..6416564fd96da4bff4856bb9e827c3b30a14a6c5 100644
--- a/components/offline_pages/core/offline_page_model.h
+++ b/components/offline_pages/core/offline_page_model.h
@@ -75,9 +75,6 @@ class OfflinePageModel : public base::SupportsUserData {
// Observer of the OfflinePageModel.
class Observer {
public:
- // Invoked when the model has finished loading.
- virtual void OfflinePageModelLoaded(OfflinePageModel* model) = 0;
-
// Invoked when the model is being updated due to adding an offline page.
virtual void OfflinePageAdded(OfflinePageModel* model,
const OfflinePageItem& added_page) = 0;
@@ -108,16 +105,16 @@ class OfflinePageModel : public base::SupportsUserData {
static const int64_t kInvalidOfflineId = 0;
- // Attempts to save a page offline per |save_page_params|. Requires that the
- // model is loaded. Generates a new offline id or uses the proposed offline
- // id in |save_page_params| and returns it.
+ // Attempts to save a page offline per |save_page_params|. Generates a new
+ // offline id or uses the proposed offline id in |save_page_params| and
+ // returns it.
virtual void SavePage(const SavePageParams& save_page_params,
std::unique_ptr<OfflinePageArchiver> archiver,
const SavePageCallback& callback) = 0;
// Marks that the offline page related to the passed |offline_id| has been
// accessed. Its access info, including last access time and access count,
- // will be updated. Requires that the model is loaded.
+ // will be updated.
virtual void MarkPageAccessed(int64_t offline_id) = 0;
// Deletes pages based on |offline_ids|.
@@ -171,9 +168,6 @@ class OfflinePageModel : public base::SupportsUserData {
// Returns the policy controller.
virtual ClientPolicyController* GetPolicyController() = 0;
- // TODO(dougarnett): Remove this and its uses.
- virtual bool is_loaded() const = 0;
-
// Returns the logger. Ownership is retained by the model.
virtual OfflineEventLogger* GetLogger() = 0;
};

Powered by Google App Engine
This is Rietveld 408576698