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 #include "google_apis/drive/task_util.h" | 10 #include "google_apis/drive/task_util.h" |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 | 67 |
68 void DebugInfoCollector::GetResourceEntry( | 68 void DebugInfoCollector::GetResourceEntry( |
69 const base::FilePath& file_path, | 69 const base::FilePath& file_path, |
70 const GetResourceEntryCallback& callback) { | 70 const GetResourceEntryCallback& callback) { |
71 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 71 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
72 DCHECK(!callback.is_null()); | 72 DCHECK(!callback.is_null()); |
73 | 73 |
74 scoped_ptr<ResourceEntry> entry(new ResourceEntry); | 74 scoped_ptr<ResourceEntry> entry(new ResourceEntry); |
75 ResourceEntry* entry_ptr = entry.get(); | 75 ResourceEntry* entry_ptr = entry.get(); |
76 base::PostTaskAndReplyWithResult( | 76 base::PostTaskAndReplyWithResult( |
77 blocking_task_runner_, | 77 blocking_task_runner_.get(), |
78 FROM_HERE, | 78 FROM_HERE, |
79 base::Bind(&internal::ResourceMetadata::GetResourceEntryByPath, | 79 base::Bind(&internal::ResourceMetadata::GetResourceEntryByPath, |
80 base::Unretained(metadata_), | 80 base::Unretained(metadata_), |
81 file_path, | 81 file_path, |
82 entry_ptr), | 82 entry_ptr), |
83 base::Bind(&RunGetResourceEntryCallback, callback, base::Passed(&entry))); | 83 base::Bind(&RunGetResourceEntryCallback, callback, base::Passed(&entry))); |
84 } | 84 } |
85 | 85 |
86 void DebugInfoCollector::ReadDirectory( | 86 void DebugInfoCollector::ReadDirectory( |
87 const base::FilePath& file_path, | 87 const base::FilePath& file_path, |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 121 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
122 DCHECK(!callback.is_null()); | 122 DCHECK(!callback.is_null()); |
123 | 123 |
124 // Currently, this is just a proxy to the FileSystem. | 124 // Currently, this is just a proxy to the FileSystem. |
125 // TODO(hidehiko): Move the implementation to here to simplify the | 125 // TODO(hidehiko): Move the implementation to here to simplify the |
126 // FileSystem's implementation. crbug.com/237088 | 126 // FileSystem's implementation. crbug.com/237088 |
127 file_system_->GetMetadata(callback); | 127 file_system_->GetMetadata(callback); |
128 } | 128 } |
129 | 129 |
130 } // namespace drive | 130 } // namespace drive |
OLD | NEW |