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: components/offline_pages/offline_page_metadata_store_impl.cc

Issue 1367063004: Support undoing offline page deletion (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add the call to removeObserver Created 5 years, 2 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: components/offline_pages/offline_page_metadata_store_impl.cc
diff --git a/components/offline_pages/offline_page_metadata_store_impl.cc b/components/offline_pages/offline_page_metadata_store_impl.cc
index b9801f749158d355aeb2015333df8c67cd6d28f9..ca22870257087c06aeff44143fa8ba324573300f 100644
--- a/components/offline_pages/offline_page_metadata_store_impl.cc
+++ b/components/offline_pages/offline_page_metadata_store_impl.cc
@@ -44,6 +44,8 @@ void OfflinePageItemToEntry(const OfflinePageItem& item,
item_proto->set_creation_time(item.creation_time.ToInternalValue());
item_proto->set_last_access_time(item.last_access_time.ToInternalValue());
item_proto->set_access_count(item.access_count);
+ item_proto->set_flags(
+ static_cast<::offline_pages::OfflinePageEntry_Flags>(item.flags));
}
bool OfflinePageItemFromEntry(const offline_pages::OfflinePageEntry& item_proto,
@@ -75,6 +77,9 @@ bool OfflinePageItemFromEntry(const offline_pages::OfflinePageEntry& item_proto,
if (item_proto.has_access_count()) {
item->access_count = item_proto.access_count();
}
+ if (item_proto.has_flags()) {
+ item->flags = static_cast<OfflinePageItem::Flags>(item_proto.flags());
+ }
return true;
}

Powered by Google App Engine
This is Rietveld 408576698