| Index: components/dom_distiller/core/fake_distiller.cc
|
| diff --git a/components/dom_distiller/core/fake_distiller.cc b/components/dom_distiller/core/fake_distiller.cc
|
| index 315490a49f2d6fd22f997b3bb321c639e825a3b7..077d08f7bab6bb0c12fbd09da060056347c5a2dc 100644
|
| --- a/components/dom_distiller/core/fake_distiller.cc
|
| +++ b/components/dom_distiller/core/fake_distiller.cc
|
| @@ -42,7 +42,7 @@ FakeDistiller::~FakeDistiller() {
|
|
|
| void FakeDistiller::DistillPage(
|
| const GURL& url,
|
| - scoped_ptr<DistillerPage> distiller_page,
|
| + std::unique_ptr<DistillerPage> distiller_page,
|
| const DistillationFinishedCallback& article_callback,
|
| const DistillationUpdateCallback& page_callback) {
|
| url_ = url;
|
| @@ -52,14 +52,14 @@ void FakeDistiller::DistillPage(
|
| base::ResetAndReturn(&distillation_initiated_callback_).Run();
|
| }
|
| if (execute_callback_) {
|
| - scoped_ptr<DistilledArticleProto> proto(new DistilledArticleProto);
|
| + std::unique_ptr<DistilledArticleProto> proto(new DistilledArticleProto);
|
| proto->add_pages()->set_url(url_.spec());
|
| PostDistillerCallback(std::move(proto));
|
| }
|
| }
|
|
|
| void FakeDistiller::RunDistillerCallback(
|
| - scoped_ptr<DistilledArticleProto> proto) {
|
| + std::unique_ptr<DistilledArticleProto> proto) {
|
| ASSERT_FALSE(execute_callback_) << "Cannot explicitly run the distiller "
|
| "callback for a fake distiller created "
|
| "with automatic callback execution.";
|
| @@ -71,16 +71,15 @@ void FakeDistiller::RunDistillerUpdateCallback(
|
| page_callback_.Run(update);
|
| }
|
|
|
| -
|
| void FakeDistiller::PostDistillerCallback(
|
| - scoped_ptr<DistilledArticleProto> proto) {
|
| + std::unique_ptr<DistilledArticleProto> proto) {
|
| base::ThreadTaskRunnerHandle::Get()->PostTask(
|
| FROM_HERE, base::Bind(&FakeDistiller::RunDistillerCallbackInternal,
|
| base::Unretained(this), base::Passed(&proto)));
|
| }
|
|
|
| void FakeDistiller::RunDistillerCallbackInternal(
|
| - scoped_ptr<DistilledArticleProto> proto) {
|
| + std::unique_ptr<DistilledArticleProto> proto) {
|
| EXPECT_FALSE(article_callback_.is_null());
|
|
|
| base::AutoReset<bool> dont_delete_this_in_callback(&destruction_allowed_,
|
|
|