| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/copy_reg_key_work_item.h" | 5 #include "chrome/installer/util/copy_reg_key_work_item.h" |
| 6 | 6 |
| 7 #include <shlwapi.h> | 7 #include <shlwapi.h> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/win/registry.h" | 10 #include "base/win/registry.h" |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 if (result != ERROR_SUCCESS && result != ERROR_FILE_NOT_FOUND) { | 91 if (result != ERROR_SUCCESS && result != ERROR_FILE_NOT_FOUND) { |
| 92 LOG(ERROR) << "Failed to delete key at " << dest_key_path_ | 92 LOG(ERROR) << "Failed to delete key at " << dest_key_path_ |
| 93 << " in rollback, result: " << result; | 93 << " in rollback, result: " << result; |
| 94 } | 94 } |
| 95 | 95 |
| 96 // Restore the old contents. The restoration takes on its default security | 96 // Restore the old contents. The restoration takes on its default security |
| 97 // attributes; any custom attributes are lost. | 97 // attributes; any custom attributes are lost. |
| 98 if (!backup_.WriteTo(predefined_root_, dest_key_path_.c_str())) | 98 if (!backup_.WriteTo(predefined_root_, dest_key_path_.c_str())) |
| 99 LOG(ERROR) << "Failed to restore key in rollback."; | 99 LOG(ERROR) << "Failed to restore key in rollback."; |
| 100 } | 100 } |
| OLD | NEW |