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

Unified Diff: chrome/common/extensions/mime_types_handler.cc

Issue 254503002: Add mime_type_handler key to extension manifests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Make the field optional Created 6 years, 8 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
« no previous file with comments | « chrome/common/extensions/mime_types_handler.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/mime_types_handler.cc
diff --git a/chrome/common/extensions/mime_types_handler.cc b/chrome/common/extensions/mime_types_handler.cc
index ea822274e56c52374d56964a4f41e54deabc6c4a..410a3a7a1f84ceb79aa3ec2b888d2bbd48757581 100644
--- a/chrome/common/extensions/mime_types_handler.cc
+++ b/chrome/common/extensions/mime_types_handler.cc
@@ -99,10 +99,19 @@ bool MimeTypesHandlerParser::Parse(extensions::Extension* extension,
info->handler_.AddMIMEType(filter);
}
+ std::string mime_types_handler;
+ if (extension->manifest()->GetString(keys::kMimeTypesHandler,
+ &mime_types_handler)) {
+ info->handler_.set_handler_url(mime_types_handler);
+ }
+
extension->SetManifestData(keys::kMimeTypesHandler, info.release());
return true;
}
const std::vector<std::string> MimeTypesHandlerParser::Keys() const {
- return SingleKey(keys::kMIMETypes);
+ std::vector<std::string> keys;
+ keys.push_back(keys::kMIMETypes);
+ keys.push_back(keys::kMimeTypesHandler);
+ return keys;
}
« no previous file with comments | « chrome/common/extensions/mime_types_handler.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698