| 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 "chrome/installer/util/product.h" | 5 #include "chrome/installer/util/product.h" | 
| 6 | 6 | 
| 7 #include <algorithm> | 7 #include <algorithm> | 
| 8 | 8 | 
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" | 
| 10 #include "base/logging.h" | 10 #include "base/logging.h" | 
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 109     ::CloseHandle(pi.hProcess); | 109     ::CloseHandle(pi.hProcess); | 
| 110   } | 110   } | 
| 111 | 111 | 
| 112   return success; | 112   return success; | 
| 113 } | 113 } | 
| 114 | 114 | 
| 115 bool Product::SetMsiMarker(bool system_install, bool set) const { | 115 bool Product::SetMsiMarker(bool system_install, bool set) const { | 
| 116   HKEY reg_root = system_install ? HKEY_LOCAL_MACHINE : HKEY_CURRENT_USER; | 116   HKEY reg_root = system_install ? HKEY_LOCAL_MACHINE : HKEY_CURRENT_USER; | 
| 117   RegKey client_state_key; | 117   RegKey client_state_key; | 
| 118   LONG result = client_state_key.Open(reg_root, | 118   LONG result = client_state_key.Open(reg_root, | 
| 119       distribution_->GetStateKey().c_str(), KEY_READ | KEY_WRITE); | 119                                       distribution_->GetStateKey().c_str(), | 
|  | 120                                       KEY_READ | KEY_WRITE | KEY_WOW64_32KEY); | 
| 120   if (result == ERROR_SUCCESS) { | 121   if (result == ERROR_SUCCESS) { | 
| 121     result = client_state_key.WriteValue(google_update::kRegMSIField, | 122     result = client_state_key.WriteValue(google_update::kRegMSIField, | 
| 122                                          set ? 1 : 0); | 123                                          set ? 1 : 0); | 
| 123   } | 124   } | 
| 124 | 125 | 
| 125   LOG_IF(ERROR, result != ERROR_SUCCESS) << "Failed to Open or Write MSI value" | 126   LOG_IF(ERROR, result != ERROR_SUCCESS) << "Failed to Open or Write MSI value" | 
| 126       "to client state key. error: " << result; | 127       "to client state key. error: " << result; | 
| 127 | 128 | 
| 128   return (result == ERROR_SUCCESS); | 129   return (result == ERROR_SUCCESS); | 
| 129 } | 130 } | 
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 165   if (distribution_->HasUserExperiments()) { | 166   if (distribution_->HasUserExperiments()) { | 
| 166     VLOG(1) << "LaunchUserExperiment status: " << status << " product: " | 167     VLOG(1) << "LaunchUserExperiment status: " << status << " product: " | 
| 167             << distribution_->GetDisplayName() | 168             << distribution_->GetDisplayName() | 
| 168             << " system_level: " << system_level; | 169             << " system_level: " << system_level; | 
| 169     operations_->LaunchUserExperiment( | 170     operations_->LaunchUserExperiment( | 
| 170         setup_path, options_, status, system_level); | 171         setup_path, options_, status, system_level); | 
| 171   } | 172   } | 
| 172 } | 173 } | 
| 173 | 174 | 
| 174 }  // namespace installer | 175 }  // namespace installer | 
| OLD | NEW | 
|---|