| Index: chrome/browser/chromeos/drive/file_system/create_file_operation.cc
|
| diff --git a/chrome/browser/chromeos/drive/file_system/create_file_operation.cc b/chrome/browser/chromeos/drive/file_system/create_file_operation.cc
|
| index e9efe6bdd494d6f3bcc41b8240a5c46d75707688..f60533101efcbf9994754ee8287e369956761bb9 100644
|
| --- a/chrome/browser/chromeos/drive/file_system/create_file_operation.cc
|
| +++ b/chrome/browser/chromeos/drive/file_system/create_file_operation.cc
|
| @@ -8,6 +8,7 @@
|
|
|
| #include "base/file_util.h"
|
| #include "chrome/browser/chromeos/drive/drive.pb.h"
|
| +#include "chrome/browser/chromeos/drive/file_change.h"
|
| #include "chrome/browser/chromeos/drive/file_system/operation_observer.h"
|
| #include "chrome/browser/chromeos/drive/resource_metadata.h"
|
| #include "content/public/browser/browser_thread.h"
|
| @@ -123,8 +124,13 @@ void CreateFileOperation::CreateFileAfterUpdateLocalState(
|
| entry->file_specific_info().is_hosted_document()) ?
|
| FILE_ERROR_EXISTS : FILE_ERROR_OK;
|
| } else if (error == FILE_ERROR_OK) {
|
| + DCHECK(!entry->file_info().is_directory());
|
| +
|
| // Notify observer if the file was newly created.
|
| - observer_->OnDirectoryChangedByOperation(file_path.DirName());
|
| + FileChange changed_file;
|
| + changed_file.Update(
|
| + file_path, FileChange::FILE_TYPE_FILE, FileChange::ADD_OR_UPDATE);
|
| + observer_->OnFileChangedByOperation(changed_file);
|
| observer_->OnEntryUpdatedByOperation(entry->local_id());
|
| }
|
| callback.Run(error);
|
|
|