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

Unified Diff: ios/chrome/browser/reading_list/reading_list_web_state_observer.mm

Issue 2784843002: Reading List: Mark entry read when opening external app. (Closed)
Patch Set: comments 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
Index: ios/chrome/browser/reading_list/reading_list_web_state_observer.mm
diff --git a/ios/chrome/browser/reading_list/reading_list_web_state_observer.mm b/ios/chrome/browser/reading_list/reading_list_web_state_observer.mm
index 0ca54adae018555d354449622a0646e3f43d9308..500763db3bde4969514a9fc0c3b6205a2769000f 100644
--- a/ios/chrome/browser/reading_list/reading_list_web_state_observer.mm
+++ b/ios/chrome/browser/reading_list/reading_list_web_state_observer.mm
@@ -327,3 +327,15 @@ void ReadingListWebStateObserver::LoadOfflineReadingListEntry() {
reading_list_model_->SetReadStatus(entry->URL(), true);
UMA_HISTOGRAM_BOOLEAN("ReadingList.OfflineVersionDisplayed", true);
}
+
+void ReadingListWebStateObserver::CurrentNavigationWillContinueInExternalApp() {
+ if (!pending_url_.is_valid()) {
+ return;
+ }
+ const ReadingListEntry* entry =
+ reading_list_model_->GetEntryByURL(pending_url_);
+ if (!entry) {
+ return;
+ }
+ reading_list_model_->SetReadStatus(pending_url_, true);
+}

Powered by Google App Engine
This is Rietveld 408576698