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

Unified Diff: chrome/browser/sync/util/sync_types.h

Issue 340055: String cleanup in sync code (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 1 month 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/browser/sync/util/query_helpers_unittest.cc ('k') | chrome/browser/sync/util/user_settings.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/util/sync_types.h
===================================================================
--- chrome/browser/sync/util/sync_types.h (revision 30948)
+++ chrome/browser/sync/util/sync_types.h (working copy)
@@ -12,34 +12,11 @@
#include "base/string_util.h"
#include "build/build_config.h"
-// TODO(timsteele): Use base/file_path.h instead of PathString.
-#if defined(OS_WIN)
-#define PATHSTRING_IS_STD_STRING 0
-typedef std::wstring PathString;
-
-// This ugly double define hack is needed to allow the following pattern on
-// Windows:
-//
-// #define FOO "Foo"
-// #define FOO_PATH_STRING PSTR("Foo")
-//
-// TODO(sync): find out if we can avoid this.
-#define PSTR_UGLY_DOUBLE_DEFINE_HACK(s) L##s
-#define PSTR(s) PSTR_UGLY_DOUBLE_DEFINE_HACK(s)
-#define PSTR_CHAR wchar_t
-
-inline size_t PathLen(const wchar_t* s) {
- return wcslen(s);
-}
-
-#else // Mac and Linux
-#define PATHSTRING_IS_STD_STRING 1
+#define PSTR(s) s
#define PSTR_CHAR char
typedef std::string PathString;
-#define PSTR(s) s
-inline size_t PathLen(const char* s) {
- return strlen(s);
-}
+
+#if !defined(OS_WIN)
// Mac OS X typedef's BOOL to signed char, so we do that on Linux too.
typedef signed char BOOL;
typedef int32 LONG;
« no previous file with comments | « chrome/browser/sync/util/query_helpers_unittest.cc ('k') | chrome/browser/sync/util/user_settings.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698