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_GDATA_GDATA_DIRECTORY_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_GDATA_GDATA_DIRECTORY_SERVICE_H_ |
6 #define CHROME_BROWSER_CHROMEOS_GDATA_GDATA_DIRECTORY_SERVICE_H_ | 6 #define CHROME_BROWSER_CHROMEOS_GDATA_GDATA_DIRECTORY_SERVICE_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 // Adds the entry to resource map. | 180 // Adds the entry to resource map. |
181 void AddEntryToResourceMap(GDataEntry* entry); | 181 void AddEntryToResourceMap(GDataEntry* entry); |
182 | 182 |
183 // Removes the entry from resource map. | 183 // Removes the entry from resource map. |
184 void RemoveEntryFromResourceMap(GDataEntry* entry); | 184 void RemoveEntryFromResourceMap(GDataEntry* entry); |
185 | 185 |
186 // Searches for |file_path| synchronously. | 186 // Searches for |file_path| synchronously. |
187 // TODO(satorux): Replace this with an async version crbug.com/137160 | 187 // TODO(satorux): Replace this with an async version crbug.com/137160 |
188 GDataEntry* FindEntryByPathSync(const FilePath& file_path); | 188 GDataEntry* FindEntryByPathSync(const FilePath& file_path); |
189 | 189 |
190 // Searches for |file_path| synchronously, and runs |callback|. | |
191 // TODO(satorux): Replace this with an async version crbug.com/137160 | |
192 void FindEntryByPathAndRunSync(const FilePath& file_path, | |
193 const FindEntryCallback& callback); | |
194 | |
195 // Returns the GDataEntry* with the corresponding |resource_id|. | 190 // Returns the GDataEntry* with the corresponding |resource_id|. |
196 // TODO(achuith): Get rid of this in favor of async version crbug.com/13957. | 191 // TODO(achuith): Get rid of this in favor of async version crbug.com/13957. |
197 GDataEntry* GetEntryByResourceId(const std::string& resource_id); | 192 GDataEntry* GetEntryByResourceId(const std::string& resource_id); |
198 | 193 |
199 // Returns the GDataEntry* in the callback with the corresponding | 194 // Returns the GDataEntry* in the callback with the corresponding |
200 // |resource_id|. TODO(achuith): Rename this to GetEntryByResourceId. | 195 // |resource_id|. TODO(achuith): Rename this to GetEntryByResourceId. |
201 void GetEntryByResourceIdAsync(const std::string& resource_id, | 196 void GetEntryByResourceIdAsync(const std::string& resource_id, |
202 const GetEntryByResourceIdCallback& callback); | 197 const GetEntryByResourceIdCallback& callback); |
203 | 198 |
204 // Finds an entry (a file or a directory) by |file_path|. | 199 // Finds an entry (a file or a directory) by |file_path|. |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
305 // This should remain the last member so it'll be destroyed first and | 300 // This should remain the last member so it'll be destroyed first and |
306 // invalidate its weak pointers before other members are destroyed. | 301 // invalidate its weak pointers before other members are destroyed. |
307 base::WeakPtrFactory<GDataDirectoryService> weak_ptr_factory_; | 302 base::WeakPtrFactory<GDataDirectoryService> weak_ptr_factory_; |
308 | 303 |
309 DISALLOW_COPY_AND_ASSIGN(GDataDirectoryService); | 304 DISALLOW_COPY_AND_ASSIGN(GDataDirectoryService); |
310 }; | 305 }; |
311 | 306 |
312 } // namespace gdata | 307 } // namespace gdata |
313 | 308 |
314 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_DIRECTORY_SERVICE_H_ | 309 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_DIRECTORY_SERVICE_H_ |
OLD | NEW |