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

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

Issue 1384433002: distiller: Retires support of CreateNewContext. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Synced. Created 5 years, 3 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
« no previous file with comments | « components/dom_distiller/core/distiller_page.h ('k') | components/dom_distiller/core/fake_distiller_page.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/dom_distiller/core/distiller_page.cc
diff --git a/components/dom_distiller/core/distiller_page.cc b/components/dom_distiller/core/distiller_page.cc
index 97b86e84d3ed7ca62407ef3b37ea3aac792871b8..1e7940980173d2f720179e2e72b80399227ed106 100644
--- a/components/dom_distiller/core/distiller_page.cc
+++ b/components/dom_distiller/core/distiller_page.cc
@@ -26,12 +26,10 @@ namespace {
const char* kOptionsPlaceholder = "$$OPTIONS";
const char* kStringifyPlaceholder = "$$STRINGIFY";
-const char* kNewContextPlaceholder = "$$NEW_CONTEXT";
std::string GetDistillerScriptWithOptions(
const dom_distiller::proto::DomDistillerOptions& options,
- bool stringify_output,
- bool create_new_context) {
+ bool stringify_output) {
std::string script = ResourceBundle::GetSharedInstance()
.GetRawDataResource(IDR_DISTILLER_JS)
.as_string();
@@ -61,15 +59,6 @@ std::string GetDistillerScriptWithOptions(
strlen(kStringifyPlaceholder),
stringify);
- std::string new_context = create_new_context ? "true" : "false";
- size_t new_context_offset = script.find(kNewContextPlaceholder);
- DCHECK_NE(std::string::npos, new_context_offset);
- DCHECK_EQ(std::string::npos,
- script.find(kNewContextPlaceholder, new_context_offset + 1));
- script = script.replace(new_context_offset,
- strlen(kNewContextPlaceholder),
- new_context);
-
return script;
}
@@ -92,8 +81,7 @@ void DistillerPage::DistillPage(
distiller_page_callback_ = callback;
distillation_start_ = base::TimeTicks::Now();
DistillPageImpl(gurl, GetDistillerScriptWithOptions(options,
- StringifyOutput(),
- CreateNewContext()));
+ StringifyOutput()));
}
void DistillerPage::OnDistillationDone(const GURL& page_url,
« no previous file with comments | « components/dom_distiller/core/distiller_page.h ('k') | components/dom_distiller/core/fake_distiller_page.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698