Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1237)

Side by Side Diff: chrome/installer/util/self_reg_work_item.cc

Issue 1882923003: Add best-effort/allow rollback flags on WorkItem. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@simple_list_tests
Patch Set: fix build error Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698