Index: chrome/browser/extensions/external_extension_provider_impl.h |
=================================================================== |
--- chrome/browser/extensions/external_extension_provider_impl.h (revision 106274) |
+++ chrome/browser/extensions/external_extension_provider_impl.h (working copy) |
@@ -50,7 +50,7 @@ |
// Sets underlying prefs and notifies provider. Only to be called by the |
// owned ExternalExtensionLoader instance. |
- void SetPrefs(base::DictionaryValue* prefs); |
+ virtual void SetPrefs(base::DictionaryValue* prefs); |
// ExternalExtensionProvider implementation: |
virtual void ServiceShutdown() OVERRIDE; |
@@ -69,9 +69,16 @@ |
static const char kExternalUpdateUrl[]; |
static const char kSupportedLocales[]; |
+ // Used only for testing. |
+ const std::set<std::string>& invalid_extensions() const { |
+ return invalid_extensions_; |
+ } |
+ |
protected: |
VisitorInterface* service() const { return service_; } |
+ base::DictionaryValue* prefs() const { return prefs_.get(); } |
+ |
private: |
// Location for external extensions that are provided by this provider from |
// local crx files. |
@@ -96,6 +103,15 @@ |
// via |SetPrefs|. |
scoped_refptr<ExternalExtensionLoader> loader_; |
+ // Extensions that were found to be invalid while processing the prefs_ |
+ // dictionary. These are extensions that this provider did not even attempt |
+ // to install because they failed one or more of the checks in SetPrefs(). |
+ // |
+ // TODO(mihai): It would be nice to simply remove these extensions from |
+ // prefs_, but for now, there is code that depends on these invalid extensions |
Mihai Parparita -not on Chrome
2011/10/20 02:30:25
I didn't mean that there was code that relies on t
Roger Tawa OOO till Jul 10th
2011/10/20 14:31:15
OK. I think it would be better to have the commen
|
+ // still being available to HasExtension(). See how to fix this. |
+ std::set<std::string> invalid_extensions_; |
+ |
DISALLOW_COPY_AND_ASSIGN(ExternalExtensionProviderImpl); |
}; |