| Index: chrome/browser/sync_file_system/drive_backend/metadata_database_index.cc
|
| diff --git a/chrome/browser/sync_file_system/drive_backend/metadata_database_index.cc b/chrome/browser/sync_file_system/drive_backend/metadata_database_index.cc
|
| index a21d225bed679abfb975a292e6a15e410113a2a8..dd93f7dcafd6721afbafe736d8c838f6046da3b7 100644
|
| --- a/chrome/browser/sync_file_system/drive_backend/metadata_database_index.cc
|
| +++ b/chrome/browser/sync_file_system/drive_backend/metadata_database_index.cc
|
| @@ -328,7 +328,8 @@ void MetadataDatabaseIndex::AddToPathIndexes(
|
|
|
| trackers_by_parent_and_title_[parent][title].Insert(new_tracker);
|
|
|
| - if (trackers_by_parent_and_title_[parent][title].size() > 1) {
|
| + if (trackers_by_parent_and_title_[parent][title].size() > 1 &&
|
| + !title.empty()) {
|
| DVLOG_IF(3, !ContainsKey(multi_backing_file_paths_,
|
| ParentIDAndTitle(parent, title)))
|
| << " Add to multi_backing_file_paths_: " << parent << " " << title;
|
| @@ -369,15 +370,17 @@ void MetadataDatabaseIndex::UpdateInPathIndexes(
|
|
|
| (*trackers_by_title)[title].Insert(new_tracker);
|
|
|
| - if (trackers_by_parent_and_title_[parent][old_title].size() <= 1) {
|
| + if (trackers_by_parent_and_title_[parent][old_title].size() <= 1 &&
|
| + !old_title.empty()) {
|
| DVLOG_IF(3, ContainsKey(multi_backing_file_paths_,
|
| - ParentIDAndTitle(parent, title)))
|
| + ParentIDAndTitle(parent, old_title)))
|
| << " Remove from multi_backing_file_paths_: "
|
| - << parent << " " << title;
|
| - multi_backing_file_paths_.erase(ParentIDAndTitle(parent, title));
|
| + << parent << " " << old_title;
|
| + multi_backing_file_paths_.erase(ParentIDAndTitle(parent, old_title));
|
| }
|
|
|
| - if (trackers_by_parent_and_title_[parent][title].size() > 1) {
|
| + if (trackers_by_parent_and_title_[parent][title].size() > 1 &&
|
| + !title.empty()) {
|
| DVLOG_IF(3, !ContainsKey(multi_backing_file_paths_,
|
| ParentIDAndTitle(parent, title)))
|
| << " Add to multi_backing_file_paths_: " << parent << " " << title;
|
| @@ -407,7 +410,8 @@ void MetadataDatabaseIndex::RemoveFromPathIndexes(
|
|
|
| trackers_by_parent_and_title_[parent][title].Erase(tracker_id);
|
|
|
| - if (trackers_by_parent_and_title_[parent][title].size() <= 1) {
|
| + if (trackers_by_parent_and_title_[parent][title].size() <= 1 &&
|
| + !title.empty()) {
|
| DVLOG_IF(3, ContainsKey(multi_backing_file_paths_,
|
| ParentIDAndTitle(parent, title)))
|
| << " Remove from multi_backing_file_paths_: "
|
|
|