| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef COMPONENTS_DOM_DISTILLER_CORE_ARTICLE_ATTACHMENTS_DATA_H_ | 5 #ifndef COMPONENTS_DOM_DISTILLER_CORE_ARTICLE_ATTACHMENTS_DATA_H_ |
| 6 #define COMPONENTS_DOM_DISTILLER_CORE_ARTICLE_ATTACHMENTS_DATA_H_ | 6 #define COMPONENTS_DOM_DISTILLER_CORE_ARTICLE_ATTACHMENTS_DATA_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "components/dom_distiller/core/proto/distilled_article.pb.h" | 11 #include "components/dom_distiller/core/proto/distilled_article.pb.h" |
| 12 #include "sync/api/attachments/attachment.h" | 12 #include "components/sync/api/attachments/attachment.h" |
| 13 #include "sync/protocol/article_specifics.pb.h" | 13 #include "components/sync/protocol/article_specifics.pb.h" |
| 14 | 14 |
| 15 namespace dom_distiller { | 15 namespace dom_distiller { |
| 16 | 16 |
| 17 // When stored, article attachments are split into two pieces, the actual data | 17 // When stored, article attachments are split into two pieces, the actual data |
| 18 // is stored by a set of ids in some attachment storage. The mapping of what | 18 // is stored by a set of ids in some attachment storage. The mapping of what |
| 19 // each id corresponds to is stored in the ArticleEntry's | 19 // each id corresponds to is stored in the ArticleEntry's |
| 20 // sync_pb::ArticleAttachments. This class handles splitting into those two | 20 // sync_pb::ArticleAttachments. This class handles splitting into those two |
| 21 // pieces (::CreateSyncAttachments) and reconstructing the data from the two | 21 // pieces (::CreateSyncAttachments) and reconstructing the data from the two |
| 22 // pieces (::GetFromAttachmentMap and ::GetAttachmentIds). Outside of this | 22 // pieces (::GetFromAttachmentMap and ::GetAttachmentIds). Outside of this |
| 23 // class, the structure of sync_pb::ArticleAttachments (the id mapping) should | 23 // class, the structure of sync_pb::ArticleAttachments (the id mapping) should |
| (...skipping 20 matching lines...) Expand all Loading... |
| 44 private: | 44 private: |
| 45 DistilledArticleProto distilled_article_; | 45 DistilledArticleProto distilled_article_; |
| 46 }; | 46 }; |
| 47 | 47 |
| 48 syncer::AttachmentIdList GetAttachmentIds( | 48 syncer::AttachmentIdList GetAttachmentIds( |
| 49 const sync_pb::ArticleAttachments& attachments); | 49 const sync_pb::ArticleAttachments& attachments); |
| 50 | 50 |
| 51 } // namespace dom_distiller | 51 } // namespace dom_distiller |
| 52 | 52 |
| 53 #endif // COMPONENTS_DOM_DISTILLER_CORE_ARTICLE_ATTACHMENTS_DATA_H_ | 53 #endif // COMPONENTS_DOM_DISTILLER_CORE_ARTICLE_ATTACHMENTS_DATA_H_ |
| OLD | NEW |