| 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 "components/dom_distiller/core/distiller.h" | 5 #include "components/dom_distiller/core/distiller.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <map> | 10 #include <map> |
| 11 #include <memory> | 11 #include <memory> |
| 12 #include <string> | 12 #include <string> |
| 13 #include <utility> | 13 #include <utility> |
| 14 #include <vector> | 14 #include <vector> |
| 15 | 15 |
| 16 #include "base/bind.h" | 16 #include "base/bind.h" |
| 17 #include "base/bind_helpers.h" | 17 #include "base/bind_helpers.h" |
| 18 #include "base/location.h" | 18 #include "base/location.h" |
| 19 #include "base/macros.h" | 19 #include "base/macros.h" |
| 20 #include "base/message_loop/message_loop.h" | 20 #include "base/message_loop/message_loop.h" |
| 21 #include "base/single_thread_task_runner.h" | 21 #include "base/single_thread_task_runner.h" |
| 22 #include "base/strings/string_number_conversions.h" | 22 #include "base/strings/string_number_conversions.h" |
| 23 #include "base/thread_task_runner_handle.h" | 23 #include "base/threading/thread_task_runner_handle.h" |
| 24 #include "base/values.h" | 24 #include "base/values.h" |
| 25 #include "components/dom_distiller/core/article_distillation_update.h" | 25 #include "components/dom_distiller/core/article_distillation_update.h" |
| 26 #include "components/dom_distiller/core/distiller_page.h" | 26 #include "components/dom_distiller/core/distiller_page.h" |
| 27 #include "components/dom_distiller/core/fake_distiller_page.h" | 27 #include "components/dom_distiller/core/fake_distiller_page.h" |
| 28 #include "components/dom_distiller/core/proto/distilled_article.pb.h" | 28 #include "components/dom_distiller/core/proto/distilled_article.pb.h" |
| 29 #include "components/dom_distiller/core/proto/distilled_page.pb.h" | 29 #include "components/dom_distiller/core/proto/distilled_page.pb.h" |
| 30 #include "net/url_request/url_request_context_getter.h" | 30 #include "net/url_request/url_request_context_getter.h" |
| 31 #include "testing/gmock/include/gmock/gmock.h" | 31 #include "testing/gmock/include/gmock/gmock.h" |
| 32 #include "testing/gtest/include/gtest/gtest.h" | 32 #include "testing/gtest/include/gtest/gtest.h" |
| 33 #include "third_party/dom_distiller_js/dom_distiller.pb.h" | 33 #include "third_party/dom_distiller_js/dom_distiller.pb.h" |
| (...skipping 717 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 751 | 751 |
| 752 ASSERT_TRUE(distiller_page); | 752 ASSERT_TRUE(distiller_page); |
| 753 // Post the task to execute javascript and then delete the distiller. | 753 // Post the task to execute javascript and then delete the distiller. |
| 754 distiller_page->OnDistillationDone(GURL(kURL), distilled_value.get()); | 754 distiller_page->OnDistillationDone(GURL(kURL), distilled_value.get()); |
| 755 distiller_.reset(); | 755 distiller_.reset(); |
| 756 | 756 |
| 757 base::MessageLoop::current()->RunUntilIdle(); | 757 base::MessageLoop::current()->RunUntilIdle(); |
| 758 } | 758 } |
| 759 | 759 |
| 760 } // namespace dom_distiller | 760 } // namespace dom_distiller |
| OLD | NEW |