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

Unified Diff: extensions/common/manifest_handlers/file_handler_info.h

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: extensions/common/manifest_handlers/file_handler_info.h
diff --git a/chrome/common/extensions/api/file_handlers/file_handlers_parser.h b/extensions/common/manifest_handlers/file_handler_info.h
similarity index 54%
rename from chrome/common/extensions/api/file_handlers/file_handlers_parser.h
rename to extensions/common/manifest_handlers/file_handler_info.h
index 864a38f960c08289b178f45d2dcf2963971053d6..4cda355721c9487cc841d822951ab5ae2d908a08 100644
--- a/chrome/common/extensions/api/file_handlers/file_handlers_parser.h
+++ b/extensions/common/manifest_handlers/file_handler_info.h
@@ -2,27 +2,44 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_COMMON_EXTENSIONS_API_FILE_HANDLERS_FILE_HANDLERS_PARSER_H_
-#define CHROME_COMMON_EXTENSIONS_API_FILE_HANDLERS_FILE_HANDLERS_PARSER_H_
+#ifndef EXTENSIONS_COMMON_MANIFEST_HANDLERS_FILE_HANDLER_INFO_H_
+#define EXTENSIONS_COMMON_MANIFEST_HANDLERS_FILE_HANDLER_INFO_H_
#include <set>
#include <string>
#include <vector>
-#include "chrome/common/extensions/file_handler_info.h"
#include "extensions/common/extension.h"
#include "extensions/common/manifest_handler.h"
namespace extensions {
+struct FileHandlerInfo {
+ FileHandlerInfo();
+ ~FileHandlerInfo();
+
+ // The id of this handler.
+ std::string id;
+
+ // The title of this handler.
+ std::string title;
+
+ // File extensions associated with this handler.
+ std::set<std::string> extensions;
+
+ // MIME types associated with this handler.
+ std::set<std::string> types;
+};
+
+typedef std::vector<FileHandlerInfo> FileHandlersInfo;
+
struct FileHandlers : public Extension::ManifestData {
FileHandlers();
virtual ~FileHandlers();
- std::vector<FileHandlerInfo> file_handlers;
+ FileHandlersInfo file_handlers;
- static const std::vector<FileHandlerInfo>* GetFileHandlers(
- const Extension* extension);
+ static const FileHandlersInfo* GetFileHandlers(const Extension* extension);
};
// Parses the "file_handlers" manifest key.
@@ -41,4 +58,4 @@ class FileHandlersParser : public ManifestHandler {
} // namespace extensions
-#endif // CHROME_COMMON_EXTENSIONS_API_FILE_HANDLERS_FILE_HANDLERS_PARSER_H_
+#endif // EXTENSIONS_COMMON_MANIFEST_HANDLERS_FILE_HANDLER_INFO_H_
« no previous file with comments | « extensions/common/common_manifest_handlers.cc ('k') | extensions/common/manifest_handlers/file_handler_info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698