| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/chromeos/drive/debug_info_collector.h" | 5 #include "chrome/browser/chromeos/drive/debug_info_collector.h" |
| 6 | 6 |
| 7 #include "base/callback.h" | 7 #include "base/callback.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "content/public/browser/browser_thread.h" | 9 #include "content/public/browser/browser_thread.h" |
| 10 | 10 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 DebugInfoCollector::~DebugInfoCollector() { | 23 DebugInfoCollector::~DebugInfoCollector() { |
| 24 } | 24 } |
| 25 | 25 |
| 26 void DebugInfoCollector::IterateFileCache( | 26 void DebugInfoCollector::IterateFileCache( |
| 27 const CacheIterateCallback& iteration_callback, | 27 const CacheIterateCallback& iteration_callback, |
| 28 const base::Closure& completion_callback) { | 28 const base::Closure& completion_callback) { |
| 29 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 29 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 30 DCHECK(!iteration_callback.is_null()); | 30 DCHECK(!iteration_callback.is_null()); |
| 31 DCHECK(!completion_callback.is_null()); | 31 DCHECK(!completion_callback.is_null()); |
| 32 | 32 |
| 33 file_cache_->Iterate(iteration_callback, completion_callback); | 33 file_cache_->IterateOnUIThread(iteration_callback, completion_callback); |
| 34 } | 34 } |
| 35 | 35 |
| 36 void DebugInfoCollector::GetMetadata( | 36 void DebugInfoCollector::GetMetadata( |
| 37 const GetFilesystemMetadataCallback& callback) { | 37 const GetFilesystemMetadataCallback& callback) { |
| 38 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 38 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 39 DCHECK(!callback.is_null()); | 39 DCHECK(!callback.is_null()); |
| 40 | 40 |
| 41 // Currently, this is just a proxy to the DriveFileSystem. | 41 // Currently, this is just a proxy to the DriveFileSystem. |
| 42 // TODO(hidehiko): Move the implementation to here to simplify the | 42 // TODO(hidehiko): Move the implementation to here to simplify the |
| 43 // DriveFileSystem's implementation. crbug.com/237088 | 43 // DriveFileSystem's implementation. crbug.com/237088 |
| 44 file_system_->GetMetadata(callback); | 44 file_system_->GetMetadata(callback); |
| 45 } | 45 } |
| 46 | 46 |
| 47 } // namespace drive | 47 } // namespace drive |
| OLD | NEW |