| Index: components/offline_pages/core/background/offliner_stub.cc
|
| diff --git a/components/offline_pages/core/background/offliner_stub.cc b/components/offline_pages/core/background/offliner_stub.cc
|
| index 0455fe08d7155575ba2d3d8eb96aa38c41658371..3b3c1f56164da0ca94ff8a3f7633e756edf5b49b 100644
|
| --- a/components/offline_pages/core/background/offliner_stub.cc
|
| +++ b/components/offline_pages/core/background/offliner_stub.cc
|
| @@ -11,7 +11,10 @@
|
| namespace offline_pages {
|
|
|
| OfflinerStub::OfflinerStub()
|
| - : disable_loading_(false), enable_callback_(false), cancel_called_(false) {}
|
| + : disable_loading_(false),
|
| + enable_callback_(false),
|
| + cancel_called_(false),
|
| + snapshot_on_last_retry_(false) {}
|
|
|
| OfflinerStub::~OfflinerStub() {}
|
|
|
| @@ -35,4 +38,14 @@ void OfflinerStub::Cancel() {
|
| cancel_called_ = true;
|
| }
|
|
|
| +bool OfflinerStub::HandleTimeout(const SavePageRequest& request) {
|
| + if (snapshot_on_last_retry_) {
|
| + base::ThreadTaskRunnerHandle::Get()->PostTask(
|
| + FROM_HERE,
|
| + base::Bind(callback_, request, Offliner::RequestStatus::SAVED));
|
| + return true;
|
| + }
|
| + return false;
|
| +}
|
| +
|
| } // namespace offline_pages
|
|
|