OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 COMPONENTS_DRIVE_DIRECTORY_LOADER_H_ | 5 #ifndef COMPONENTS_DRIVE_DIRECTORY_LOADER_H_ |
6 #define COMPONENTS_DRIVE_DIRECTORY_LOADER_H_ | 6 #define COMPONENTS_DRIVE_DIRECTORY_LOADER_H_ |
7 | 7 |
| 8 #include <stdint.h> |
| 9 |
8 #include <map> | 10 #include <map> |
9 #include <set> | 11 #include <set> |
10 #include <string> | 12 #include <string> |
11 #include <vector> | 13 #include <vector> |
12 | 14 |
13 #include "base/callback.h" | 15 #include "base/callback.h" |
| 16 #include "base/macros.h" |
14 #include "base/memory/ref_counted.h" | 17 #include "base/memory/ref_counted.h" |
15 #include "base/memory/scoped_ptr.h" | 18 #include "base/memory/scoped_ptr.h" |
16 #include "base/observer_list.h" | 19 #include "base/observer_list.h" |
17 #include "base/threading/thread_checker.h" | 20 #include "base/threading/thread_checker.h" |
18 #include "components/drive/file_errors.h" | 21 #include "components/drive/file_errors.h" |
19 #include "components/drive/file_system_interface.h" | 22 #include "components/drive/file_system_interface.h" |
20 #include "google_apis/drive/drive_api_error_codes.h" | 23 #include "google_apis/drive/drive_api_error_codes.h" |
21 #include "google_apis/drive/drive_common_callbacks.h" | 24 #include "google_apis/drive/drive_common_callbacks.h" |
22 | 25 |
23 namespace base { | 26 namespace base { |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 const FileOperationCallback& completion_callback, | 86 const FileOperationCallback& completion_callback, |
84 FileError error); | 87 FileError error); |
85 void ReadDirectoryAfterGetAboutResource( | 88 void ReadDirectoryAfterGetAboutResource( |
86 const std::string& local_id, | 89 const std::string& local_id, |
87 google_apis::DriveApiErrorCode status, | 90 google_apis::DriveApiErrorCode status, |
88 scoped_ptr<google_apis::AboutResource> about_resource); | 91 scoped_ptr<google_apis::AboutResource> about_resource); |
89 void ReadDirectoryAfterCheckLocalState( | 92 void ReadDirectoryAfterCheckLocalState( |
90 scoped_ptr<google_apis::AboutResource> about_resource, | 93 scoped_ptr<google_apis::AboutResource> about_resource, |
91 const std::string& local_id, | 94 const std::string& local_id, |
92 const ResourceEntry* entry, | 95 const ResourceEntry* entry, |
93 const int64* local_changestamp, | 96 const int64_t* local_changestamp, |
94 FileError error); | 97 FileError error); |
95 | 98 |
96 // Part of ReadDirectory(). | 99 // Part of ReadDirectory(). |
97 // This function should be called when the directory load is complete. | 100 // This function should be called when the directory load is complete. |
98 // Flushes the callbacks waiting for the directory to be loaded. | 101 // Flushes the callbacks waiting for the directory to be loaded. |
99 void OnDirectoryLoadComplete(const std::string& local_id, FileError error); | 102 void OnDirectoryLoadComplete(const std::string& local_id, FileError error); |
100 void OnDirectoryLoadCompleteAfterRead(const std::string& local_id, | 103 void OnDirectoryLoadCompleteAfterRead(const std::string& local_id, |
101 const ResourceEntryVector* entries, | 104 const ResourceEntryVector* entries, |
102 FileError error); | 105 FileError error); |
103 | 106 |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 // Note: This should remain the last member so it'll be destroyed and | 144 // Note: This should remain the last member so it'll be destroyed and |
142 // invalidate its weak pointers before any other members are destroyed. | 145 // invalidate its weak pointers before any other members are destroyed. |
143 base::WeakPtrFactory<DirectoryLoader> weak_ptr_factory_; | 146 base::WeakPtrFactory<DirectoryLoader> weak_ptr_factory_; |
144 DISALLOW_COPY_AND_ASSIGN(DirectoryLoader); | 147 DISALLOW_COPY_AND_ASSIGN(DirectoryLoader); |
145 }; | 148 }; |
146 | 149 |
147 } // namespace internal | 150 } // namespace internal |
148 } // namespace drive | 151 } // namespace drive |
149 | 152 |
150 #endif // COMPONENTS_DRIVE_DIRECTORY_LOADER_H_ | 153 #endif // COMPONENTS_DRIVE_DIRECTORY_LOADER_H_ |
OLD | NEW |