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..34ed342074fcd93129da97fa33e9ba691641ff2f 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,23 @@ 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 deactivating other trackers that have |
| + // different path to the tracker to be activated. |
|
nhiroki
2014/02/07 05:24:30
nit: "... different path to the tracker to be acti
tzik
2014/02/07 05:43:42
Looks nice. Done.
|
| + // If |file_id| has another active tracker that is different to the tracker to |
| + // be activated, the function returns ACTIVATION_FAILED_ANOTHER_ACTIVE_TRACKER |
|
nhiroki
2014/02/07 05:24:30
"another" and "different" seems the same meaning.
tzik
2014/02/07 05:43:42
Done.
|
| + // and does not invoke |callback|. |
| + // If there is another active tracker that has the same path to the tracker to |
|
nhiroki
2014/02/07 05:24:30
"... that has the same path but different file_id,
tzik
2014/02/07 05:43:42
Done.
|
| + // be activated, inactivates it. |
|
nhiroki
2014/02/07 05:24:30
Can we use "deactivates" instead of "inactivates"
tzik
2014/02/07 05:43:42
Done.
|
| + // 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); |