diff options
author | joi@chromium.org <joi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-18 02:15:12 +0000 |
---|---|---|
committer | joi@chromium.org <joi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-18 02:15:12 +0000 |
commit | 176ab8038d7c1b291dcec51f29ed81f9fba52b8e (patch) | |
tree | cf837db3622bc957a21309e96005e16a94cf594d /net | |
parent | ab9cb282693fb8e36b2d035fccd07d4b93acf65f (diff) | |
download | chromium_src-176ab8038d7c1b291dcec51f29ed81f9fba52b8e.zip chromium_src-176ab8038d7c1b291dcec51f29ed81f9fba52b8e.tar.gz chromium_src-176ab8038d7c1b291dcec51f29ed81f9fba52b8e.tar.bz2 |
Add shared macros for stringizing and converting ANSI string constants
(in particular defined by macros) to wide string constants.
Convert existing locally-defined stringizing to use the shared macros.
Unit tests for the shared macros.
This also fixes a minor bug in ceee_module_util.cc where I
accidentally quoted a string constant I only meant to convert to wide
(this caused no bug, but was unintended, so the change in semantics
in that file in the current change is intentional).
BUG=none
TEST=automated tests
Review URL: http://codereview.chromium.org/5103001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@66579 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net')
-rw-r--r-- | net/base/net_errors.cc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/net/base/net_errors.cc b/net/base/net_errors.cc index 18f6661..6c0e09c 100644 --- a/net/base/net_errors.cc +++ b/net/base/net_errors.cc @@ -5,8 +5,7 @@ #include "net/base/net_errors.h" #include "base/basictypes.h" - -#define STRINGIZE(x) #x +#include "base/stringize_macros.h" namespace net { @@ -19,7 +18,7 @@ const char* ErrorToString(int error) { switch (error) { #define NET_ERROR(label, value) \ case ERR_ ## label: \ - return "net::" STRINGIZE(ERR_ ## label); + return "net::" STRINGIZE_NO_EXPANSION(ERR_ ## label); #include "net/base/net_error_list.h" #undef NET_ERROR default: |