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

Side by Side Diff: chrome/browser/dom_distiller/lazy_dom_distiller_service.cc

Issue 1551503002: Convert Pass()→std::move() in //chrome (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 months 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "chrome/browser/dom_distiller/lazy_dom_distiller_service.h" 5 #include "chrome/browser/dom_distiller/lazy_dom_distiller_service.h"
6 6
7 #include <utility>
8
7 #include "chrome/browser/chrome_notification_types.h" 9 #include "chrome/browser/chrome_notification_types.h"
8 #include "chrome/browser/dom_distiller/dom_distiller_service_factory.h" 10 #include "chrome/browser/dom_distiller/dom_distiller_service_factory.h"
9 #include "chrome/browser/profiles/profile.h" 11 #include "chrome/browser/profiles/profile.h"
10 #include "components/dom_distiller/core/distilled_page_prefs.h" 12 #include "components/dom_distiller/core/distilled_page_prefs.h"
11 #include "components/dom_distiller/core/distiller_page.h" 13 #include "components/dom_distiller/core/distiller_page.h"
12 #include "components/dom_distiller/core/dom_distiller_service.h" 14 #include "components/dom_distiller/core/dom_distiller_service.h"
13 #include "content/public/browser/notification_source.h" 15 #include "content/public/browser/notification_source.h"
14 16
15 namespace dom_distiller { 17 namespace dom_distiller {
16 18
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 53
52 std::string LazyDomDistillerService::GetUrlForEntry( 54 std::string LazyDomDistillerService::GetUrlForEntry(
53 const std::string& entry_id) { 55 const std::string& entry_id) {
54 return instance()->GetUrlForEntry(entry_id); 56 return instance()->GetUrlForEntry(entry_id);
55 } 57 }
56 58
57 const std::string LazyDomDistillerService::AddToList( 59 const std::string LazyDomDistillerService::AddToList(
58 const GURL& url, 60 const GURL& url,
59 scoped_ptr<DistillerPage> distiller_page, 61 scoped_ptr<DistillerPage> distiller_page,
60 const ArticleAvailableCallback& article_cb) { 62 const ArticleAvailableCallback& article_cb) {
61 return instance()->AddToList(url, distiller_page.Pass(), article_cb); 63 return instance()->AddToList(url, std::move(distiller_page), article_cb);
62 } 64 }
63 65
64 std::vector<ArticleEntry> LazyDomDistillerService::GetEntries() const { 66 std::vector<ArticleEntry> LazyDomDistillerService::GetEntries() const {
65 return instance()->GetEntries(); 67 return instance()->GetEntries();
66 } 68 }
67 69
68 scoped_ptr<ArticleEntry> LazyDomDistillerService::RemoveEntry( 70 scoped_ptr<ArticleEntry> LazyDomDistillerService::RemoveEntry(
69 const std::string& entry_id) { 71 const std::string& entry_id) {
70 return instance()->RemoveEntry(entry_id); 72 return instance()->RemoveEntry(entry_id);
71 } 73 }
72 74
73 scoped_ptr<ViewerHandle> LazyDomDistillerService::ViewEntry( 75 scoped_ptr<ViewerHandle> LazyDomDistillerService::ViewEntry(
74 ViewRequestDelegate* delegate, 76 ViewRequestDelegate* delegate,
75 scoped_ptr<DistillerPage> distiller_page, 77 scoped_ptr<DistillerPage> distiller_page,
76 const std::string& entry_id) { 78 const std::string& entry_id) {
77 return instance()->ViewEntry(delegate, distiller_page.Pass(), entry_id); 79 return instance()->ViewEntry(delegate, std::move(distiller_page), entry_id);
78 } 80 }
79 81
80 scoped_ptr<ViewerHandle> LazyDomDistillerService::ViewUrl( 82 scoped_ptr<ViewerHandle> LazyDomDistillerService::ViewUrl(
81 ViewRequestDelegate* delegate, 83 ViewRequestDelegate* delegate,
82 scoped_ptr<DistillerPage> distiller_page, 84 scoped_ptr<DistillerPage> distiller_page,
83 const GURL& url) { 85 const GURL& url) {
84 return instance()->ViewUrl(delegate, distiller_page.Pass(), url); 86 return instance()->ViewUrl(delegate, std::move(distiller_page), url);
85 } 87 }
86 88
87 scoped_ptr<DistillerPage> 89 scoped_ptr<DistillerPage>
88 LazyDomDistillerService::CreateDefaultDistillerPage( 90 LazyDomDistillerService::CreateDefaultDistillerPage(
89 const gfx::Size& render_view_size) { 91 const gfx::Size& render_view_size) {
90 return instance()->CreateDefaultDistillerPage(render_view_size); 92 return instance()->CreateDefaultDistillerPage(render_view_size);
91 } 93 }
92 94
93 scoped_ptr<DistillerPage> 95 scoped_ptr<DistillerPage>
94 LazyDomDistillerService::CreateDefaultDistillerPageWithHandle( 96 LazyDomDistillerService::CreateDefaultDistillerPageWithHandle(
95 scoped_ptr<SourcePageHandle> handle) { 97 scoped_ptr<SourcePageHandle> handle) {
96 return instance()->CreateDefaultDistillerPageWithHandle(handle.Pass()); 98 return instance()->CreateDefaultDistillerPageWithHandle(std::move(handle));
97 } 99 }
98 100
99 void LazyDomDistillerService::AddObserver(DomDistillerObserver* observer) { 101 void LazyDomDistillerService::AddObserver(DomDistillerObserver* observer) {
100 instance()->AddObserver(observer); 102 instance()->AddObserver(observer);
101 } 103 }
102 104
103 void LazyDomDistillerService::RemoveObserver(DomDistillerObserver* observer) { 105 void LazyDomDistillerService::RemoveObserver(DomDistillerObserver* observer) {
104 instance()->RemoveObserver(observer); 106 instance()->RemoveObserver(observer);
105 } 107 }
106 108
107 DistilledPagePrefs* LazyDomDistillerService::GetDistilledPagePrefs() { 109 DistilledPagePrefs* LazyDomDistillerService::GetDistilledPagePrefs() {
108 return instance()->GetDistilledPagePrefs(); 110 return instance()->GetDistilledPagePrefs();
109 } 111 }
110 112
111 } // namespace dom_distiller 113 } // namespace dom_distiller
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698