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

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

Issue 105623002: Debug UI for DOM distiller supports distillation and lists articles. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix strings and dependencies for ios Created 7 years 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
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/task_tracker.h" 5 #include "components/dom_distiller/core/task_tracker.h"
6 6
7 #include "base/message_loop/message_loop.h" 7 #include "base/message_loop/message_loop.h"
8 8
9 namespace dom_distiller { 9 namespace dom_distiller {
10 10
(...skipping 18 matching lines...) Expand all
29 if (distiller_) { 29 if (distiller_) {
30 return; 30 return;
31 } 31 }
32 if (entry_.pages_size() == 0) { 32 if (entry_.pages_size() == 0) {
33 return; 33 return;
34 } 34 }
35 35
36 GURL url(entry_.pages(0).url()); 36 GURL url(entry_.pages(0).url());
37 DCHECK(url.is_valid()); 37 DCHECK(url.is_valid());
38 38
39 distiller_ = factory->CreateDistiller().Pass(); 39 distiller_ = factory->CreateDistiller();
40 distiller_->DistillPage(url, 40 distiller_->DistillPage(url,
41 base::Bind(&TaskTracker::OnDistilledDataReady, 41 base::Bind(&TaskTracker::OnDistilledDataReady,
42 weak_ptr_factory_.GetWeakPtr())); 42 weak_ptr_factory_.GetWeakPtr()));
43 } 43 }
44 44
45 void TaskTracker::StartBlobFetcher() { 45 void TaskTracker::StartBlobFetcher() {
46 // TODO(cjhopman): There needs to be some local storage for the distilled 46 // TODO(cjhopman): There needs to be some local storage for the distilled
47 // blob. When that happens, this should start some task to fetch the blob for 47 // blob. When that happens, this should start some task to fetch the blob for
48 // |entry_| and asynchronously notify |this| when it is done. 48 // |entry_| and asynchronously notify |this| when it is done.
49 } 49 }
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 distilled_page_ = proto.Pass(); 128 distilled_page_ = proto.Pass();
129 129
130 entry_.set_title(distilled_page_->title()); 130 entry_.set_title(distilled_page_->title());
131 for (size_t i = 0; i < viewers_.size(); ++i) { 131 for (size_t i = 0; i < viewers_.size(); ++i) {
132 NotifyViewer(viewers_[i]); 132 NotifyViewer(viewers_[i]);
133 } 133 }
134 DoSaveCallback(); 134 DoSaveCallback();
135 } 135 }
136 136
137 } // namespace dom_distiller 137 } // namespace dom_distiller
OLDNEW
« no previous file with comments | « components/dom_distiller/core/distiller.cc ('k') | components/dom_distiller/webui/dom_distiller_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698