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

Side by Side Diff: components/offline_pages/core/background/offliner.h

Issue 2637563002: [Offline Pages] Snapshotting on timeout of last retry. (Closed)
Patch Set: merging with master again Created 3 years, 10 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_CORE_BACKGROUND_OFFLINER_H_ 5 #ifndef COMPONENTS_OFFLINE_PAGES_CORE_BACKGROUND_OFFLINER_H_
6 #define COMPONENTS_OFFLINE_PAGES_CORE_BACKGROUND_OFFLINER_H_ 6 #define COMPONENTS_OFFLINE_PAGES_CORE_BACKGROUND_OFFLINER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 // Processes |request| to load and save an offline page. 68 // Processes |request| to load and save an offline page.
69 // Returns whether the request was accepted or not. |callback| is guaranteed 69 // Returns whether the request was accepted or not. |callback| is guaranteed
70 // to be called if the request was accepted and |Cancel()| is not called. 70 // to be called if the request was accepted and |Cancel()| is not called.
71 virtual bool LoadAndSave(const SavePageRequest& request, 71 virtual bool LoadAndSave(const SavePageRequest& request,
72 const CompletionCallback& callback) = 0; 72 const CompletionCallback& callback) = 0;
73 73
74 // Clears the currently processing request, if any, and skips running its 74 // Clears the currently processing request, if any, and skips running its
75 // CompletionCallback. 75 // CompletionCallback.
76 virtual void Cancel() = 0; 76 virtual void Cancel() = 0;
77 77
78 // Handles timeout scenario. Returns true if lowbar is met and try to do a
79 // snapshot of the current webcontents.
80 virtual bool HandleTimeout(const SavePageRequest& request) = 0;
81
78 // TODO(dougarnett): add policy support methods. 82 // TODO(dougarnett): add policy support methods.
79 }; 83 };
80 84
81 } // namespace offline_pages 85 } // namespace offline_pages
82 86
83 #endif // COMPONENTS_OFFLINE_PAGES_CORE_BACKGROUND_OFFLINER_H_ 87 #endif // COMPONENTS_OFFLINE_PAGES_CORE_BACKGROUND_OFFLINER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698