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

Side by Side Diff: chrome/installer/setup/setup_singleton.cc

Issue 2333853002: Support --delete-old-versions in setup.exe. (Closed)
Patch Set: CR grt/rkaplow #8-9 Created 4 years, 2 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
« no previous file with comments | « chrome/installer/setup/setup_singleton.h ('k') | chrome/installer/util/util_constants.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/setup/setup_singleton.h" 5 #include "chrome/installer/setup/setup_singleton.h"
6 6
7 #include <functional> 7 #include <functional>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 installer_state->Initialize(command_line, master_preferences, 119 installer_state->Initialize(command_line, master_preferences,
120 *original_state); 120 *original_state);
121 121
122 RecordSetupSingletonAcquisitionResultHistogram( 122 RecordSetupSingletonAcquisitionResultHistogram(
123 SETUP_SINGLETON_ACQUISITION_SUCCESS); 123 SETUP_SINGLETON_ACQUISITION_SUCCESS);
124 return setup_singleton; 124 return setup_singleton;
125 } 125 }
126 126
127 SetupSingleton::~SetupSingleton() = default; 127 SetupSingleton::~SetupSingleton() = default;
128 128
129 bool SetupSingleton::WaitForInterrupt(const base::TimeDelta& max_time) { 129 bool SetupSingleton::WaitForInterrupt(const base::TimeDelta& max_time) const {
130 const bool exit_event_signaled = exit_event_.TimedWait(max_time); 130 const bool exit_event_signaled = exit_event_.TimedWait(max_time);
131 return exit_event_signaled; 131 return exit_event_signaled;
132 } 132 }
133 133
134 SetupSingleton::ScopedHoldMutex::ScopedHoldMutex() = default; 134 SetupSingleton::ScopedHoldMutex::ScopedHoldMutex() = default;
135 135
136 SetupSingleton::ScopedHoldMutex::~ScopedHoldMutex() { 136 SetupSingleton::ScopedHoldMutex::~ScopedHoldMutex() {
137 if (mutex_ != INVALID_HANDLE_VALUE) 137 if (mutex_ != INVALID_HANDLE_VALUE)
138 ::ReleaseMutex(mutex_); 138 ::ReleaseMutex(mutex_);
139 } 139 }
(...skipping 15 matching lines...) Expand all
155 return false; 155 return false;
156 } 156 }
157 157
158 SetupSingleton::SetupSingleton(base::win::ScopedHandle setup_mutex, 158 SetupSingleton::SetupSingleton(base::win::ScopedHandle setup_mutex,
159 base::win::ScopedHandle exit_event) 159 base::win::ScopedHandle exit_event)
160 : setup_mutex_(std::move(setup_mutex)), exit_event_(std::move(exit_event)) { 160 : setup_mutex_(std::move(setup_mutex)), exit_event_(std::move(exit_event)) {
161 DCHECK(setup_mutex_.IsValid()); 161 DCHECK(setup_mutex_.IsValid());
162 } 162 }
163 163
164 } // namespace installer 164 } // namespace installer
OLDNEW
« no previous file with comments | « chrome/installer/setup/setup_singleton.h ('k') | chrome/installer/util/util_constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698