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

Side by Side Diff: chrome/browser/printing/cloud_print/test/cloud_print_proxy_process_browsertest.cc

Issue 1395103003: Don't use base::MessageLoop::{Quit,QuitClosure} in chrome/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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/browser/policy/policy_browsertest.cc ('k') | chrome/browser/printing/print_job.cc » ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 // Create a service process that uses a Mock to respond to the browser in order 5 // Create a service process that uses a Mock to respond to the browser in order
6 // to test launching the browser using the cloud print policy check command 6 // to test launching the browser using the cloud print policy check command
7 // line switch. 7 // line switch.
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after
357 void Wait() { 357 void Wait() {
358 if (seen_) 358 if (seen_)
359 return; 359 return;
360 running_ = true; 360 running_ = true;
361 content::RunMessageLoop(); 361 content::RunMessageLoop();
362 } 362 }
363 363
364 void Notify() { 364 void Notify() {
365 seen_ = true; 365 seen_ = true;
366 if (running_) 366 if (running_)
367 base::MessageLoopForUI::current()->Quit(); 367 base::MessageLoopForUI::current()->QuitWhenIdle();
368 } 368 }
369 369
370 private: 370 private:
371 bool seen_; 371 bool seen_;
372 bool running_; 372 bool running_;
373 }; 373 };
374 374
375 WindowedChannelConnectionObserver observer_; 375 WindowedChannelConnectionObserver observer_;
376 }; 376 };
377 377
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
511 // LocalState for the BrowserProcess. Must be created before profiles are 511 // LocalState for the BrowserProcess. Must be created before profiles are
512 // constructed. 512 // constructed.
513 chrome::TestingIOThreadState testing_io_thread_state; 513 chrome::TestingIOThreadState testing_io_thread_state;
514 514
515 base::Process process = 515 base::Process process =
516 Launch("CloudPrintMockService_StartEnabledWaitForQuit"); 516 Launch("CloudPrintMockService_StartEnabledWaitForQuit");
517 WaitForConnect(); 517 WaitForConnect();
518 ShutdownAndWaitForExitWithTimeout(process.Pass()); 518 ShutdownAndWaitForExitWithTimeout(process.Pass());
519 content::RunAllPendingInMessageLoop(); 519 content::RunAllPendingInMessageLoop();
520 } 520 }
OLDNEW
« no previous file with comments | « chrome/browser/policy/policy_browsertest.cc ('k') | chrome/browser/printing/print_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698