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

Unified Diff: components/dom_distiller/core/url_utils.cc

Issue 464973002: JavaScript that returns whether or not a page is an article (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Changed names to distillable Created 6 years, 4 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: components/dom_distiller/core/url_utils.cc
diff --git a/components/dom_distiller/core/url_utils.cc b/components/dom_distiller/core/url_utils.cc
index d5ca57d4e3554c8369397507601251c6ee91e6d1..5596b20efa9ea00d422700ec19cc2696c7b92bc9 100644
--- a/components/dom_distiller/core/url_utils.cc
+++ b/components/dom_distiller/core/url_utils.cc
@@ -8,7 +8,9 @@
#include "base/guid.h"
#include "components/dom_distiller/core/url_constants.h"
+#include "grit/component_resources.h"
#include "net/base/url_util.h"
+#include "ui/base/resource/resource_bundle.h"
#include "url/gurl.h"
namespace dom_distiller {
@@ -51,6 +53,11 @@ bool IsDistilledPage(const GURL& url) {
return url.is_valid() && url.scheme() == kDomDistillerScheme;
}
+std::string GetIsDistillableJs() {
+ return ResourceBundle::GetSharedInstance()
+ .GetRawDataResource(IDR_IS_DISTILLABLE_JS).as_string();
+}
+
} // namespace url_utils
} // namespace dom_distiller

Powered by Google App Engine
This is Rietveld 408576698