| Index: chrome/browser/android/offline_pages/background_loader_offliner.h
|
| diff --git a/chrome/browser/android/offline_pages/background_loader_offliner.h b/chrome/browser/android/offline_pages/background_loader_offliner.h
|
| index 608e88b3006ca0ad23cd68f24e26fb76b6f01961..802294215206f0a6d55fd0e5f9a773a9c6f17ba8 100644
|
| --- a/chrome/browser/android/offline_pages/background_loader_offliner.h
|
| +++ b/chrome/browser/android/offline_pages/background_loader_offliner.h
|
| @@ -12,7 +12,6 @@
|
| #include "components/offline_pages/content/background_loader/background_loader_contents.h"
|
| #include "components/offline_pages/core/background/offliner.h"
|
| #include "components/offline_pages/core/offline_page_types.h"
|
| -#include "components/offline_pages/core/snapshot_controller.h"
|
| #include "content/public/browser/web_contents_observer.h"
|
|
|
| namespace content {
|
| @@ -28,8 +27,7 @@
|
| // of an offline page. It uses the BackgroundLoader to load the page and the
|
| // OfflinePageModel to save it. Only one request may be active at a time.
|
| class BackgroundLoaderOffliner : public Offliner,
|
| - public content::WebContentsObserver,
|
| - public SnapshotController::Client {
|
| + public content::WebContentsObserver {
|
| public:
|
| BackgroundLoaderOffliner(content::BrowserContext* browser_context,
|
| const OfflinerPolicy* policy,
|
| @@ -47,15 +45,11 @@
|
| bool HandleTimeout(const SavePageRequest& request) override;
|
|
|
| // WebContentsObserver implementation.
|
| - void DocumentLoadedInFrame(content::RenderFrameHost* render_frame) override;
|
| void DidStopLoading() override;
|
| void RenderProcessGone(base::TerminationStatus status) override;
|
| void WebContentsDestroyed() override;
|
| void DidFinishNavigation(
|
| content::NavigationHandle* navigation_handle) override;
|
| -
|
| - // SnapshotController::Client implementation.
|
| - void StartSnapshot() override;
|
|
|
| void SetPageDelayForTest(long delay_ms);
|
| void OnNetworkBytesChanged(int64_t bytes);
|
| @@ -69,6 +63,9 @@
|
|
|
| enum SaveState { NONE, SAVING, DELETE_AFTER_SAVE };
|
| enum PageLoadState { SUCCESS, RETRIABLE, NONRETRIABLE, DELAY_RETRY };
|
| +
|
| + // Called when the page is ready to be saved.
|
| + void SavePage();
|
|
|
| // Called when the page has been saved.
|
| void OnPageSaved(SavePageResult save_result, int64_t offline_id);
|
| @@ -86,8 +83,6 @@
|
| OfflinePageModel* offline_page_model_;
|
| // Tracks pending request, if any.
|
| std::unique_ptr<SavePageRequest> pending_request_;
|
| - // Handles determining when a page should be snapshotted.
|
| - std::unique_ptr<SnapshotController> snapshot_controller_;
|
| // Callback when pending request completes.
|
| CompletionCallback completion_callback_;
|
| // Callback to report progress.
|
|
|