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

Side by Side Diff: components/storage_monitor/storage_monitor_chromeos_unittest.cc

Issue 1402553002: Don't use base::MessageLoop::{Quit,QuitClosure} in components/ (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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 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 "components/storage_monitor/storage_monitor_chromeos.h" 5 #include "components/storage_monitor/storage_monitor_chromeos.h"
6 6
7 #include "base/files/file_util.h" 7 #include "base/files/file_util.h"
8 #include "base/files/scoped_temp_dir.h" 8 #include "base/files/scoped_temp_dir.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 if (with_dcim_dir) 238 if (with_dcim_dir)
239 path = path.Append(kDCIMDirectoryName); 239 path = path.Append(kDCIMDirectoryName);
240 if (!base::CreateDirectory(path)) 240 if (!base::CreateDirectory(path))
241 return base::FilePath(); 241 return base::FilePath();
242 return return_path; 242 return return_path;
243 } 243 }
244 244
245 // static 245 // static
246 void StorageMonitorCrosTest::PostQuitToUIThread() { 246 void StorageMonitorCrosTest::PostQuitToUIThread() {
247 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, 247 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
248 base::MessageLoop::QuitClosure()); 248 base::MessageLoop::QuitWhenIdleClosure());
249 } 249 }
250 250
251 // static 251 // static
252 void StorageMonitorCrosTest::WaitForFileThread() { 252 void StorageMonitorCrosTest::WaitForFileThread() {
253 BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE, 253 BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE,
254 base::Bind(&PostQuitToUIThread)); 254 base::Bind(&PostQuitToUIThread));
255 base::MessageLoop::current()->Run(); 255 base::MessageLoop::current()->Run();
256 } 256 }
257 257
258 void StorageMonitorCrosTest::EjectNotify(StorageMonitor::EjectStatus status) { 258 void StorageMonitorCrosTest::EjectNotify(StorageMonitor::EjectStatus status) {
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
545 base::Bind(&StorageMonitorCrosTest::EjectNotify, 545 base::Bind(&StorageMonitorCrosTest::EjectNotify,
546 base::Unretained(this))); 546 base::Unretained(this)));
547 base::RunLoop().RunUntilIdle(); 547 base::RunLoop().RunUntilIdle();
548 548
549 EXPECT_EQ(StorageMonitor::EJECT_OK, status_); 549 EXPECT_EQ(StorageMonitor::EJECT_OK, status_);
550 } 550 }
551 551
552 } // namespace 552 } // namespace
553 553
554 } // namespace storage_monitor 554 } // namespace storage_monitor
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698