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

Unified Diff: chrome/browser/android/offline_pages/offline_page_bridge.cc

Issue 2873953003: [Offline Pages] Adds the DeletePagesByOfflineId. (Closed)
Patch Set: Null check. Created 3 years, 7 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/offline_page_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/offline_page_bridge.cc
diff --git a/chrome/browser/android/offline_pages/offline_page_bridge.cc b/chrome/browser/android/offline_pages/offline_page_bridge.cc
index b93155a631c0ab31a0014fb02c607ba355baa894..e68cff0cd60283406dd98b42c85112e970d962dc 100644
--- a/chrome/browser/android/offline_pages/offline_page_bridge.cc
+++ b/chrome/browser/android/offline_pages/offline_page_bridge.cc
@@ -385,6 +385,20 @@ void OfflinePageBridge::DeletePagesByClientId(
client_ids, base::Bind(&DeletePageCallback, j_callback_ref));
}
+void OfflinePageBridge::DeletePagesByOfflineId(
+ JNIEnv* env,
+ const JavaParamRef<jobject>& obj,
+ const JavaParamRef<jlongArray>& j_offline_ids_array,
+ const JavaParamRef<jobject>& j_callback_obj) {
+ ScopedJavaGlobalRef<jobject> j_callback_ref;
+ j_callback_ref.Reset(env, j_callback_obj);
+ std::vector<int64_t> offline_ids;
+ base::android::JavaLongArrayToInt64Vector(env, j_offline_ids_array,
+ &offline_ids);
+ offline_page_model_->DeletePagesByOfflineId(
+ offline_ids, base::Bind(&DeletePageCallback, j_callback_ref));
+}
+
void OfflinePageBridge::GetPagesByClientId(
JNIEnv* env,
const JavaParamRef<jobject>& obj,
« no previous file with comments | « chrome/browser/android/offline_pages/offline_page_bridge.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698