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

Unified Diff: chrome/common/net/url_util.cc

Issue 10411025: Reverted 136345 - Ran into GAIA dosserver issues in prod for http://accounts.google.com. We are goi… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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
« no previous file with comments | « chrome/common/net/url_util.h ('k') | chrome/common/net/url_util_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/net/url_util.cc
diff --git a/chrome/common/net/url_util.cc b/chrome/common/net/url_util.cc
index 9d58317d09fd12dad126ad84bedd7ede083f4c75..c72c2087abf9ae2f1e65821e146f2fe920ce8da1 100644
--- a/chrome/common/net/url_util.cc
+++ b/chrome/common/net/url_util.cc
@@ -47,6 +47,7 @@ GURL AppendQueryParameter(const GURL& url,
return url.ReplaceComponents(replacements);
}
+
GURL AppendOrReplaceQueryParameter(const GURL& url,
const std::string& name,
const std::string& value) {
@@ -90,30 +91,4 @@ GURL AppendOrReplaceQueryParameter(const GURL& url,
return url.ReplaceComponents(replacements);
}
-bool GetValueForKeyInQuery(const GURL& url,
- const std::string& search_key,
- std::string* out_value) {
- url_parse::Component query = url.parsed_for_possibly_invalid_spec().query;
- url_parse::Component key, value;
- while (url_parse::ExtractQueryKeyValue(
- url.spec().c_str(), &query, &key, &value)) {
- if (key.is_nonempty()) {
- std::string key_string = url.spec().substr(key.begin, key.len);
- if (key_string == search_key) {
- if (value.is_nonempty()) {
- *out_value = net::UnescapeURLComponent(
- url.spec().substr(value.begin, value.len),
- net::UnescapeRule::SPACES |
- net::UnescapeRule::URL_SPECIAL_CHARS |
- net::UnescapeRule::REPLACE_PLUS_WITH_SPACE);
- } else {
- *out_value = "";
- }
- return true;
- }
- }
- }
- return false;
-}
-
} // namespace chrome_common_net
« no previous file with comments | « chrome/common/net/url_util.h ('k') | chrome/common/net/url_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698