| Index: chrome/browser/chromeos/drive/change_list_processor.cc
|
| diff --git a/chrome/browser/chromeos/drive/change_list_processor.cc b/chrome/browser/chromeos/drive/change_list_processor.cc
|
| index bbd064b85de184781df9de1faedfc9d005897e25..850101dc12fc1da70af0948f5c1132593da7bd85 100644
|
| --- a/chrome/browser/chromeos/drive/change_list_processor.cc
|
| +++ b/chrome/browser/chromeos/drive/change_list_processor.cc
|
| @@ -118,21 +118,28 @@ void ChangeListProcessor::ApplyFeeds(
|
| NOTREACHED();
|
| }
|
|
|
| - ApplyEntryProtoMap(is_delta_feed);
|
| + ApplyEntryProtoMap(is_delta_feed, about_resource.Pass());
|
|
|
| // Shouldn't record histograms when processing delta feeds.
|
| if (!is_delta_feed)
|
| uma_stats.UpdateFileCountUmaHistograms();
|
| }
|
|
|
| -void ChangeListProcessor::ApplyEntryProtoMap(bool is_delta_feed) {
|
| +void ChangeListProcessor::ApplyEntryProtoMap(
|
| + bool is_delta_feed,
|
| + scoped_ptr<google_apis::AboutResource> about_resource) {
|
| DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
|
|
|
| if (!is_delta_feed) { // Full update.
|
| + DCHECK(about_resource);
|
| + changed_dirs_.insert(util::GetDriveGrandRootPath());
|
| changed_dirs_.insert(util::GetDriveMyDriveRootPath());
|
| + // After all nodes are cleared, create the MyDrive root directory at first.
|
| resource_metadata_->RemoveAll(
|
| - base::Bind(&ChangeListProcessor::ApplyNextEntryProtoAsync,
|
| - weak_ptr_factory_.GetWeakPtr()));
|
| + base::Bind(
|
| + &ChangeListProcessor::ApplyEntryProto,
|
| + weak_ptr_factory_.GetWeakPtr(),
|
| + util::CreateMyDriveRootEntry(about_resource->root_folder_id())));
|
| } else {
|
| // Go through all entries generated by the feed and apply them to the local
|
| // snapshot of the file system.
|
|
|