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

Side by Side Diff: chrome/browser/android/offline_pages/prerendering_offliner.h

Issue 2818783002: [Offline pages]: Implement background loader to save on last retry, and record last retry success U… (Closed)
Patch Set: Resolving code review comments Created 3 years, 8 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 CHROME_BROWSER_ANDROID_OFFLINE_PAGES_PRERENDERING_OFFLINER_H_ 5 #ifndef CHROME_BROWSER_ANDROID_OFFLINE_PAGES_PRERENDERING_OFFLINER_H_
6 #define CHROME_BROWSER_ANDROID_OFFLINE_PAGES_PRERENDERING_OFFLINER_H_ 6 #define CHROME_BROWSER_ANDROID_OFFLINE_PAGES_PRERENDERING_OFFLINER_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/android/application_status_listener.h" 10 #include "base/android/application_status_listener.h"
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 // Lazily created. 92 // Lazily created.
93 std::unique_ptr<PrerenderingLoader> loader_; 93 std::unique_ptr<PrerenderingLoader> loader_;
94 // Tracks pending request, if any. Owned copy. 94 // Tracks pending request, if any. Owned copy.
95 // May be used to ensure a callback applies to the pending request (e.g., in 95 // May be used to ensure a callback applies to the pending request (e.g., in
96 // case we receive a save page callback for an old, canceled request). 96 // case we receive a save page callback for an old, canceled request).
97 std::unique_ptr<SavePageRequest> pending_request_; 97 std::unique_ptr<SavePageRequest> pending_request_;
98 // Callback to call when pending request completes/fails. 98 // Callback to call when pending request completes/fails.
99 CompletionCallback completion_callback_; 99 CompletionCallback completion_callback_;
100 ProgressCallback progress_callback_; 100 ProgressCallback progress_callback_;
101 bool is_low_end_device_; 101 bool is_low_end_device_;
102 bool saved_on_last_retry_;
102 // ApplicationStatusListener to monitor if the Chrome moves to the foreground. 103 // ApplicationStatusListener to monitor if the Chrome moves to the foreground.
103 std::unique_ptr<base::android::ApplicationStatusListener> app_listener_; 104 std::unique_ptr<base::android::ApplicationStatusListener> app_listener_;
104 base::WeakPtrFactory<PrerenderingOffliner> weak_ptr_factory_; 105 base::WeakPtrFactory<PrerenderingOffliner> weak_ptr_factory_;
105 106
106 DISALLOW_COPY_AND_ASSIGN(PrerenderingOffliner); 107 DISALLOW_COPY_AND_ASSIGN(PrerenderingOffliner);
107 }; 108 };
108 109
109 } // namespace offline_pages 110 } // namespace offline_pages
110 111
111 #endif // CHROME_BROWSER_ANDROID_OFFLINE_PAGES_PRERENDERING_OFFLINER_H_ 112 #endif // CHROME_BROWSER_ANDROID_OFFLINE_PAGES_PRERENDERING_OFFLINER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698