Commit 8f56a083 authored by satorux@chromium.org's avatar satorux@chromium.org

Revert 221982 "file_manager: Remove FileWatchChangedEntry from f..."

Broke DriveFileSystemExtensionApiTest.FileWatch
http://build.chromium.org/p/tryserver.chromium/builders/linux_chromeos/builds/151979


> file_manager: Remove FileWatchChangedEntry from fileBrowserPrivate
> 
> This type is not in use, and we don't plan to use this any time soon.
> We should add it back when it's needed.
> 
> BUG=257916
> TEST=Files.app works as before
> R=benwells@chromium.org, mtomasz@chromium.org
> 
> Review URL: https://codereview.chromium.org/23956009

TBR=satorux@chromium.org

Review URL: https://codereview.chromium.org/23791005

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@221990 0039d316-1c4b-4281-b951-d872f2087c98
parent a0bfbf13
...@@ -685,6 +685,10 @@ void EventRouter::DispatchDirectoryChangeEvent( ...@@ -685,6 +685,10 @@ void EventRouter::DispatchDirectoryChangeEvent(
watch_info->SetString("eventType", watch_info->SetString("eventType",
got_error ? kPathWatchError : kPathChanged); got_error ? kPathWatchError : kPathChanged);
// TODO(mtomasz): Pass set of entries. http://crbug.com/157834
ListValue* watch_info_entries = new ListValue();
watch_info->Set("changedEntries", watch_info_entries);
scoped_ptr<extensions::Event> event(new extensions::Event( scoped_ptr<extensions::Event> event(new extensions::Event(
extensions::event_names::kOnDirectoryChanged, args.Pass())); extensions::event_names::kOnDirectoryChanged, args.Pass()));
extensions::ExtensionSystem::Get(profile_)->event_router()-> extensions::ExtensionSystem::Get(profile_)->event_router()->
......
...@@ -304,6 +304,22 @@ ...@@ -304,6 +304,22 @@
} }
} }
}, },
{
"id": "FileWatchChangedEntry",
"type": "object",
"description": "Information about changed file or directory",
"properties": {
"changeType": {
"type": "string",
"enum": ["added", "deleted", "updated"],
"description": "Specifies type of the change."
},
"fileUrl": {
"type": "string",
"description": "URL of the changed file."
}
}
},
{ {
"id": "FileWatchEvent", "id": "FileWatchEvent",
"type": "object", "type": "object",
...@@ -317,6 +333,10 @@ ...@@ -317,6 +333,10 @@
"directoryUrl": { "directoryUrl": {
"type": "string", "type": "string",
"description": "URL of watched directory." "description": "URL of watched directory."
},
"changedEntries": {
"type": "array",
"items": {"$ref": "FileWatchChangedEntry"}
} }
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment