Index: components/dom_distiller/core/article_attachments_data.h |
diff --git a/components/dom_distiller/core/article_attachments_data.h b/components/dom_distiller/core/article_attachments_data.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..be3e72c7a8f9227f1bd0f66eb989034649f1357d |
--- /dev/null |
+++ b/components/dom_distiller/core/article_attachments_data.h |
@@ -0,0 +1,45 @@ |
+// Copyright 2014 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef COMPONENTS_DOM_DISTILLER_CORE_ARTICLE_ATTACHMENTS_DATA_H_ |
+#define COMPONENTS_DOM_DISTILLER_CORE_ARTICLE_ATTACHMENTS_DATA_H_ |
+ |
+#include <string> |
+ |
+#include "base/memory/scoped_ptr.h" |
+#include "components/dom_distiller/core/proto/distilled_article.pb.h" |
+#include "sync/api/attachments/attachment.h" |
+#include "sync/protocol/article_specifics.pb.h" |
+ |
+namespace dom_distiller { |
+ |
+class ArticleAttachmentsData { |
maniscalco
2014/11/12 18:59:43
How should I think about this class? Is it essent
cjhopman
2014/11/14 02:45:15
I've documented it a bit. Let me know if that does
|
+ public: |
+ static scoped_ptr<ArticleAttachmentsData> GetFromAttachmentMap( |
+ const sync_pb::ArticleAttachments& attachments_key, |
+ const syncer::AttachmentMap& attachment_map); |
+ |
+ std::string ToString() const; |
+ |
+ void CreateSyncAttachments( |
+ syncer::AttachmentList* attachment_list, |
+ sync_pb::ArticleAttachments* attachments_key) const; |
+ |
+ const DistilledArticleProto& distilled_article() const { |
+ return distilled_article_; |
+ } |
+ void set_distilled_article(const DistilledArticleProto& article) { |
+ distilled_article_ = article; |
+ } |
+ |
+ private: |
+ DistilledArticleProto distilled_article_; |
+}; |
+ |
+syncer::AttachmentIdList GetAttachmentIds( |
+ const sync_pb::ArticleAttachments& attachments); |
+ |
+} // namespace dom_distiller |
+ |
+#endif |
maniscalco
2014/11/12 18:59:43
nit: // COMPONENTS_DOM_DISTILLER_CORE_ARTICLE_ATT
cjhopman
2014/11/14 02:45:15
Done.
|