Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_NET_BROWSER_URL_UTIL_H_ | 5 #ifndef CHROME_BROWSER_NET_BROWSER_URL_UTIL_H_ |
| 6 #define CHROME_BROWSER_NET_BROWSER_URL_UTIL_H_ | 6 #define CHROME_BROWSER_NET_BROWSER_URL_UTIL_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 17 matching lines...) Expand all Loading... | |
| 28 // Examples: | 28 // Examples: |
| 29 // | 29 // |
| 30 // AppendQueryParameter(GURL("http://example.com"), "name", "value").spec() | 30 // AppendQueryParameter(GURL("http://example.com"), "name", "value").spec() |
| 31 // => "http://example.com?name=value" | 31 // => "http://example.com?name=value" |
| 32 // AppendQueryParameter(GURL("http://example.com?x=y"), "name", "value").spec() | 32 // AppendQueryParameter(GURL("http://example.com?x=y"), "name", "value").spec() |
| 33 // => "http://example.com?x=y&name=value" | 33 // => "http://example.com?x=y&name=value" |
| 34 GURL AppendQueryParameter(const GURL& url, | 34 GURL AppendQueryParameter(const GURL& url, |
| 35 const std::string& name, | 35 const std::string& name, |
| 36 const std::string& value); | 36 const std::string& value); |
| 37 | 37 |
| 38 // Looks for |search_key| in the query portion of |url|. Returns true if the | |
| 39 // key is found and sets |out_value| to the unescaped value for the key. | |
| 40 // Returns false if the key is not found. | |
| 41 bool GetValueForKeyInQuery(const GURL& url, const std::string& search_key, | |
| 42 std::string* out_value); | |
|
wtc
2012/01/21 01:42:41
The Style Guide recommends listing one parameter p
xiyuan
2012/01/21 16:48:42
Done.
| |
| 43 | |
| 38 } // namespace chrome_browser_net | 44 } // namespace chrome_browser_net |
| 39 | 45 |
| 40 #endif // CHROME_BROWSER_NET_BROWSER_URL_UTIL_H_ | 46 #endif // CHROME_BROWSER_NET_BROWSER_URL_UTIL_H_ |
| OLD | NEW |