| 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 #ifndef CHROME_BROWSER_CHROMEOS_DRIVE_DEBUG_INFO_COLLECTOR_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_DRIVE_DEBUG_INFO_COLLECTOR_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_DRIVE_DEBUG_INFO_COLLECTOR_H_ | 6 #define CHROME_BROWSER_CHROMEOS_DRIVE_DEBUG_INFO_COLLECTOR_H_ |
| 7 | 7 |
| 8 #include "base/callback_forward.h" | 8 #include "base/callback_forward.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/threading/thread_checker.h" | 10 #include "base/threading/thread_checker.h" |
| 11 #include "components/drive/file_system_interface.h" | 11 #include "components/drive/file_system_interface.h" |
| 12 | 12 |
| 13 namespace drive { | 13 namespace drive { |
| 14 | 14 |
| 15 // This class provides some methods which are useful to show the debug | 15 // This class provides some methods which are useful to show the debug |
| 16 // info on chrome://drive-internals page. | 16 // info on chrome://drive-internals page. |
| 17 // All the method should be called on UI thread. | 17 // All the method should be called on UI thread. |
| 18 class DebugInfoCollector { | 18 class DebugInfoCollector { |
| 19 public: | 19 public: |
| 20 // Callback for ReadDirectory(). | 20 // Callback for ReadDirectory(). |
| 21 typedef base::Callback<void(FileError error, | 21 typedef base::Callback<void(FileError error, |
| 22 scoped_ptr<ResourceEntryVector> entries)> | 22 std::unique_ptr<ResourceEntryVector> entries)> |
| 23 ReadDirectoryCallback; | 23 ReadDirectoryCallback; |
| 24 | 24 |
| 25 // Callback for IterateFileCache(). | 25 // Callback for IterateFileCache(). |
| 26 typedef base::Callback<void(const std::string& id, | 26 typedef base::Callback<void(const std::string& id, |
| 27 const FileCacheEntry& cache_entry)> | 27 const FileCacheEntry& cache_entry)> |
| 28 IterateFileCacheCallback; | 28 IterateFileCacheCallback; |
| 29 | 29 |
| 30 DebugInfoCollector(internal::ResourceMetadata* metadata, | 30 DebugInfoCollector(internal::ResourceMetadata* metadata, |
| 31 FileSystemInterface* file_system, | 31 FileSystemInterface* file_system, |
| 32 base::SequencedTaskRunner* blocking_task_runner); | 32 base::SequencedTaskRunner* blocking_task_runner); |
| (...skipping 26 matching lines...) Expand all Loading... |
| 59 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_; | 59 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_; |
| 60 | 60 |
| 61 base::ThreadChecker thread_checker_; | 61 base::ThreadChecker thread_checker_; |
| 62 | 62 |
| 63 DISALLOW_COPY_AND_ASSIGN(DebugInfoCollector); | 63 DISALLOW_COPY_AND_ASSIGN(DebugInfoCollector); |
| 64 }; | 64 }; |
| 65 | 65 |
| 66 } // namespace drive | 66 } // namespace drive |
| 67 | 67 |
| 68 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_DEBUG_INFO_COLLECTOR_H_ | 68 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_DEBUG_INFO_COLLECTOR_H_ |
| OLD | NEW |