Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: src/plugin/PluginClass.cpp

Issue 11427013: Appear fast for IE (Closed)
Patch Set: Comments addressed Created Aug. 7, 2013, 4:01 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/plugin/PluginClass.cpp
===================================================================
--- a/src/plugin/PluginClass.cpp
+++ b/src/plugin/PluginClass.cpp
@@ -259,11 +259,8 @@
s_criticalSectionLocal.Lock();
{
- if (settings->GetPluginEnabled())
- {
- s_mimeFilter = CPluginClientFactory::GetMimeFilterClientInstance();
- }
-
+ // Always register on startup, then check if we need to unregister in a separate thread
+ s_mimeFilter = CPluginClientFactory::GetMimeFilterClientInstance();
s_asyncWebBrowser2 = unknownSite;
s_instances.Add(this);
}
@@ -732,9 +729,14 @@
bool CPluginClass::InitObject(bool bBHO)
{
+ CPluginSettings* settings = CPluginSettings::GetInstance();
+
+ if (!settings->GetPluginEnabled())
+ {
+ s_mimeFilter->Unregister();
+ }
+
// Load theme module
-
-
s_criticalSectionLocal.Lock();
{
if (!s_hUxtheme)
@@ -818,8 +820,6 @@
}
}
-
- CPluginSettings* settings = CPluginSettings::GetInstance();
return true;
}

Powered by Google App Engine
This is Rietveld