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

Unified Diff: chrome/browser/android/history/browsing_history_bridge.h

Issue 2555273002: [Android History] Add support for removing items (Closed)
Patch Set: Changes from dfalcantara@ review Created 4 years 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/history/browsing_history_bridge.h
diff --git a/chrome/browser/android/history/browsing_history_bridge.h b/chrome/browser/android/history/browsing_history_bridge.h
index d94a063dd22eaf776af3410dafe81ff3962d5e4d..c03862b893453c94647e2966eb18f6b58a967927 100644
--- a/chrome/browser/android/history/browsing_history_bridge.h
+++ b/chrome/browser/android/history/browsing_history_bridge.h
@@ -32,6 +32,20 @@ class BrowsingHistoryBridge : public BrowsingHistoryServiceHandler {
jstring j_query,
int64_t j_query_end_time);
+ // Adds a HistoryEntry with the |j_url| and |j_timestamps| to the list of
+ // items being removed. The removal will not be committed until
+ // ::removeItems() is called.
+ void MarkItemForRemoval(
+ JNIEnv* env,
+ const JavaParamRef<jobject>& obj,
+ jstring j_url,
+ const JavaParamRef<jlongArray>& j_timestamps);
+
+ // Removes all items that have been marked for removal through
+ // ::markItemForRemoval().
+ void RemoveItems(JNIEnv* env,
+ const JavaParamRef<jobject>& obj);
+
// BrowsingHistoryServiceHandler implementation
void OnQueryComplete(
std::vector<BrowsingHistoryService::HistoryEntry>* results,
@@ -49,6 +63,9 @@ class BrowsingHistoryBridge : public BrowsingHistoryServiceHandler {
base::android::ScopedJavaGlobalRef<jobject> j_history_service_obj_;
base::android::ScopedJavaGlobalRef<jobject> j_query_result_obj_;
+ std::vector<std::unique_ptr<BrowsingHistoryService::HistoryEntry>>
+ items_to_remove_;
+
DISALLOW_COPY_AND_ASSIGN(BrowsingHistoryBridge);
};

Powered by Google App Engine
This is Rietveld 408576698