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

Side by Side Diff: chrome/browser/chromeos/extensions/file_manager/file_handler_util.cc

Issue 15855010: Make ExtensionMsg_MessageInvoke run a module system function rather than a (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix test compile Created 7 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/extensions/api/web_request/web_request_api_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/chromeos/extensions/file_manager/file_handler_util.h" 5 #include "chrome/browser/chromeos/extensions/file_manager/file_handler_util.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/i18n/case_conversion.h" 9 #include "base/i18n/case_conversion.h"
10 #include "base/json/json_writer.h" 10 #include "base/json/json_writer.h"
(...skipping 892 matching lines...) Expand 10 before | Expand all | Expand 10 after
903 return; 903 return;
904 } 904 }
905 905
906 SetupHandlerHostFileAccessPermissions(file_list, extension, handler_pid); 906 SetupHandlerHostFileAccessPermissions(file_list, extension, handler_pid);
907 907
908 scoped_ptr<ListValue> event_args(new ListValue()); 908 scoped_ptr<ListValue> event_args(new ListValue());
909 event_args->Append(new base::StringValue(action_id_)); 909 event_args->Append(new base::StringValue(action_id_));
910 DictionaryValue* details = new DictionaryValue(); 910 DictionaryValue* details = new DictionaryValue();
911 event_args->Append(details); 911 event_args->Append(details);
912 // Get file definitions. These will be replaced with Entry instances by 912 // Get file definitions. These will be replaced with Entry instances by
913 // chromeHidden.Event.dispatchEvent() method from event_binding.js. 913 // dispatchEvent() method from event_binding.js.
914 ListValue* files_urls = new ListValue(); 914 ListValue* files_urls = new ListValue();
915 details->Set("entries", files_urls); 915 details->Set("entries", files_urls);
916 for (FileDefinitionList::const_iterator iter = file_list.begin(); 916 for (FileDefinitionList::const_iterator iter = file_list.begin();
917 iter != file_list.end(); 917 iter != file_list.end();
918 ++iter) { 918 ++iter) {
919 DictionaryValue* file_def = new DictionaryValue(); 919 DictionaryValue* file_def = new DictionaryValue();
920 files_urls->Append(file_def); 920 files_urls->Append(file_def);
921 file_def->SetString("fileSystemName", file_system_name); 921 file_def->SetString("fileSystemName", file_system_name);
922 file_def->SetString("fileSystemRoot", file_system_root.spec()); 922 file_def->SetString("fileSystemRoot", file_system_root.spec());
923 base::FilePath root(FILE_PATH_LITERAL("/")); 923 base::FilePath root(FILE_PATH_LITERAL("/"));
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
972 extensions::LaunchPlatformAppWithFileHandler(profile(), GetExtension(), 972 extensions::LaunchPlatformAppWithFileHandler(profile(), GetExtension(),
973 action_id_, file_urls[i].path()); 973 action_id_, file_urls[i].path());
974 } 974 }
975 975
976 if (!done.is_null()) 976 if (!done.is_null())
977 done.Run(true); 977 done.Run(true);
978 return true; 978 return true;
979 } 979 }
980 980
981 } // namespace file_handler_util 981 } // namespace file_handler_util
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/api/web_request/web_request_api_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698