Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4637)

Unified Diff: chrome/browser/extensions/api/app_runtime/app_runtime_api.cc

Issue 14607023: Add support for persistent file access in apps. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: rebase Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/api/app_runtime/app_runtime_api.cc
diff --git a/chrome/browser/extensions/api/app_runtime/app_runtime_api.cc b/chrome/browser/extensions/api/app_runtime/app_runtime_api.cc
index 146d609d5499b4d9aee2c2a24dd46bbc436c299e..1f411ffe90e6f396b4ec47a190e2a8c77a7dd1ff 100644
--- a/chrome/browser/extensions/api/app_runtime/app_runtime_api.cc
+++ b/chrome/browser/extensions/api/app_runtime/app_runtime_api.cc
@@ -52,28 +52,10 @@ void AppEventRouter::DispatchOnLaunchedEvent(
DispatchOnLaunchedEventImpl(extension->id(), arguments.Pass(), profile);
}
-DictionaryValue* DictionaryFromSavedFileEntry(
- const app_file_handler_util::GrantedFileEntry& file_entry) {
- DictionaryValue* result = new DictionaryValue();
- result->SetString("id", file_entry.id);
- result->SetString("fileSystemId", file_entry.filesystem_id);
- result->SetString("baseName", file_entry.registered_name);
- return result;
-}
-
// static.
-void AppEventRouter::DispatchOnRestartedEvent(
- Profile* profile,
- const Extension* extension,
- const std::vector<app_file_handler_util::GrantedFileEntry>& file_entries) {
- ListValue* file_entries_list = new ListValue();
- for (std::vector<extensions::app_file_handler_util::GrantedFileEntry>
- ::const_iterator it = file_entries.begin(); it != file_entries.end();
- ++it) {
- file_entries_list->Append(DictionaryFromSavedFileEntry(*it));
- }
+void AppEventRouter::DispatchOnRestartedEvent(Profile* profile,
+ const Extension* extension) {
scoped_ptr<ListValue> arguments(new ListValue());
- arguments->Append(file_entries_list);
scoped_ptr<Event> event(new Event(kOnRestarted, arguments.Pass()));
event->restrict_to_profile = profile;
extensions::ExtensionSystem::Get(profile)->event_router()->

Powered by Google App Engine
This is Rietveld 408576698