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

Unified Diff: net/base/escape.h

Issue 7529043: Rename NET_API to NET_EXPORT, and rename NET_TEST to NET_EXPORT_PRIVATE. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 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: net/base/escape.h
===================================================================
--- net/base/escape.h (revision 95949)
+++ net/base/escape.h (working copy)
@@ -11,37 +11,37 @@
#include "base/basictypes.h"
#include "base/string16.h"
-#include "net/base/net_api.h"
+#include "net/base/net_export.h"
// Escaping --------------------------------------------------------------------
// Escape a file. This includes:
// non-printable, non-7bit, and (including space) "#%:<>?[\]^`{|}
-NET_API std::string EscapePath(const std::string& path);
+NET_EXPORT std::string EscapePath(const std::string& path);
// Escape application/x-www-form-urlencoded content. This includes:
// non-printable, non-7bit, and (including space) ?>=<;+'&%$#"![\]^`{|}
// Space is escaped as + (if use_plus is true) and other special characters
// as %XX (hex).
-NET_API std::string EscapeUrlEncodedData(const std::string& path,
- bool use_plus);
+NET_EXPORT std::string EscapeUrlEncodedData(const std::string& path,
+ bool use_plus);
// Escape all non-ASCII input.
-NET_API std::string EscapeNonASCII(const std::string& input);
+NET_EXPORT std::string EscapeNonASCII(const std::string& input);
// Escapes characters in text suitable for use as an external protocol handler
// command.
// We %XX everything except alphanumerics and %-_.!~*'() and the restricted
// chracters (;/?:@&=+$,).
-NET_API std::string EscapeExternalHandlerValue(const std::string& text);
+NET_EXPORT std::string EscapeExternalHandlerValue(const std::string& text);
// Append the given character to the output string, escaping the character if
// the character would be interpretted as an HTML delimiter.
-NET_API void AppendEscapedCharForHTML(char c, std::string* output);
+NET_EXPORT void AppendEscapedCharForHTML(char c, std::string* output);
// Escape chars that might cause this text to be interpretted as HTML tags.
-NET_API std::string EscapeForHTML(const std::string& text);
-NET_API string16 EscapeForHTML(const string16& text);
+NET_EXPORT std::string EscapeForHTML(const std::string& text);
+NET_EXPORT string16 EscapeForHTML(const string16& text);
// Unescaping ------------------------------------------------------------------
@@ -95,10 +95,10 @@
// which, after unescaping, is supposed to be interpreted as UTF-8, and then
// converted into full UTF-16 chars. This function won't tell you if any
// conversions need to take place, it only unescapes.
-NET_API std::string UnescapeURLComponent(const std::string& escaped_text,
+NET_EXPORT std::string UnescapeURLComponent(const std::string& escaped_text,
+ UnescapeRule::Type rules);
+NET_EXPORT string16 UnescapeURLComponent(const string16& escaped_text,
UnescapeRule::Type rules);
-NET_API string16 UnescapeURLComponent(const string16& escaped_text,
- UnescapeRule::Type rules);
// Unescapes the given substring as a URL, and then tries to interpret the
// result as being encoded as UTF-8. If the result is convertable into UTF-8, it
@@ -109,18 +109,18 @@
// decoding. If this isn't possible because an offset points past the end of
// the source strings or into the middle of a multibyte sequence, the offending
// offset will be set to string16::npos. |offset[s]_for_adjustment| may be NULL.
-NET_API string16 UnescapeAndDecodeUTF8URLComponent(
+NET_EXPORT string16 UnescapeAndDecodeUTF8URLComponent(
const std::string& text,
UnescapeRule::Type rules,
size_t* offset_for_adjustment);
-NET_API string16 UnescapeAndDecodeUTF8URLComponentWithOffsets(
+NET_EXPORT string16 UnescapeAndDecodeUTF8URLComponentWithOffsets(
const std::string& text,
UnescapeRule::Type rules,
std::vector<size_t>* offsets_for_adjustment);
// Unescape the following ampersand character codes from |text|:
// &lt; &gt; &amp; &quot; &#39;
-NET_API string16 UnescapeForHTML(const string16& text);
+NET_EXPORT string16 UnescapeForHTML(const string16& text);
// Deprecated ------------------------------------------------------------------
@@ -130,20 +130,23 @@
// This is basically the same as encodeURIComponent in javascript.
// For the string16 version, we do a conversion to charset before encoding the
// string. If the charset doesn't exist, we return false.
-NET_API std::string EscapeQueryParamValue(const std::string& text,
- bool use_plus);
-NET_API bool EscapeQueryParamValue(const string16& text, const char* codepage,
- bool use_plus, string16* escaped);
+NET_EXPORT std::string EscapeQueryParamValue(const std::string& text,
+ bool use_plus);
+NET_EXPORT bool EscapeQueryParamValue(const string16& text,
+ const char* codepage,
+ bool use_plus,
+ string16* escaped);
// A specialized version of EscapeQueryParamValue for string16s that
// assumes the codepage is UTF8. This is provided as a convenience.
-NET_API string16 EscapeQueryParamValueUTF8(const string16& text, bool use_plus);
+NET_EXPORT string16 EscapeQueryParamValueUTF8(const string16& text,
+ bool use_plus);
// Private Functions (Exposed for Unit Testing) --------------------------------
// A function called by std::for_each that will adjust any offset which occurs
// after one or more encoded characters.
-struct NET_TEST AdjustEncodingOffset {
+struct NET_EXPORT_PRIVATE AdjustEncodingOffset {
typedef std::vector<size_t> Adjustments;
explicit AdjustEncodingOffset(const Adjustments& adjustments);
« no previous file with comments | « net/base/dnssec_keyset.h ('k') | net/base/file_stream.h » ('j') | net/base/net_export.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698