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

Side by Side Diff: cloud_print/virtual_driver/win/install/setup.cc

Issue 1306603003: Redefine CreateFileVersionInfoForCurrentModule() as a macro on Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use a real macro Created 5 years, 3 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
« no previous file with comments | « cloud_print/common/win/install_utils.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include <windows.h> 5 #include <windows.h>
6 #include <setupapi.h> // Must be included after windows.h 6 #include <setupapi.h> // Must be included after windows.h
7 #include <winspool.h> 7 #include <winspool.h>
8 #include <iomanip> 8 #include <iomanip>
9 9
10 #include "base/at_exit.h" 10 #include "base/at_exit.h"
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 return HRESULT_FROM_WIN32(ERROR_ACCESS_DENIED); 165 return HRESULT_FROM_WIN32(ERROR_ACCESS_DENIED);
166 } 166 }
167 } 167 }
168 } 168 }
169 return S_OK; 169 return S_OK;
170 } 170 }
171 171
172 DWORDLONG GetVersionNumber() { 172 DWORDLONG GetVersionNumber() {
173 DWORDLONG retval = 0; 173 DWORDLONG retval = 0;
174 scoped_ptr<FileVersionInfo> version_info( 174 scoped_ptr<FileVersionInfo> version_info(
175 FileVersionInfo::CreateFileVersionInfoForCurrentModule()); 175 CREATE_FILE_VERSION_INFO_FOR_CURRENT_MODULE());
176 if (version_info.get()) { 176 if (version_info.get()) {
177 FileVersionInfoWin* version_info_win = 177 FileVersionInfoWin* version_info_win =
178 static_cast<FileVersionInfoWin*>(version_info.get()); 178 static_cast<FileVersionInfoWin*>(version_info.get());
179 VS_FIXEDFILEINFO* fixed_file_info = version_info_win->fixed_file_info(); 179 VS_FIXEDFILEINFO* fixed_file_info = version_info_win->fixed_file_info();
180 retval = fixed_file_info->dwFileVersionMS; 180 retval = fixed_file_info->dwFileVersionMS;
181 retval <<= 32; 181 retval <<= 32;
182 retval |= fixed_file_info->dwFileVersionLS; 182 retval |= fixed_file_info->dwFileVersionLS;
183 } 183 }
184 return retval; 184 return retval;
185 } 185 }
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after
550 550
551 VLOG(0) << GetErrorMessage(retval) 551 VLOG(0) << GetErrorMessage(retval)
552 << " HRESULT=0x" << std::setbase(16) << retval; 552 << " HRESULT=0x" << std::setbase(16) << retval;
553 553
554 // Installer is silent by default as required by Google Update. 554 // Installer is silent by default as required by Google Update.
555 if (base::CommandLine::ForCurrentProcess()->HasSwitch("verbose")) { 555 if (base::CommandLine::ForCurrentProcess()->HasSwitch("verbose")) {
556 DisplayWindowsMessage(NULL, retval, LoadLocalString(IDS_DRIVER_NAME)); 556 DisplayWindowsMessage(NULL, retval, LoadLocalString(IDS_DRIVER_NAME));
557 } 557 }
558 return retval; 558 return retval;
559 } 559 }
OLDNEW
« no previous file with comments | « cloud_print/common/win/install_utils.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698