Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(25)

Side by Side Diff: components/dom_distiller/core/article_distillation_update.cc

Issue 178303004: Add incremental updates for multipage distillation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix compile by adding a header. Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
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
11 ArticleDistillationUpdate::ArticleDistillationUpdate(
12 const std::vector<RefCountedDistilledPageProto>& pages,
13 bool has_next_page,
14 bool has_prev_page) {
15 pages_ = pages;
cjhopman 2014/02/28 02:38:14 These should be initialized in the initializer lis
shashi 2014/03/02 02:53:40 Done.
16 has_next_page_ = has_next_page;
17 has_prev_page_ = has_prev_page;
18 }
19
20 ArticleDistillationUpdate::~ArticleDistillationUpdate() {}
21
22 const ArticleDistillationUpdate::RefCountedDistilledPageProto
23 ArticleDistillationUpdate::getDistilledPage(size_t index) const {
24 DCHECK_GT(pages_.size(), index);
25 return pages_[index];
26 }
27
28 size_t ArticleDistillationUpdate::getPagesSize() const { return pages_.size(); }
cjhopman 2014/02/28 02:38:14 These three could be inlined in the header.
shashi 2014/03/02 02:53:40 Done.
29
30 bool ArticleDistillationUpdate::hasNextPage() const { return has_next_page_; }
31
32 bool ArticleDistillationUpdate::hasPrevPage() const { return has_prev_page_; }
33
34 } // namespace dom_distiller
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698