OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "components/dom_distiller/core/article_entry.h" | 5 #include "components/dom_distiller/core/article_entry.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "components/dom_distiller/core/article_attachments_data.h" | 8 #include "components/dom_distiller/core/article_attachments_data.h" |
9 #include "components/sync/api/sync_change.h" | 9 #include "components/sync/model/sync_change.h" |
10 | 10 |
11 using sync_pb::EntitySpecifics; | 11 using sync_pb::EntitySpecifics; |
12 using sync_pb::ArticlePage; | 12 using sync_pb::ArticlePage; |
13 using sync_pb::ArticleSpecifics; | 13 using sync_pb::ArticleSpecifics; |
14 | 14 |
15 namespace dom_distiller { | 15 namespace dom_distiller { |
16 | 16 |
17 bool IsEntryPageValid(const ArticleEntryPage& page) { return page.has_url(); } | 17 bool IsEntryPageValid(const ArticleEntryPage& page) { return page.has_url(); } |
18 | 18 |
19 bool IsEntryValid(const ArticleEntry& entry) { | 19 bool IsEntryValid(const ArticleEntry& entry) { |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 } | 62 } |
63 | 63 |
64 syncer::SyncData CreateLocalData(const ArticleEntry& entry) { | 64 syncer::SyncData CreateLocalData(const ArticleEntry& entry) { |
65 EntitySpecifics specifics = SpecificsFromEntry(entry); | 65 EntitySpecifics specifics = SpecificsFromEntry(entry); |
66 const std::string& entry_id = entry.entry_id(); | 66 const std::string& entry_id = entry.entry_id(); |
67 return syncer::SyncData::CreateLocalDataWithAttachments( | 67 return syncer::SyncData::CreateLocalDataWithAttachments( |
68 entry_id, entry_id, specifics, GetAttachmentIds(entry.attachments())); | 68 entry_id, entry_id, specifics, GetAttachmentIds(entry.attachments())); |
69 } | 69 } |
70 | 70 |
71 } // namespace dom_distiller | 71 } // namespace dom_distiller |
OLD | NEW |