| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |