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

Unified Diff: ceee/ie/common/ceee_module_util.cc

Issue 5103001: Add shared macros for stringizing and converting ANSI string constants... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 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 | « base/stringize_macros_unittest.cc ('k') | media/base/media_posix.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ceee/ie/common/ceee_module_util.cc
===================================================================
--- ceee/ie/common/ceee_module_util.cc (revision 66180)
+++ ceee/ie/common/ceee_module_util.cc (working copy)
@@ -10,17 +10,13 @@
#include "base/file_util.h"
#include "base/logging.h"
#include "base/path_service.h"
+#include "base/stringize_macros.h"
#include "base/win/registry.h"
#include "ceee/common/process_utils_win.h"
#include "chrome/installer/util/google_update_constants.h"
#include "version.h" // NOLINT
-// TODO(joi@chromium.org): would be nice to move these (and non-L counterparts)
-// to e.g. base/string_util.h
-#define LSTRINGIZE2(x) L ## #x
-#define LSTRINGIZE(x) LSTRINGIZE2(x)
-
namespace {
const wchar_t* kRegistryPath = L"SOFTWARE\\Google\\CEEE";
@@ -196,7 +192,7 @@
base::win::RegKey hkcu(HKEY_CURRENT_USER, kRegistryPath, KEY_READ);
success = hkcu.ReadValue(
kRegistryValueCrxInstalledByVersion, &version_string);
- return !success || version_string != LSTRINGIZE(CHROME_VERSION_STRING);
+ return !success || version_string != TO_L_STRING(CHROME_VERSION_STRING);
}
}
@@ -224,7 +220,7 @@
DCHECK(write_result);
write_result = key.WriteValue(kRegistryValueCrxInstalledByVersion,
- LSTRINGIZE(CHROME_VERSION_STRING));
+ TO_L_STRING(CHROME_VERSION_STRING));
}
bool IsCrxOrEmpty(const std::wstring& path) {
« no previous file with comments | « base/stringize_macros_unittest.cc ('k') | media/base/media_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698