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

Side by Side Diff: chrome/browser/process_singleton_uitest.cc

Issue 10034006: vectors are cleared with "clear()", not with "empty()". (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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 | Annotate | Revision Log
« 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) 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 // This test validates that the ProcessSingleton class properly makes sure 5 // This test validates that the ProcessSingleton class properly makes sure
6 // that there is only one main browser process. 6 // that there is only one main browser process.
7 // 7 //
8 // It is currently compiled and run on Windows and Posix(non-Mac) platforms. 8 // It is currently compiled and run on Windows and Posix(non-Mac) platforms.
9 // Mac uses system services and ProcessSingletonMac is a noop. (Maybe it still 9 // Mac uses system services and ProcessSingletonMac is a noop. (Maybe it still
10 // makes sense to test that the system services are giving the behavior we 10 // makes sense to test that the system services are giving the behavior we
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 base::kNullProcessHandle) { 308 base::kNullProcessHandle) {
309 KillProcessTree(chrome_starters_[starter_index]->process_handle_); 309 KillProcessTree(chrome_starters_[starter_index]->process_handle_);
310 } 310 }
311 } 311 }
312 pending_starters.erase(pending_starters.begin() + done_index); 312 pending_starters.erase(pending_starters.begin() + done_index);
313 } 313 }
314 314
315 // "There can be only one!" :-) 315 // "There can be only one!" :-)
316 ASSERT_EQ(static_cast<size_t>(1), pending_starters.size()); 316 ASSERT_EQ(static_cast<size_t>(1), pending_starters.size());
317 size_t last_index = pending_starters.front(); 317 size_t last_index = pending_starters.front();
318 pending_starters.empty(); 318 pending_starters.clear();
319 if (chrome_starters_[last_index]->process_handle_ != 319 if (chrome_starters_[last_index]->process_handle_ !=
320 base::kNullProcessHandle) { 320 base::kNullProcessHandle) {
321 KillProcessTree(chrome_starters_[last_index]->process_handle_); 321 KillProcessTree(chrome_starters_[last_index]->process_handle_);
322 chrome_starters_[last_index]->done_event_.Wait(); 322 chrome_starters_[last_index]->done_event_.Wait();
323 } 323 }
324 } 324 }
325 } 325 }
326 326
327 } // namespace 327 } // namespace
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