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

Unified Diff: Shared/PluginClass.cpp

Issue 9422198: Exe updater support and bug fixes (Closed)
Patch Set: Created Feb. 28, 2013, 10:37 a.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
« no previous file with comments | « Shared/Config.h ('k') | Shared/PluginClassThread.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Shared/PluginClass.cpp
===================================================================
--- a/Shared/PluginClass.cpp
+++ b/Shared/PluginClass.cpp
@@ -278,8 +278,15 @@
::ZeroMemory(&si, sizeof(si));
si.cb = sizeof(si);
si.wShowWindow = FALSE;
-
- CString cpath = _T("\"msiexec.exe\" /i \"") + strPath + _T("\" UPDATEPLUGIN=\"True\"");
+ CString cpath;
+ if (strPath.Find(L".exe") == strPath.GetLength() - 4)
+ {
+ cpath = strPath;
+ }
+ else
+ {
+ cpath = _T("\"msiexec.exe\" /i \"") + strPath + _T("\" UPDATEPLUGIN=\"True\"");
+ }
if (!::CreateProcess(NULL, cpath.GetBuffer(), NULL, NULL, FALSE, CREATE_BREAKAWAY_FROM_JOB, NULL, NULL, &si, &pi))
{
@@ -322,7 +329,7 @@
// so we should handle that it is called this way several times during a session
STDMETHODIMP CPluginClass::SetSite(IUnknown* unknownSite)
{
-
+
CPluginSettings* settings = CPluginSettings::GetInstance();
#ifdef AVAST_ABP
HKEY hkey;
@@ -933,6 +940,12 @@
bool CPluginClass::CreateStatusBarPane()
{
+ CPluginClient* client = CPluginClient::GetInstance();
+
+ if (client->GetIEVersion()< 7)
+
+ return true;
+
TCHAR szClassName[MAX_PATH];
// Get browser window and url
@@ -2174,9 +2187,12 @@
{
CreateStatusBarPane();
}
- if (!::InvalidateRect(m_hPaneWnd, NULL, FALSE))
+ if (m_hPaneWnd != NULL)
{
- DEBUG_ERROR_LOG(::GetLastError(), PLUGIN_ERROR_UI, PLUGIN_ERROR_UI_INVALIDATE_STATUSBAR, "Class::Invalidate statusbar");
+ if (!::InvalidateRect(m_hPaneWnd, NULL, FALSE))
+ {
+ DEBUG_ERROR_LOG(::GetLastError(), PLUGIN_ERROR_UI, PLUGIN_ERROR_UI_INVALIDATE_STATUSBAR, "Class::Invalidate statusbar");
+ }
}
}
« no previous file with comments | « Shared/Config.h ('k') | Shared/PluginClassThread.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld