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

Side by Side Diff: chrome/installer/util/install_util.cc

Issue 821673004: replace COMPILE_ASSERT with static_assert in chrome/installer/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 12 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 // 4 //
5 // See the corresponding header file for description of the functions in this 5 // See the corresponding header file for description of the functions in this
6 // file. 6 // file.
7 7
8 #include "chrome/installer/util/install_util.h" 8 #include "chrome/installer/util/install_util.h"
9 9
10 #include <shellapi.h> 10 #include <shellapi.h>
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 kStageRegisteringChrome, 80 kStageRegisteringChrome,
81 kStageRemovingOldVersions, 81 kStageRemovingOldVersions,
82 kStageFinishing, 82 kStageFinishing,
83 kStageConfiguringAutoLaunch, 83 kStageConfiguringAutoLaunch,
84 kStageCreatingVisualManifest, 84 kStageCreatingVisualManifest,
85 kStageDeferringToHigherVersion, 85 kStageDeferringToHigherVersion,
86 kStageUninstallingBinaries, 86 kStageUninstallingBinaries,
87 kStageUninstallingChromeFrame, 87 kStageUninstallingChromeFrame,
88 }; 88 };
89 89
90 COMPILE_ASSERT(installer::NUM_STAGES == arraysize(kStages), 90 static_assert(installer::NUM_STAGES == arraysize(kStages),
91 kStages_disagrees_with_Stage_comma_they_must_match_bang); 91 "kStages should have NUM_STAGES elements");
92 92
93 // Creates a zero-sized non-decorated foreground window that doesn't appear 93 // Creates a zero-sized non-decorated foreground window that doesn't appear
94 // in the taskbar. This is used as a parent window for calls to ShellExecuteEx 94 // in the taskbar. This is used as a parent window for calls to ShellExecuteEx
95 // in order for the UAC dialog to appear in the foreground and for focus 95 // in order for the UAC dialog to appear in the foreground and for focus
96 // to be returned to this process once the UAC task is dismissed. Returns 96 // to be returned to this process once the UAC task is dismissed. Returns
97 // NULL on failure, a handle to the UAC window on success. 97 // NULL on failure, a handle to the UAC window on success.
98 HWND CreateUACForegroundWindow() { 98 HWND CreateUACForegroundWindow() {
99 HWND foreground_window = ::CreateWindowEx(WS_EX_TOOLWINDOW, 99 HWND foreground_window = ::CreateWindowEx(WS_EX_TOOLWINDOW,
100 L"STATIC", 100 L"STATIC",
101 NULL, 101 NULL,
(...skipping 546 matching lines...) Expand 10 before | Expand all | Expand 10 after
648 // Open the program and see if it references the expected file. 648 // Open the program and see if it references the expected file.
649 base::File file; 649 base::File file;
650 BY_HANDLE_FILE_INFORMATION info = {}; 650 BY_HANDLE_FILE_INFORMATION info = {};
651 651
652 return (OpenForInfo(path, &file) && 652 return (OpenForInfo(path, &file) &&
653 GetInfo(file, &info) && 653 GetInfo(file, &info) &&
654 info.dwVolumeSerialNumber == file_info_.dwVolumeSerialNumber && 654 info.dwVolumeSerialNumber == file_info_.dwVolumeSerialNumber &&
655 info.nFileIndexHigh == file_info_.nFileIndexHigh && 655 info.nFileIndexHigh == file_info_.nFileIndexHigh &&
656 info.nFileIndexLow == file_info_.nFileIndexLow); 656 info.nFileIndexLow == file_info_.nFileIndexLow);
657 } 657 }
OLDNEW
« no previous file with comments | « chrome/installer/util/google_update_settings_unittest.cc ('k') | chrome/installer/util/installation_state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698