X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fcomponents%2Fdom_distiller%2Fcore%2Furl_utils.cc;h=cfe4fcb9a21398cec21c8f68c5cf8d9b13147cb7;hb=1afa4dd80ef85af7c90efaea6959db1d92330844;hp=65620962a0a2c2bbfe567d0b8d6a2954922eb11e;hpb=90762837333c13ccf56f2ad88e4481fc71e8d281;p=platform%2Fframework%2Fweb%2Fcrosswalk.git diff --git a/src/components/dom_distiller/core/url_utils.cc b/src/components/dom_distiller/core/url_utils.cc index 6562096..cfe4fcb 100644 --- a/src/components/dom_distiller/core/url_utils.cc +++ b/src/components/dom_distiller/core/url_utils.cc @@ -35,6 +35,16 @@ const GURL GetDistillerViewUrlFromUrl(const std::string& scheme, return net::AppendOrReplaceQueryParameter(url, kUrlKey, view_url.spec()); } +const GURL GetOriginalUrlFromDistillerUrl(const GURL& url) { + if (!dom_distiller::url_utils::IsDistilledPage(url)) + return url; + + std::string original_url_str; + net::GetValueForKeyInQuery(url, kUrlKey, &original_url_str); + + return GURL(original_url_str); +} + std::string GetValueForKeyInUrl(const GURL& url, const std::string& key) { if (!url.is_valid()) return "";