• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
3 // found in the LICENSE file.
4 
5 #include "components/dom_distiller/core/article_distillation_update.h"
6 
7 #include "base/logging.h"
8 
9 namespace dom_distiller {
10 
ArticleDistillationUpdate(const std::vector<scoped_refptr<RefCountedPageProto>> & pages,bool has_next_page,bool has_prev_page)11 ArticleDistillationUpdate::ArticleDistillationUpdate(
12     const std::vector<scoped_refptr<RefCountedPageProto> >& pages,
13     bool has_next_page,
14     bool has_prev_page)
15     : has_next_page_(has_next_page),
16       has_prev_page_(has_prev_page),
17       pages_(pages) {}
18 
~ArticleDistillationUpdate()19 ArticleDistillationUpdate::~ArticleDistillationUpdate() {}
20 
GetDistilledPage(size_t index) const21 const DistilledPageProto& ArticleDistillationUpdate::GetDistilledPage(
22     size_t index) const {
23   DCHECK_GT(pages_.size(), index);
24   return pages_[index]->data;
25 }
26 
27 }  // namespace dom_distiller
28