Chromium Code Reviews| Index: chrome/browser/sync_file_system/drive_backend/metadata_database.h |
| diff --git a/chrome/browser/sync_file_system/drive_backend/metadata_database.h b/chrome/browser/sync_file_system/drive_backend/metadata_database.h |
| index 5cd673cc9f3a8222eb7c78815d91c8b3860e9359..39df98ff4bb6e79eeef9d66dfa70940db78ea33b 100644 |
| --- a/chrome/browser/sync_file_system/drive_backend/metadata_database.h |
| +++ b/chrome/browser/sync_file_system/drive_backend/metadata_database.h |
| @@ -125,7 +125,6 @@ class MetadataDatabase { |
| enum ActivationStatus { |
| ACTIVATION_PENDING, |
| ACTIVATION_FAILED_ANOTHER_ACTIVE_TRACKER, |
| - ACTIVATION_FAILED_SAME_PATH_TRACKER, |
| }; |
| enum UpdateOption { |
| @@ -304,18 +303,22 @@ class MetadataDatabase { |
| const FileDetails& updated_details, |
| const SyncStatusCallback& callback); |
| - // Returns ACTIVATION_PENDING if a tracker of the file can be safely activated |
| - // without deactivating any other trackers. In this case, tries to activate |
| - // the tracker, and invokes |callback| upon completion. |
| - // Returns ACTIVATION_FAILED_ANOTHER_ACTIVE_TRACKER if there's another active |
| - // tracker that tracks |file_id|. |
| - // Returns ACTIVATION_FAILED_SAME_PATH_TRACKER if there's another active |
| - // tracker that has the same parent tracker and title to |file_id|. |
| - // In these FAILED cases, |callback| is not invoked. |
| - ActivationStatus TryNoSideEffectActivation( |
| - int64 parent_tracker_id, |
| - const std::string& file_id, |
| - const SyncStatusCallback& callback); |
| + // Activates a tracker identified by |parent_tracker_id| and |file_id| if the |
| + // tracker can be activated without inactivating other trackers that has the |
|
kinuko
2014/02/07 08:00:21
nit: has -> have
tzik
2014/02/10 02:38:58
Done.
|
| + // same |file_id| but a different path. |
|
kinuko
2014/02/07 08:00:21
a different path -> different paths
tzik
2014/02/10 02:38:58
Done.
|
| + // If |file_id| has another active tracker, the function returns |
| + // ACTIVATION_FAILED_ANOTHER_ACTIVE_TRACKER and does not invoke |callback|. |
| + // If there is another active tracker that has the same path but different |
| + // |file_id|, inactivates the tracker. |
| + // In success case, returns ACTIVATION_PENDING and invokes |callback| upon |
| + // completion. |
| + // |
| + // The tracker to be activated must: |
| + // - have a tracked metadata in the database, |
| + // - have |synced_details| with valid |title|. |
| + ActivationStatus TryActivateTracker(int64 parent_tracker_id, |
| + const std::string& file_id, |
| + const SyncStatusCallback& callback); |
| // Changes the priority of the tracker to low. |
| void LowerTrackerPriority(int64 tracker_id); |