OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #include "chrome/browser/sync_file_system/drive_backend/metadata_database.h" | 5 #include "chrome/browser/sync_file_system/drive_backend/metadata_database.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <stack> | 8 #include <stack> |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 1418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1429 std::string parent_folder_id = metadata.details().parent_folder_ids(i); | 1429 std::string parent_folder_id = metadata.details().parent_folder_ids(i); |
1430 TrackerIDSet parent_trackers = | 1430 TrackerIDSet parent_trackers = |
1431 index_->GetFileTrackerIDsByFileID(parent_folder_id); | 1431 index_->GetFileTrackerIDsByFileID(parent_folder_id); |
1432 for (TrackerIDSet::const_iterator itr = parent_trackers.begin(); | 1432 for (TrackerIDSet::const_iterator itr = parent_trackers.begin(); |
1433 itr != parent_trackers.end(); ++itr) { | 1433 itr != parent_trackers.end(); ++itr) { |
1434 FileTracker parent_tracker; | 1434 FileTracker parent_tracker; |
1435 index_->GetFileTracker(*itr, &parent_tracker); | 1435 index_->GetFileTracker(*itr, &parent_tracker); |
1436 if (!parent_tracker.active()) | 1436 if (!parent_tracker.active()) |
1437 continue; | 1437 continue; |
1438 | 1438 |
1439 if (ContainsKey(parents_to_exclude, parent_tracker.tracker_id())) | 1439 if (base::ContainsKey(parents_to_exclude, parent_tracker.tracker_id())) |
1440 continue; | 1440 continue; |
1441 | 1441 |
1442 CreateTrackerForParentAndFileMetadata( | 1442 CreateTrackerForParentAndFileMetadata( |
1443 parent_tracker, metadata, option); | 1443 parent_tracker, metadata, option); |
1444 } | 1444 } |
1445 } | 1445 } |
1446 } | 1446 } |
1447 | 1447 |
1448 int64_t MetadataDatabase::IncrementTrackerID() { | 1448 int64_t MetadataDatabase::IncrementTrackerID() { |
1449 int64_t tracker_id = index_->GetNextTrackerID(); | 1449 int64_t tracker_id = index_->GetNextTrackerID(); |
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1804 return false; | 1804 return false; |
1805 | 1805 |
1806 if (!parents.empty()) | 1806 if (!parents.empty()) |
1807 return false; | 1807 return false; |
1808 | 1808 |
1809 return true; | 1809 return true; |
1810 } | 1810 } |
1811 | 1811 |
1812 } // namespace drive_backend | 1812 } // namespace drive_backend |
1813 } // namespace sync_file_system | 1813 } // namespace sync_file_system |
OLD | NEW |