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/fake_distiller.h" | 5 #include "components/dom_distiller/core/fake_distiller.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/auto_reset.h" | 9 #include "base/auto_reset.h" |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
11 #include "base/callback_helpers.h" | 11 #include "base/callback_helpers.h" |
12 #include "base/location.h" | 12 #include "base/location.h" |
13 #include "base/single_thread_task_runner.h" | 13 #include "base/single_thread_task_runner.h" |
14 #include "base/thread_task_runner_handle.h" | 14 #include "base/threading/thread_task_runner_handle.h" |
15 #include "testing/gtest/include/gtest/gtest.h" | 15 #include "testing/gtest/include/gtest/gtest.h" |
16 | 16 |
17 namespace dom_distiller { | 17 namespace dom_distiller { |
18 namespace test { | 18 namespace test { |
19 | 19 |
20 MockDistillerFactory::MockDistillerFactory() {} | 20 MockDistillerFactory::MockDistillerFactory() {} |
21 MockDistillerFactory::~MockDistillerFactory() {} | 21 MockDistillerFactory::~MockDistillerFactory() {} |
22 | 22 |
23 FakeDistiller::FakeDistiller(bool execute_callback) | 23 FakeDistiller::FakeDistiller(bool execute_callback) |
24 : execute_callback_(execute_callback), | 24 : execute_callback_(execute_callback), |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 EXPECT_FALSE(article_callback_.is_null()); | 83 EXPECT_FALSE(article_callback_.is_null()); |
84 | 84 |
85 base::AutoReset<bool> dont_delete_this_in_callback(&destruction_allowed_, | 85 base::AutoReset<bool> dont_delete_this_in_callback(&destruction_allowed_, |
86 false); | 86 false); |
87 article_callback_.Run(std::move(proto)); | 87 article_callback_.Run(std::move(proto)); |
88 article_callback_.Reset(); | 88 article_callback_.Reset(); |
89 } | 89 } |
90 | 90 |
91 } // namespace test | 91 } // namespace test |
92 } // namespace dom_distiller | 92 } // namespace dom_distiller |
OLD | NEW |