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 CHROME_BROWSER_CHROMEOS_DRIVE_DIRECTORY_LOADER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_DRIVE_DIRECTORY_LOADER_H_ |
6 #define CHROME_BROWSER_CHROMEOS_DRIVE_DIRECTORY_LOADER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_DRIVE_DIRECTORY_LOADER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
11 #include <vector> | 11 #include <vector> |
12 | 12 |
13 #include "base/callback.h" | 13 #include "base/callback.h" |
14 #include "base/memory/ref_counted.h" | 14 #include "base/memory/ref_counted.h" |
15 #include "base/memory/scoped_ptr.h" | 15 #include "base/memory/scoped_ptr.h" |
16 #include "base/memory/scoped_vector.h" | 16 #include "base/memory/scoped_vector.h" |
17 #include "base/observer_list.h" | 17 #include "base/observer_list.h" |
18 #include "chrome/browser/chromeos/drive/file_errors.h" | 18 #include "chrome/browser/chromeos/drive/file_errors.h" |
19 #include "chrome/browser/chromeos/drive/file_system_interface.h" | 19 #include "chrome/browser/chromeos/drive/file_system_interface.h" |
| 20 #include "google_apis/drive/drive_api_error_codes.h" |
20 #include "google_apis/drive/drive_common_callbacks.h" | 21 #include "google_apis/drive/drive_common_callbacks.h" |
21 #include "google_apis/drive/gdata_errorcode.h" | |
22 | 22 |
23 namespace base { | 23 namespace base { |
24 class SequencedTaskRunner; | 24 class SequencedTaskRunner; |
25 } // namespace base | 25 } // namespace base |
26 | 26 |
27 namespace google_apis { | 27 namespace google_apis { |
28 class AboutResource; | 28 class AboutResource; |
29 } // namespace google_apis | 29 } // namespace google_apis |
30 | 30 |
31 namespace drive { | 31 namespace drive { |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 bool should_try_loading_parent, | 77 bool should_try_loading_parent, |
78 const ResourceEntry* entry, | 78 const ResourceEntry* entry, |
79 FileError error); | 79 FileError error); |
80 void ReadDirectoryAfterLoadParent( | 80 void ReadDirectoryAfterLoadParent( |
81 const base::FilePath& directory_path, | 81 const base::FilePath& directory_path, |
82 const ReadDirectoryEntriesCallback& entries_callback, | 82 const ReadDirectoryEntriesCallback& entries_callback, |
83 const FileOperationCallback& completion_callback, | 83 const FileOperationCallback& completion_callback, |
84 FileError error); | 84 FileError error); |
85 void ReadDirectoryAfterGetAboutResource( | 85 void ReadDirectoryAfterGetAboutResource( |
86 const std::string& local_id, | 86 const std::string& local_id, |
87 google_apis::GDataErrorCode status, | 87 google_apis::DriveApiErrorCode status, |
88 scoped_ptr<google_apis::AboutResource> about_resource); | 88 scoped_ptr<google_apis::AboutResource> about_resource); |
89 void ReadDirectoryAfterCheckLocalState( | 89 void ReadDirectoryAfterCheckLocalState( |
90 scoped_ptr<google_apis::AboutResource> about_resource, | 90 scoped_ptr<google_apis::AboutResource> about_resource, |
91 const std::string& local_id, | 91 const std::string& local_id, |
92 const ResourceEntry* entry, | 92 const ResourceEntry* entry, |
93 const int64* local_changestamp, | 93 const int64* local_changestamp, |
94 FileError error); | 94 FileError error); |
95 | 95 |
96 // Part of ReadDirectory(). | 96 // Part of ReadDirectory(). |
97 // This function should be called when the directory load is complete. | 97 // This function should be called when the directory load is complete. |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 // Note: This should remain the last member so it'll be destroyed and | 139 // Note: This should remain the last member so it'll be destroyed and |
140 // invalidate its weak pointers before any other members are destroyed. | 140 // invalidate its weak pointers before any other members are destroyed. |
141 base::WeakPtrFactory<DirectoryLoader> weak_ptr_factory_; | 141 base::WeakPtrFactory<DirectoryLoader> weak_ptr_factory_; |
142 DISALLOW_COPY_AND_ASSIGN(DirectoryLoader); | 142 DISALLOW_COPY_AND_ASSIGN(DirectoryLoader); |
143 }; | 143 }; |
144 | 144 |
145 } // namespace internal | 145 } // namespace internal |
146 } // namespace drive | 146 } // namespace drive |
147 | 147 |
148 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_DIRECTORY_LOADER_H_ | 148 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_DIRECTORY_LOADER_H_ |
OLD | NEW |