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

Side by Side Diff: chrome/browser/component_updater/sw_reporter_installer_win.cc

Issue 689993003: Remove Extra call to CloseProcessHandle (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2014 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/browser/component_updater/sw_reporter_installer_win.h" 5 #include "chrome/browser/component_updater/sw_reporter_installer_win.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 base::LaunchOptions(), 204 base::LaunchOptions(),
205 &scan_reporter_process)) { 205 &scan_reporter_process)) {
206 ReportUmaStep(SW_REPORTER_FAILED_TO_START); 206 ReportUmaStep(SW_REPORTER_FAILED_TO_START);
207 return; 207 return;
208 } 208 }
209 ReportUmaStep(SW_REPORTER_START_EXECUTION); 209 ReportUmaStep(SW_REPORTER_START_EXECUTION);
210 210
211 int exit_code = -1; 211 int exit_code = -1;
212 bool success = base::WaitForExitCode(scan_reporter_process, &exit_code); 212 bool success = base::WaitForExitCode(scan_reporter_process, &exit_code);
213 DCHECK(success); 213 DCHECK(success);
214 base::CloseProcessHandle(scan_reporter_process);
215 scan_reporter_process = base::kNullProcessHandle; 214 scan_reporter_process = base::kNullProcessHandle;
216 // It's OK if this doesn't complete, the work will continue on next startup. 215 // It's OK if this doesn't complete, the work will continue on next startup.
217 BrowserThread::PostTask( 216 BrowserThread::PostTask(
218 BrowserThread::UI, 217 BrowserThread::UI,
219 FROM_HERE, 218 FROM_HERE,
220 base::Bind(&ReportAndClearExitCode, exit_code, version)); 219 base::Bind(&ReportAndClearExitCode, exit_code, version));
221 } 220 }
222 221
223 class SwReporterInstallerTraits : public ComponentInstallerTraits { 222 class SwReporterInstallerTraits : public ComponentInstallerTraits {
224 public: 223 public:
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
396 -1, 395 -1,
397 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); 396 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
398 397
399 registry->RegisterStringPref( 398 registry->RegisterStringPref(
400 prefs::kSwReporterPromptVersion, 399 prefs::kSwReporterPromptVersion,
401 "", 400 "",
402 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); 401 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
403 } 402 }
404 403
405 } // namespace component_updater 404 } // namespace component_updater
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698