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

Unified Diff: chrome/browser/plugins/plugin_metadata.h

Issue 11016005: Using MIME types in addition to plugin name to differentiate between plugins. (Closed) Base URL: http://git.chromium.org/chromium/src.git@5_plugins_resource_service
Patch Set: fixed error Created 8 years, 2 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/browser/plugins/plugin_finder_unittest.cc ('k') | chrome/browser/plugins/plugin_metadata.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/plugins/plugin_metadata.h
diff --git a/chrome/browser/plugins/plugin_metadata.h b/chrome/browser/plugins/plugin_metadata.h
index b8ca5e0d1976857cd99ca2d81f7ef24c8cfbb532..36ae7d1f14f49156c52a38c2324a41533f43a30d 100644
--- a/chrome/browser/plugins/plugin_metadata.h
+++ b/chrome/browser/plugins/plugin_metadata.h
@@ -40,7 +40,8 @@ class PluginMetadata {
bool url_for_display,
const GURL& plugin_url,
const GURL& help_url,
- const string16& group_name_matcher);
+ const string16& group_name_matcher,
+ const std::string& language);
~PluginMetadata();
// Unique identifier for the plug-in.
@@ -59,10 +60,18 @@ class PluginMetadata {
// URL to open when the user clicks on the "Problems installing?" link.
const GURL& help_url() const { return help_url_; }
+ const std::string& language() const { return language_; }
+
+ bool HasMimeType(const std::string& mime_type) const;
+ void AddMimeType(const std::string& mime_type);
+ void AddMatchingMimeType(const std::string& mime_type);
+
// Adds information about a plug-in version.
void AddVersion(const Version& version, SecurityStatus status);
- // Checks if the plug-in matches the group matcher.
+ // Checks if |plugin| mime types match all |matching_mime_types_|.
+ // If there is no |matching_mime_types_|, |group_name_matcher_| is used
+ // for matching.
bool MatchesPlugin(const webkit::WebPluginInfo& plugin);
// If |status_str| describes a valid security status, writes it to |status|
@@ -87,7 +96,10 @@ class PluginMetadata {
bool url_for_display_;
GURL plugin_url_;
GURL help_url_;
+ std::string language_;
std::map<Version, SecurityStatus, VersionComparator> versions_;
+ std::vector<std::string> all_mime_types_;
+ std::vector<std::string> matching_mime_types_;
DISALLOW_COPY_AND_ASSIGN(PluginMetadata);
};
« no previous file with comments | « chrome/browser/plugins/plugin_finder_unittest.cc ('k') | chrome/browser/plugins/plugin_metadata.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698