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

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

Issue 2714693003: [Offline Pages] Resume pending requests when chrome starts. (Closed)
Patch Set: Fixing merging. 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 side-by-side diff with in-line comments
Download patch
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..4a3a2063ea625e2c74b125582f997554aca29ef8 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,18 @@ void OfflinePageDownloadBridge::ResumeDownload(
}
}
+void OfflinePageDownloadBridge::ResumePendingRequestImmediately(
+ JNIEnv* env,
+ const JavaParamRef<jobject>& obj) {
+ RequestCoordinator* coordinator =
+ RequestCoordinatorFactory::GetForBrowserContext(browser_context_);
+ if (coordinator) {
fgorski 2017/03/03 17:44:37 nit: braces not needed.
romax 2017/03/03 18:53:17 Done.
+ 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);

Powered by Google App Engine
This is Rietveld 408576698