| Index: chrome/browser/storage_monitor/storage_monitor_linux.cc
|
| ===================================================================
|
| --- chrome/browser/storage_monitor/storage_monitor_linux.cc (revision 190492)
|
| +++ chrome/browser/storage_monitor/storage_monitor_linux.cc (working copy)
|
| @@ -275,7 +275,7 @@
|
| StorageMonitorLinux::~StorageMonitorLinux() {
|
| DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
|
|
|
| - if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kTestType)) {
|
| + if (!IsRunningTest()) {
|
| BrowserThread::PostTask(
|
| BrowserThread::UI, FROM_HERE,
|
| base::Bind(&device::MediaTransferProtocolManager::Shutdown));
|
| @@ -293,7 +293,7 @@
|
| BrowserThread::FILE, FROM_HERE,
|
| base::Bind(&StorageMonitorLinux::InitOnFileThread, this));
|
|
|
| - if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kTestType)) {
|
| + if (!IsRunningTest()) {
|
| scoped_refptr<base::MessageLoopProxy> loop_proxy;
|
| loop_proxy = content::BrowserThread::GetMessageLoopProxyForThread(
|
| content::BrowserThread::FILE);
|
| @@ -346,6 +346,10 @@
|
| UpdateMtab();
|
| }
|
|
|
| +bool StorageMonitorLinux::IsRunningTest() const {
|
| + return CommandLine::ForCurrentProcess()->HasSwitch(switches::kTestType);
|
| +}
|
| +
|
| void StorageMonitorLinux::InitOnFileThread() {
|
| DCHECK(!initialized_);
|
| DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
|
|
|