| OLD | NEW |
| 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 "chrome/browser/chrome_notification_types.h" | 7 #include "chrome/browser/chrome_notification_types.h" |
| 8 #include "chrome/browser/dom_distiller/dom_distiller_service_factory.h" | 8 #include "chrome/browser/dom_distiller/dom_distiller_service_factory.h" |
| 9 #include "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
| 10 #include "components/dom_distiller/core/distilled_page_prefs.h" | 10 #include "components/dom_distiller/core/distilled_page_prefs.h" |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 const content::NotificationDetails& details) { | 38 const content::NotificationDetails& details) { |
| 39 DCHECK_EQ(chrome::NOTIFICATION_PROFILE_DESTROYED, type); | 39 DCHECK_EQ(chrome::NOTIFICATION_PROFILE_DESTROYED, type); |
| 40 DCHECK_EQ(profile_, content::Source<Profile>(source).ptr()); | 40 DCHECK_EQ(profile_, content::Source<Profile>(source).ptr()); |
| 41 delete this; | 41 delete this; |
| 42 } | 42 } |
| 43 | 43 |
| 44 syncer::SyncableService* LazyDomDistillerService::GetSyncableService() const { | 44 syncer::SyncableService* LazyDomDistillerService::GetSyncableService() const { |
| 45 return instance()->GetSyncableService(); | 45 return instance()->GetSyncableService(); |
| 46 } | 46 } |
| 47 | 47 |
| 48 bool LazyDomDistillerService::HasEntry(const std::string& entry_id) { |
| 49 return instance()->HasEntry(entry_id); |
| 50 } |
| 51 |
| 52 std::string LazyDomDistillerService::GetUrlForEntry( |
| 53 const std::string& entry_id) { |
| 54 return instance()->GetUrlForEntry(entry_id); |
| 55 } |
| 56 |
| 48 const std::string LazyDomDistillerService::AddToList( | 57 const std::string LazyDomDistillerService::AddToList( |
| 49 const GURL& url, | 58 const GURL& url, |
| 50 scoped_ptr<DistillerPage> distiller_page, | 59 scoped_ptr<DistillerPage> distiller_page, |
| 51 const ArticleAvailableCallback& article_cb) { | 60 const ArticleAvailableCallback& article_cb) { |
| 52 return instance()->AddToList(url, distiller_page.Pass(), article_cb); | 61 return instance()->AddToList(url, distiller_page.Pass(), article_cb); |
| 53 } | 62 } |
| 54 | 63 |
| 55 std::vector<ArticleEntry> LazyDomDistillerService::GetEntries() const { | 64 std::vector<ArticleEntry> LazyDomDistillerService::GetEntries() const { |
| 56 return instance()->GetEntries(); | 65 return instance()->GetEntries(); |
| 57 } | 66 } |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 | 102 |
| 94 void LazyDomDistillerService::RemoveObserver(DomDistillerObserver* observer) { | 103 void LazyDomDistillerService::RemoveObserver(DomDistillerObserver* observer) { |
| 95 instance()->RemoveObserver(observer); | 104 instance()->RemoveObserver(observer); |
| 96 } | 105 } |
| 97 | 106 |
| 98 DistilledPagePrefs* LazyDomDistillerService::GetDistilledPagePrefs() { | 107 DistilledPagePrefs* LazyDomDistillerService::GetDistilledPagePrefs() { |
| 99 return instance()->GetDistilledPagePrefs(); | 108 return instance()->GetDistilledPagePrefs(); |
| 100 } | 109 } |
| 101 | 110 |
| 102 } // namespace dom_distiller | 111 } // namespace dom_distiller |
| OLD | NEW |