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

Side by Side Diff: net/base/escape.h

Issue 6322001: Remove wstring from TemplateURL and friends.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/webdata/web_database_unittest.cc ('k') | net/base/escape.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 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 NET_BASE_ESCAPE_H_ 5 #ifndef NET_BASE_ESCAPE_H_
6 #define NET_BASE_ESCAPE_H_ 6 #define NET_BASE_ESCAPE_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 // Escapes characters in text suitable for use as a query parameter value. 118 // Escapes characters in text suitable for use as a query parameter value.
119 // We %XX everything except alphanumerics and -_.!~*'() 119 // We %XX everything except alphanumerics and -_.!~*'()
120 // Spaces change to "+" unless you pass usePlus=false. 120 // Spaces change to "+" unless you pass usePlus=false.
121 // This is basically the same as encodeURIComponent in javascript. 121 // This is basically the same as encodeURIComponent in javascript.
122 // For the string16 version, we do a conversion to charset before encoding the 122 // For the string16 version, we do a conversion to charset before encoding the
123 // string. If the charset doesn't exist, we return false. 123 // string. If the charset doesn't exist, we return false.
124 std::string EscapeQueryParamValue(const std::string& text, bool use_plus); 124 std::string EscapeQueryParamValue(const std::string& text, bool use_plus);
125 bool EscapeQueryParamValue(const string16& text, const char* codepage, 125 bool EscapeQueryParamValue(const string16& text, const char* codepage,
126 bool use_plus, string16* escaped); 126 bool use_plus, string16* escaped);
127 127
128 // A specialized version of EscapeQueryParamValue for wide strings that 128 // A specialized version of EscapeQueryParamValue for string16s that
129 // assumes the codepage is UTF8. This is provided as a convenience. 129 // assumes the codepage is UTF8. This is provided as a convenience.
130 std::wstring EscapeQueryParamValueUTF8(const std::wstring& text, bool use_plus); 130 string16 EscapeQueryParamValueUTF8(const string16& text, bool use_plus);
131 131
132 #endif // NET_BASE_ESCAPE_H_ 132 #endif // NET_BASE_ESCAPE_H_
OLDNEW
« no previous file with comments | « chrome/browser/webdata/web_database_unittest.cc ('k') | net/base/escape.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698