summaryrefslogtreecommitdiffstats
path: root/components/offline_pages/offline_page_metadata_store_impl.cc
diff options
context:
space:
mode:
authorfgorski <fgorski@chromium.org>2015-08-06 14:43:48 -0700
committerCommit bot <commit-bot@chromium.org>2015-08-06 21:44:29 +0000
commitab60e095f549876f7d9bde834387f3da37316e70 (patch)
tree809192a6eeed46b1e7eb95a1734cc1f6940a2b04 /components/offline_pages/offline_page_metadata_store_impl.cc
parent4fb6b6f46c01262f37c7a170f3de2366f4d8cedf (diff)
downloadchromium_src-ab60e095f549876f7d9bde834387f3da37316e70.zip
chromium_src-ab60e095f549876f7d9bde834387f3da37316e70.tar.gz
chromium_src-ab60e095f549876f7d9bde834387f3da37316e70.tar.bz2
[Offline pages] Adding bookmark ID to offline page (removing title)
This change is necessary, as title is already stored by the bookmark, while bookmark ID is how all the filtering and matching is done by the model and UI. Without this update any filtering logic will be very inefficient. BUG=491352 Review URL: https://codereview.chromium.org/1262743006 Cr-Commit-Position: refs/heads/master@{#342206}
Diffstat (limited to 'components/offline_pages/offline_page_metadata_store_impl.cc')
-rw-r--r--components/offline_pages/offline_page_metadata_store_impl.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/components/offline_pages/offline_page_metadata_store_impl.cc b/components/offline_pages/offline_page_metadata_store_impl.cc
index e19585fa..c68c676 100644
--- a/components/offline_pages/offline_page_metadata_store_impl.cc
+++ b/components/offline_pages/offline_page_metadata_store_impl.cc
@@ -29,7 +29,7 @@ void OfflinePageItemToEntry(const OfflinePageItem& item,
offline_pages::OfflinePageEntry* item_proto) {
DCHECK(item_proto);
item_proto->set_url(item.url.spec());
- item_proto->set_title(base::UTF16ToUTF8(item.title));
+ item_proto->set_bookmark_id(item.bookmark_id);
item_proto->set_version(item.version);
std::string path_string;
#if defined(OS_POSIX)
@@ -46,12 +46,12 @@ void OfflinePageItemToEntry(const OfflinePageItem& item,
bool OfflinePageItemFromEntry(const offline_pages::OfflinePageEntry& item_proto,
OfflinePageItem* item) {
DCHECK(item);
- if (!item_proto.has_url() || !item_proto.has_title() ||
+ if (!item_proto.has_url() || !item_proto.has_bookmark_id() ||
!item_proto.has_version() || !item_proto.has_file_path()) {
return false;
}
item->url = GURL(item_proto.url());
- item->title = base::UTF8ToUTF16(item_proto.title());
+ item->bookmark_id = item_proto.bookmark_id();
item->version = item_proto.version();
#if defined(OS_POSIX)
item->file_path = base::FilePath(item_proto.file_path());