OLD | NEW |
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 <algorithm> | 5 #include <algorithm> |
6 #include <map> | 6 #include <map> |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
11 #include "base/bind_helpers.h" | 11 #include "base/bind_helpers.h" |
12 #include "base/location.h" | 12 #include "base/location.h" |
13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
| 14 #include "base/message_loop/message_loop.h" |
14 #include "base/single_thread_task_runner.h" | 15 #include "base/single_thread_task_runner.h" |
15 #include "base/strings/string_number_conversions.h" | 16 #include "base/strings/string_number_conversions.h" |
16 #include "base/thread_task_runner_handle.h" | 17 #include "base/thread_task_runner_handle.h" |
17 #include "base/values.h" | 18 #include "base/values.h" |
18 #include "components/dom_distiller/core/article_distillation_update.h" | 19 #include "components/dom_distiller/core/article_distillation_update.h" |
19 #include "components/dom_distiller/core/distiller.h" | 20 #include "components/dom_distiller/core/distiller.h" |
20 #include "components/dom_distiller/core/distiller_page.h" | 21 #include "components/dom_distiller/core/distiller_page.h" |
21 #include "components/dom_distiller/core/fake_distiller_page.h" | 22 #include "components/dom_distiller/core/fake_distiller_page.h" |
22 #include "components/dom_distiller/core/proto/distilled_article.pb.h" | 23 #include "components/dom_distiller/core/proto/distilled_article.pb.h" |
23 #include "components/dom_distiller/core/proto/distilled_page.pb.h" | 24 #include "components/dom_distiller/core/proto/distilled_page.pb.h" |
(...skipping 668 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
692 | 693 |
693 ASSERT_TRUE(distiller_page); | 694 ASSERT_TRUE(distiller_page); |
694 // Post the task to execute javascript and then delete the distiller. | 695 // Post the task to execute javascript and then delete the distiller. |
695 distiller_page->OnDistillationDone(GURL(kURL), distilled_value.get()); | 696 distiller_page->OnDistillationDone(GURL(kURL), distilled_value.get()); |
696 distiller_.reset(); | 697 distiller_.reset(); |
697 | 698 |
698 base::MessageLoop::current()->RunUntilIdle(); | 699 base::MessageLoop::current()->RunUntilIdle(); |
699 } | 700 } |
700 | 701 |
701 } // namespace dom_distiller | 702 } // namespace dom_distiller |
OLD | NEW |