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/self_reg_work_item.h" | 5 #include "chrome/installer/util/self_reg_work_item.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/strings/string_util.h" | 8 #include "base/strings/string_util.h" |
9 #include "base/strings/stringprintf.h" | 9 #include "base/strings/stringprintf.h" |
10 #include "chrome/installer/util/logging_installer.h" | 10 #include "chrome/installer/util/logging_installer.h" |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 } else { | 83 } else { |
84 LOG(ERROR) << "COM registration export function not found"; | 84 LOG(ERROR) << "COM registration export function not found"; |
85 } | 85 } |
86 ::FreeLibrary(dll_module); | 86 ::FreeLibrary(dll_module); |
87 } else { | 87 } else { |
88 PLOG(WARNING) << "Failed to load: " << dll_path_; | 88 PLOG(WARNING) << "Failed to load: " << dll_path_; |
89 } | 89 } |
90 return success; | 90 return success; |
91 } | 91 } |
92 | 92 |
93 bool SelfRegWorkItem::Do() { | 93 bool SelfRegWorkItem::DoImpl() { |
94 bool success = RegisterDll(do_register_); | 94 return RegisterDll(do_register_); |
95 if (ignore_failure_) | |
96 success = true; | |
97 return success; | |
98 } | 95 } |
99 | 96 |
100 void SelfRegWorkItem::Rollback() { | 97 void SelfRegWorkItem::RollbackImpl() { |
101 if (!ignore_failure_) { | 98 RegisterDll(!do_register_); |
102 RegisterDll(!do_register_); | |
103 } | |
104 } | 99 } |
OLD | NEW |