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

Unified Diff: chrome/browser/dom_distiller/dom_distiller_service_factory.cc

Issue 105723002: Add the scheme chrome-distiller:// and hook up data source. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed comments from jam@ Created 6 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/dom_distiller/dom_distiller_service_factory.cc
diff --git a/chrome/browser/dom_distiller/dom_distiller_service_factory.cc b/chrome/browser/dom_distiller/dom_distiller_service_factory.cc
index 7bc75c3e578eb930fe7717559ee30ce382d4dcc2..4d248d238d7133a866323384f7cb82f9e0b96fe7 100644
--- a/chrome/browser/dom_distiller/dom_distiller_service_factory.cc
+++ b/chrome/browser/dom_distiller/dom_distiller_service_factory.cc
@@ -5,12 +5,15 @@
#include "chrome/browser/dom_distiller/dom_distiller_service_factory.h"
#include "base/threading/sequenced_worker_pool.h"
+#include "chrome/common/url_constants.h"
#include "components/browser_context_keyed_service/browser_context_dependency_manager.h"
#include "components/dom_distiller/content/distiller_page_web_contents.h"
+#include "components/dom_distiller/content/dom_distiller_viewer_source.h"
#include "components/dom_distiller/core/distiller.h"
#include "components/dom_distiller/core/dom_distiller_store.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/browser_thread.h"
+#include "content/public/browser/url_data_source.h"
namespace dom_distiller {
@@ -41,6 +44,8 @@ DomDistillerServiceFactory::~DomDistillerServiceFactory() {}
BrowserContextKeyedService* DomDistillerServiceFactory::BuildServiceInstanceFor(
content::BrowserContext* profile) const {
+ content::URLDataSource::Add(
+ profile, new DomDistillerViewerSource(chrome::kDomDistillerScheme));
scoped_refptr<base::SequencedTaskRunner> background_task_runner =
content::BrowserThread::GetBlockingPool()->GetSequencedTaskRunner(

Powered by Google App Engine
This is Rietveld 408576698