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

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

Issue 442503002: Retrieve article original URL from entryID (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added tests for viewer, styling 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.h
diff --git a/components/dom_distiller/core/url_utils.h b/components/dom_distiller/core/url_utils.h
index 4dc73b39d88e82ef2661303b4b3e138c4662228e..ea332a19a46f56b880345b14dc3d8b7cd89d63c3 100644
--- a/components/dom_distiller/core/url_utils.h
+++ b/components/dom_distiller/core/url_utils.h
@@ -21,6 +21,12 @@ const GURL GetDistillerViewUrlFromEntryId(const std::string& scheme,
const GURL GetDistillerViewUrlFromUrl(const std::string& scheme,
const GURL& view_url);
+// Returns the value of the query parameter for the given |key| for a given URL.
+// If the URL is invalid or if the key is not found, returns an empty string.
+// If there are multiple keys found in the URL, returns the value for the first
+// key.
+std::string GetValueForKeyInUrl(const GURL& url, const std::string& key);
+
// Returns the value of the query parameter for the given path.
std::string GetValueForKeyInUrlPathQuery(const std::string& path,
const std::string& key);

Powered by Google App Engine
This is Rietveld 408576698