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

Unified Diff: chrome/browser/extensions/api/file_handlers/app_file_handler_util.cc

Issue 280963002: Move FileHandlersInfo to /extensions and remove struct FileHandlersInfo (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Latest master Created 6 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/file_handlers/app_file_handler_util.cc
diff --git a/chrome/browser/extensions/api/file_handlers/app_file_handler_util.cc b/chrome/browser/extensions/api/file_handlers/app_file_handler_util.cc
index d27ccac75ad6e387a9fdbb7d96b847792d65e432..04d54afd16e6a0ab5ed947f584eae2141b5af4ef 100644
--- a/chrome/browser/extensions/api/file_handlers/app_file_handler_util.cc
+++ b/chrome/browser/extensions/api/file_handlers/app_file_handler_util.cc
@@ -242,15 +242,13 @@ void WritableFileChecker::RemoteCheckDone(
} // namespace
-typedef std::vector<FileHandlerInfo> FileHandlerList;
-
const FileHandlerInfo* FileHandlerForId(const Extension& app,
const std::string& handler_id) {
- const FileHandlerList* file_handlers = FileHandlers::GetFileHandlers(&app);
+ const FileHandlersInfo* file_handlers = FileHandlers::GetFileHandlers(&app);
if (!file_handlers)
return NULL;
- for (FileHandlerList::const_iterator i = file_handlers->begin();
+ for (FileHandlersInfo::const_iterator i = file_handlers->begin();
i != file_handlers->end(); i++) {
if (i->id == handler_id)
return &*i;
@@ -262,11 +260,11 @@ const FileHandlerInfo* FirstFileHandlerForFile(
const Extension& app,
const std::string& mime_type,
const base::FilePath& path) {
- const FileHandlerList* file_handlers = FileHandlers::GetFileHandlers(&app);
+ const FileHandlersInfo* file_handlers = FileHandlers::GetFileHandlers(&app);
if (!file_handlers)
return NULL;
- for (FileHandlerList::const_iterator i = file_handlers->begin();
+ for (FileHandlersInfo::const_iterator i = file_handlers->begin();
i != file_handlers->end(); i++) {
if (FileHandlerCanHandleFile(*i, mime_type, path))
return &*i;
@@ -281,11 +279,11 @@ std::vector<const FileHandlerInfo*> FindFileHandlersForFiles(
return handlers;
// Look for file handlers which can handle all the MIME types specified.
- const FileHandlerList* file_handlers = FileHandlers::GetFileHandlers(&app);
+ const FileHandlersInfo* file_handlers = FileHandlers::GetFileHandlers(&app);
if (!file_handlers)
return handlers;
- for (FileHandlerList::const_iterator data = file_handlers->begin();
+ for (FileHandlersInfo::const_iterator data = file_handlers->begin();
data != file_handlers->end(); ++data) {
bool handles_all_types = true;
for (PathAndMimeTypeSet::const_iterator it = files.begin();
« no previous file with comments | « chrome/browser/extensions/api/file_handlers/app_file_handler_util.h ('k') | chrome/browser/web_applications/web_app.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698