OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_DRIVE_CACHE_METADATA_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_CACHE_METADATA_H_ |
6 #define CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_CACHE_METADATA_H_ | 6 #define CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_CACHE_METADATA_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <vector> | 9 #include <vector> |
10 #include <string> | 10 #include <string> |
11 | 11 |
12 #include "base/file_path.h" | 12 #include "base/file_path.h" |
13 #include "chrome/browser/chromeos/drive/drive_cache.h" | 13 #include "chrome/browser/chromeos/drive/drive_cache.h" |
14 | 14 |
15 namespace gdata { | 15 namespace drive { |
16 | 16 |
17 // DriveCacheMetadata is interface to maintain metadata of DriveCache's cached | 17 // DriveCacheMetadata is interface to maintain metadata of DriveCache's cached |
18 // files. This class only manages metadata. File operations are done by | 18 // files. This class only manages metadata. File operations are done by |
19 // DriveCache. | 19 // DriveCache. |
20 // All member access including ctor and dtor must be made on the blocking pool. | 20 // All member access including ctor and dtor must be made on the blocking pool. |
21 class DriveCacheMetadata { | 21 class DriveCacheMetadata { |
22 public: | 22 public: |
23 // Callback for Iterate(). | 23 // Callback for Iterate(). |
24 typedef base::Callback<void(const std::string& resource_id, | 24 typedef base::Callback<void(const std::string& resource_id, |
25 const DriveCacheEntry& cache_entry)> | 25 const DriveCacheEntry& cache_entry)> |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 // Checks whether the current thread is on the right sequenced worker pool | 78 // Checks whether the current thread is on the right sequenced worker pool |
79 // with the right sequence ID. If not, DCHECK will fail. | 79 // with the right sequence ID. If not, DCHECK will fail. |
80 void AssertOnSequencedWorkerPool(); | 80 void AssertOnSequencedWorkerPool(); |
81 | 81 |
82 private: | 82 private: |
83 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_; | 83 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_; |
84 | 84 |
85 DISALLOW_COPY_AND_ASSIGN(DriveCacheMetadata); | 85 DISALLOW_COPY_AND_ASSIGN(DriveCacheMetadata); |
86 }; | 86 }; |
87 | 87 |
88 } // namespace gdata | 88 } // namespace drive |
89 | 89 |
90 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_CACHE_METADATA_H_ | 90 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_CACHE_METADATA_H_ |
OLD | NEW |