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_FILES_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILES_H_ |
6 #define CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILES_H_ | 6 #define CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILES_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
351 // The root directory content origin. | 351 // The root directory content origin. |
352 const ContentOrigin origin() const { return origin_; } | 352 const ContentOrigin origin() const { return origin_; } |
353 void set_origin(ContentOrigin value) { origin_ = value; } | 353 void set_origin(ContentOrigin value) { origin_ = value; } |
354 | 354 |
355 // Adds the entry to resource map. | 355 // Adds the entry to resource map. |
356 void AddEntryToResourceMap(GDataEntry* entry); | 356 void AddEntryToResourceMap(GDataEntry* entry); |
357 | 357 |
358 // Removes the entry from resource map. | 358 // Removes the entry from resource map. |
359 void RemoveEntryFromResourceMap(GDataEntry* entry); | 359 void RemoveEntryFromResourceMap(GDataEntry* entry); |
360 | 360 |
361 // Searches for |file_path| triggering callback. | 361 // Searches for |file_path| synchronously. |
362 void FindEntryByPath(const FilePath& file_path, | 362 // TODO(satorux): Replace this with an async version crbug.com/137160 |
363 const FindEntryCallback& callback); | 363 GDataEntry* FindEntryByPathSync(const FilePath& file_path); |
364 | 364 |
365 // Returns the GDataEntry* with the corresponding |resource_id|. | 365 // Returns the GDataEntry* with the corresponding |resource_id|. |
366 // TODO(achuith): Get rid of this in favor of async version crbug.com/13957. | 366 // TODO(achuith): Get rid of this in favor of async version crbug.com/13957. |
367 GDataEntry* GetEntryByResourceId(const std::string& resource_id); | 367 GDataEntry* GetEntryByResourceId(const std::string& resource_id); |
368 | 368 |
369 // Returns the GDataEntry* in the callback with the corresponding | 369 // Returns the GDataEntry* in the callback with the corresponding |
370 // |resource_id|. TODO(achuith): Rename this to GetEntryByResourceId. | 370 // |resource_id|. TODO(achuith): Rename this to GetEntryByResourceId. |
371 void GetEntryByResourceIdAsync(const std::string& resource_id, | 371 void GetEntryByResourceIdAsync(const std::string& resource_id, |
372 const GetEntryByResourceIdCallback& callback); | 372 const GetEntryByResourceIdCallback& callback); |
373 | 373 |
(...skipping 16 matching lines...) Expand all Loading... |
390 size_t serialized_size_; | 390 size_t serialized_size_; |
391 int largest_changestamp_; // Stored in the serialized proto. | 391 int largest_changestamp_; // Stored in the serialized proto. |
392 ContentOrigin origin_; | 392 ContentOrigin origin_; |
393 | 393 |
394 DISALLOW_COPY_AND_ASSIGN(GDataDirectoryService); | 394 DISALLOW_COPY_AND_ASSIGN(GDataDirectoryService); |
395 }; | 395 }; |
396 | 396 |
397 } // namespace gdata | 397 } // namespace gdata |
398 | 398 |
399 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILES_H_ | 399 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILES_H_ |
OLD | NEW |