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

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: sync 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
Index: chrome/browser/plugins/plugin_finder.h
diff --git a/chrome/browser/plugins/plugin_finder.h b/chrome/browser/plugins/plugin_finder.h
index 0b6d1dee162bd09d32cd52044fb795c2577a8dfd..bc6515daa2a6e0709bd93d3bf752bf7705dc6495 100644
--- a/chrome/browser/plugins/plugin_finder.h
+++ b/chrome/browser/plugins/plugin_finder.h
@@ -41,7 +41,7 @@ class PluginFinder {
void Init();
#if defined(ENABLE_PLUGIN_INSTALLATION)
- void ReinitializePlugins(const base::DictionaryValue& json_metadata);
+ void ReinitializePlugins(scoped_ptr<base::DictionaryValue> json_metadata);
// 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
@@ -82,7 +82,7 @@ class PluginFinder {
// Returns NULL if the plug-in list couldn't be parsed.
static base::DictionaryValue* LoadPluginList();
- void InitInternal();
+ void InitInternal(scoped_ptr<base::DictionaryValue> plugin_list);
scoped_ptr<base::DictionaryValue> plugin_list_;
#if defined(ENABLE_PLUGIN_INSTALLATION)
@@ -91,6 +91,11 @@ class PluginFinder {
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_;

Powered by Google App Engine
This is Rietveld 408576698