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 9c4ea3e41c3963caae5bbc4e65fa5b75fe6a2856..f6505375e468cd77384fb394534b73ec7548f07b 100644 |
--- a/chrome/browser/dom_distiller/dom_distiller_service_factory.cc |
+++ b/chrome/browser/dom_distiller/dom_distiller_service_factory.cc |
@@ -16,6 +16,8 @@ |
#include "components/leveldb_proto/proto_database_impl.h" |
#include "content/public/browser/browser_context.h" |
#include "content/public/browser/browser_thread.h" |
+#include "grit/components_resources.h" |
+#include "ui/base/resource/resource_bundle.h" |
namespace dom_distiller { |
@@ -66,8 +68,12 @@ KeyedService* DomDistillerServiceFactory::BuildServiceInstanceFor( |
scoped_ptr<DomDistillerStore> dom_distiller_store( |
new DomDistillerStore(db.Pass(), database_dir)); |
+ const std::string distiller_js_script = |
+ ResourceBundle::GetSharedInstance() |
+ .GetRawDataResource(IDR_DISTILLER_JS) |
+ .as_string(); |
scoped_ptr<DistillerPageFactory> distiller_page_factory( |
- new DistillerPageWebContentsFactory(profile)); |
+ new DistillerPageWebContentsFactory(profile, distiller_js_script)); |
scoped_ptr<DistillerURLFetcherFactory> distiller_url_fetcher_factory( |
new DistillerURLFetcherFactory(profile->GetRequestContext())); |