| 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 "cloud_print/virtual_driver/win/virtual_driver_helpers.h" | 5 #include "cloud_print/virtual_driver/win/virtual_driver_helpers.h" |
| 6 | 6 |
| 7 #include <windows.h> | 7 #include <windows.h> |
| 8 #include <winspool.h> | 8 #include <winspool.h> |
| 9 | 9 |
| 10 #include "base/files/file_util.h" | 10 #include "base/files/file_util.h" |
| 11 #include "base/logging.h" | 11 #include "base/logging.h" |
| 12 #include "base/strings/string16.h" | 12 #include "base/strings/string16.h" |
| 13 #include "base/win/windows_version.h" | 13 #include "base/win/windows_version.h" |
| 14 #include "cloud_print/common/win/cloud_print_utils.h" | 14 #include "cloud_print/common/win/cloud_print_utils.h" |
| 15 | 15 |
| 16 namespace cloud_print { | 16 namespace cloud_print { |
| 17 | 17 |
| 18 const size_t kMaxMessageLen = 100; | |
| 19 | |
| 20 void DisplayWindowsMessage(HWND hwnd, HRESULT hr, | 18 void DisplayWindowsMessage(HWND hwnd, HRESULT hr, |
| 21 const base::string16 &caption) { | 19 const base::string16 &caption) { |
| 22 ::MessageBox(hwnd, GetErrorMessage(hr).c_str(), caption.c_str(), MB_OK); | 20 ::MessageBox(hwnd, GetErrorMessage(hr).c_str(), caption.c_str(), MB_OK); |
| 23 } | 21 } |
| 24 | 22 |
| 25 base::string16 GetPortMonitorDllName() { | 23 base::string16 GetPortMonitorDllName() { |
| 26 if (IsSystem64Bit()) { | 24 if (IsSystem64Bit()) { |
| 27 return base::string16(L"gcp_portmon64.dll"); | 25 return base::string16(L"gcp_portmon64.dll"); |
| 28 } else { | 26 } else { |
| 29 return base::string16(L"gcp_portmon.dll"); | 27 return base::string16(L"gcp_portmon.dll"); |
| (...skipping 22 matching lines...) Expand all Loading... |
| 52 | 50 |
| 53 bool IsSystem64Bit() { | 51 bool IsSystem64Bit() { |
| 54 base::win::OSInfo::WindowsArchitecture arch = | 52 base::win::OSInfo::WindowsArchitecture arch = |
| 55 base::win::OSInfo::GetInstance()->architecture(); | 53 base::win::OSInfo::GetInstance()->architecture(); |
| 56 return (arch == base::win::OSInfo::X64_ARCHITECTURE) || | 54 return (arch == base::win::OSInfo::X64_ARCHITECTURE) || |
| 57 (arch == base::win::OSInfo::IA64_ARCHITECTURE); | 55 (arch == base::win::OSInfo::IA64_ARCHITECTURE); |
| 58 } | 56 } |
| 59 | 57 |
| 60 } | 58 } |
| 61 | 59 |
| OLD | NEW |