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

Unified Diff: chrome/install_static/policy_path_parser.cc

Issue 2942273002: Avoid some static initializers in Windows builds (Closed)
Patch Set: Use constexpr [] instead of constexpr const * Created 3 years, 6 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
« no previous file with comments | « no previous file | content/renderer/input/main_thread_event_queue.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/install_static/policy_path_parser.cc
diff --git a/chrome/install_static/policy_path_parser.cc b/chrome/install_static/policy_path_parser.cc
index a2c00ea1912c613584557f9e52906e4b6c56bbd6..b961332eebd57bd0d240876f2700ae1d33f7943e 100644
--- a/chrome/install_static/policy_path_parser.cc
+++ b/chrome/install_static/policy_path_parser.cc
@@ -14,17 +14,17 @@
namespace {
-const WCHAR* kMachineNamePolicyVarName = L"${machine_name}";
-const WCHAR* kUserNamePolicyVarName = L"${user_name}";
-const WCHAR* kWinDocumentsFolderVarName = L"${documents}";
-const WCHAR* kWinLocalAppDataFolderVarName = L"${local_app_data}";
-const WCHAR* kWinRoamingAppDataFolderVarName = L"${roaming_app_data}";
-const WCHAR* kWinProfileFolderVarName = L"${profile}";
-const WCHAR* kWinProgramDataFolderVarName = L"${global_app_data}";
-const WCHAR* kWinProgramFilesFolderVarName = L"${program_files}";
-const WCHAR* kWinWindowsFolderVarName = L"${windows}";
-const WCHAR* kWinClientName = L"${client_name}";
-const WCHAR* kWinSessionName = L"${session_name}";
+constexpr WCHAR kMachineNamePolicyVarName[] = L"${machine_name}";
+constexpr WCHAR kUserNamePolicyVarName[] = L"${user_name}";
+constexpr WCHAR kWinDocumentsFolderVarName[] = L"${documents}";
+constexpr WCHAR kWinLocalAppDataFolderVarName[] = L"${local_app_data}";
+constexpr WCHAR kWinRoamingAppDataFolderVarName[] = L"${roaming_app_data}";
+constexpr WCHAR kWinProfileFolderVarName[] = L"${profile}";
+constexpr WCHAR kWinProgramDataFolderVarName[] = L"${global_app_data}";
+constexpr WCHAR kWinProgramFilesFolderVarName[] = L"${program_files}";
+constexpr WCHAR kWinWindowsFolderVarName[] = L"${windows}";
+constexpr WCHAR kWinClientName[] = L"${client_name}";
+constexpr WCHAR kWinSessionName[] = L"${session_name}";
struct WinFolderNamesToCSIDLMapping {
const WCHAR* name;
@@ -32,7 +32,7 @@ struct WinFolderNamesToCSIDLMapping {
};
// Mapping from variable names to Windows CSIDL ids.
-const WinFolderNamesToCSIDLMapping kWinFolderMapping[] = {
+constexpr WinFolderNamesToCSIDLMapping kWinFolderMapping[] = {
{ kWinWindowsFolderVarName, CSIDL_WINDOWS},
{ kWinProgramFilesFolderVarName, CSIDL_PROGRAM_FILES},
{ kWinProgramDataFolderVarName, CSIDL_COMMON_APPDATA},
« no previous file with comments | « no previous file | content/renderer/input/main_thread_event_queue.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698