Extract the in-memory model from DomDistillerStore
[chromium-blink-merge.git] / components / dom_distiller / core / article_entry.h
blob388dc51e18715109f4e891a7de6f08018a3f32f8
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef COMPONENTS_DOM_DISTILLER_CORE_ARTICLE_ENTRY_H_
6 #define COMPONENTS_DOM_DISTILLER_CORE_ARTICLE_ENTRY_H_
8 #include "sync/api/sync_data.h"
9 #include "sync/protocol/article_specifics.pb.h"
10 #include "sync/protocol/sync.pb.h"
12 namespace syncer {
13 class SyncChange;
16 namespace dom_distiller {
18 typedef sync_pb::ArticleSpecifics ArticleEntry;
19 typedef sync_pb::ArticlePage ArticleEntryPage;
21 bool IsEntryValid(const ArticleEntry& entry);
23 bool AreEntriesEqual(const ArticleEntry& left, const ArticleEntry& right);
25 sync_pb::EntitySpecifics SpecificsFromEntry(const ArticleEntry& entry);
26 ArticleEntry EntryFromSpecifics(const sync_pb::EntitySpecifics& specifics);
28 ArticleEntry GetEntryFromChange(const syncer::SyncChange& change);
29 std::string GetEntryIdFromSyncData(const syncer::SyncData& data);
30 syncer::SyncData CreateLocalData(const ArticleEntry& entry);
33 } // namespace dom_distiller
35 #endif