| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/common/win/install_utils.h" | 5 #include "cloud_print/common/win/install_utils.h" |
| 6 | 6 |
| 7 #include <windows.h> | 7 #include <windows.h> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/file_version_info_win.h" | 10 #include "base/file_version_info_win.h" |
| 11 #include "base/files/file_path.h" | 11 #include "base/files/file_path.h" |
| 12 #include "base/files/file_util.h" | 12 #include "base/files/file_util.h" |
| 13 #include "base/path_service.h" | 13 #include "base/path_service.h" |
| 14 #include "base/process/launch.h" | 14 #include "base/process/launch.h" |
| 15 #include "base/win/registry.h" | 15 #include "base/win/registry.h" |
| 16 #include "cloud_print/common/win/cloud_print_utils.h" | 16 #include "cloud_print/common/win/cloud_print_utils.h" |
| 17 | 17 |
| 18 namespace cloud_print { | 18 namespace cloud_print { |
| 19 | 19 |
| 20 namespace { | 20 namespace { |
| 21 | 21 |
| 22 // Google Update related constants. | 22 // Google Update related constants. |
| 23 const wchar_t kClientsKey[] = L"SOFTWARE\\Google\\Update\\Clients\\"; | 23 const wchar_t kClientsKey[] = L"SOFTWARE\\Google\\Update\\Clients\\"; |
| 24 const wchar_t kClientStateKey[] = L"SOFTWARE\\Google\\Update\\ClientState\\"; | 24 const wchar_t kClientStateKey[] = L"SOFTWARE\\Google\\Update\\ClientState\\"; |
| 25 const wchar_t* kUsageKey = L"dr"; | |
| 26 const wchar_t kVersionKey[] = L"pv"; | 25 const wchar_t kVersionKey[] = L"pv"; |
| 27 const wchar_t kNameKey[] = L"name"; | 26 const wchar_t kNameKey[] = L"name"; |
| 28 | 27 |
| 29 enum InstallerResult { | 28 enum InstallerResult { |
| 30 INSTALLER_RESULT_FAILED_CUSTOM_ERROR = 1, | 29 INSTALLER_RESULT_FAILED_CUSTOM_ERROR = 1, |
| 31 INSTALLER_RESULT_FAILED_SYSTEM_ERROR = 3, | 30 INSTALLER_RESULT_FAILED_SYSTEM_ERROR = 3, |
| 32 }; | 31 }; |
| 33 | 32 |
| 34 const wchar_t kRegValueInstallerResult[] = L"InstallerResult"; | 33 const wchar_t kRegValueInstallerResult[] = L"InstallerResult"; |
| 35 const wchar_t kRegValueInstallerResultUIString[] = L"InstallerResultUIString"; | 34 const wchar_t kRegValueInstallerResultUIString[] = L"InstallerResultUIString"; |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 210 | 209 |
| 211 bool IsProgramsFilesParent(const base::FilePath& path) { | 210 bool IsProgramsFilesParent(const base::FilePath& path) { |
| 212 base::FilePath program_files; | 211 base::FilePath program_files; |
| 213 if (!PathService::Get(base::DIR_PROGRAM_FILESX86, &program_files)) | 212 if (!PathService::Get(base::DIR_PROGRAM_FILESX86, &program_files)) |
| 214 return false; | 213 return false; |
| 215 return program_files.IsParent(path); | 214 return program_files.IsParent(path); |
| 216 } | 215 } |
| 217 | 216 |
| 218 } // namespace cloud_print | 217 } // namespace cloud_print |
| 219 | 218 |
| OLD | NEW |