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

Unified Diff: chrome/browser/android/offline_pages/downloads/offline_page_download_bridge.cc

Issue 2760123002: [Offline Pages] Resume pending requests when chrome starts. (Closed)
Patch Set: Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/android/offline_pages/downloads/offline_page_download_bridge.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/android/offline_pages/downloads/offline_page_download_bridge.cc
diff --git a/chrome/browser/android/offline_pages/downloads/offline_page_download_bridge.cc b/chrome/browser/android/offline_pages/downloads/offline_page_download_bridge.cc
index c7c7242699ee0d61315bbbe787a8818f88408542..b78235c67599250d9febb14373f2492073ef5eff 100644
--- a/chrome/browser/android/offline_pages/downloads/offline_page_download_bridge.cc
+++ b/chrome/browser/android/offline_pages/downloads/offline_page_download_bridge.cc
@@ -440,6 +440,17 @@ void OfflinePageDownloadBridge::ResumeDownload(
}
}
+void OfflinePageDownloadBridge::ResumePendingRequestImmediately(
+ JNIEnv* env,
+ const JavaParamRef<jobject>& obj) {
+ RequestCoordinator* coordinator =
+ RequestCoordinatorFactory::GetForBrowserContext(browser_context_);
+ if (coordinator)
+ coordinator->StartImmediateProcessing(base::Bind([](bool result) {}));
+ else
+ LOG(WARNING) << "ResumePendingRequestImmediately has no valid coordinator.";
+}
+
void OfflinePageDownloadBridge::ItemsLoaded() {
JNIEnv* env = AttachCurrentThread();
ScopedJavaLocalRef<jobject> obj = weak_java_ref_.get(env);
« no previous file with comments | « chrome/browser/android/offline_pages/downloads/offline_page_download_bridge.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698