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

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

Issue 1125343004: Add a "Simplify Page" option to the print preview dialog (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update AUTHORS file to reflect the correct HP name used in the CLA Created 5 years, 7 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 cfe4fcb9a21398cec21c8f68c5cf8d9b13147cb7..5b972a3a3332d40ff7e9302f0cf06800c2724b3e 100644
--- a/components/dom_distiller/core/url_utils.cc
+++ b/components/dom_distiller/core/url_utils.cc
@@ -35,6 +35,12 @@ const GURL GetDistillerViewUrlFromUrl(const std::string& scheme,
return net::AppendOrReplaceQueryParameter(url, kUrlKey, view_url.spec());
}
+const GURL GetPrintPreviewDistillerViewUrlFromUrl(const std::string& scheme,
+ const GURL& view_url) {
+ GURL url(scheme + "://" + base::GenerateGUID() + "/printing/");
+ return net::AppendOrReplaceQueryParameter(url, kUrlKey, view_url.spec());
+}
+
const GURL GetOriginalUrlFromDistillerUrl(const GURL& url) {
if (!dom_distiller::url_utils::IsDistilledPage(url))
return url;

Powered by Google App Engine
This is Rietveld 408576698