| 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 ac2fd7a1cacf411f6c3d9c5a06f4e4a128b866b0..50ae92cdba193cde3eecd71ebf327715aa0b246f 100644
|
| --- a/chrome/browser/chromeos/drive/change_list_processor.cc
|
| +++ b/chrome/browser/chromeos/drive/change_list_processor.cc
|
| @@ -109,21 +109,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.
|
|
|