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

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

Issue 11348046: Add versioning to PluginFinder metadata. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: chromeos Created 7 years, 10 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/browser_process_impl.cc ('k') | chrome/browser/plugins/plugin_finder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/plugins/plugin_finder.h
diff --git a/chrome/browser/plugins/plugin_finder.h b/chrome/browser/plugins/plugin_finder.h
index b4bbb987d15d1a86150ad2e4c77906d31d498110..5f98bd65bc593a3ff9bbf5299e9beb389082cb34 100644
--- a/chrome/browser/plugins/plugin_finder.h
+++ b/chrome/browser/plugins/plugin_finder.h
@@ -40,9 +40,9 @@ class PluginFinder {
// It should be called on the UI thread.
void Init();
-#if defined(ENABLE_PLUGIN_INSTALLATION)
- void ReinitializePlugins(const base::DictionaryValue& json_metadata);
+ void ReinitializePlugins(const base::DictionaryValue* json_metadata);
+#if defined(ENABLE_PLUGIN_INSTALLATION)
// Finds a plug-in for the given MIME type and language (specified as an IETF
// language tag, i.e. en-US). If found, sets |installer| to the
// corresponding PluginInstaller and |plugin_metadata| to a copy of the
@@ -76,21 +76,21 @@ class PluginFinder {
PluginFinder();
~PluginFinder();
- static base::DictionaryValue* ComputePluginList();
-
// Loads the plug-in information from the browser resources and parses it.
// Returns NULL if the plug-in list couldn't be parsed.
- static base::DictionaryValue* LoadPluginList();
+ static base::DictionaryValue* LoadBuiltInPluginList();
- void InitInternal();
-
- scoped_ptr<base::DictionaryValue> plugin_list_;
#if defined(ENABLE_PLUGIN_INSTALLATION)
std::map<std::string, PluginInstaller*> installers_;
#endif
std::map<std::string, PluginMetadata*> identifier_plugin_;
+ // Version of the metadata information. We use this to consolidate multiple
+ // sources (baked into resource and fetched from a URL), making sure that we
+ // don't overwrite newer versions with older ones.
+ int version_;
+
// Synchronization for the above member variables is
// required since multiple threads can be accessing them concurrently.
base::Lock mutex_;
« no previous file with comments | « chrome/browser/browser_process_impl.cc ('k') | chrome/browser/plugins/plugin_finder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698