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

Unified Diff: src/plugin/PluginClientBase.h

Issue 29323611: Issue #1234, #2058 - Rewrite log facility, improving thread implementation
Patch Set: rebase only Created Nov. 26, 2015, 1:07 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
« no previous file with comments | « src/plugin/PluginClass.cpp ('k') | src/plugin/PluginClientBase.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/plugin/PluginClientBase.h
===================================================================
deleted file mode 100644
--- a/src/plugin/PluginClientBase.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * This file is part of Adblock Plus <https://adblockplus.org/>,
- * Copyright (C) 2006-2015 Eyeo GmbH
- *
- * Adblock Plus is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 3 as
- * published by the Free Software Foundation.
- *
- * Adblock Plus is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef _PLUGIN_CLIENT_BASE_H_
-#define _PLUGIN_CLIENT_BASE_H_
-
-#include <vector>
-#include "ATL_Deprecate.h"
-
-class CPluginError
-{
-
-private:
-
- int m_errorId;
- int m_errorSubid;
- DWORD m_errorCode;
- std::string m_errorDescription;
- DWORD m_processId;
- DWORD m_threadId;
-
-public:
-
- CPluginError(int errorId, int errorSubid, DWORD errorCode, const std::string& errorDesc) :
- m_errorId(errorId), m_errorSubid(errorSubid), m_errorCode(errorCode), m_errorDescription(errorDesc)
- {
- m_processId = ::GetCurrentProcessId();
- m_threadId = ::GetCurrentThreadId();
- }
-
- CPluginError() :
- m_errorId(0), m_errorSubid(0), m_errorCode(0), m_processId(0), m_threadId(0) {}
-
- CPluginError(const CPluginError& org) :
- m_errorId(org.m_errorId), m_errorSubid(org.m_errorSubid), m_errorCode(org.m_errorCode), m_errorDescription(org.m_errorDescription), m_processId(org.m_processId), m_threadId(org.m_threadId) {}
-
- int GetErrorId() const { return m_errorId; }
- int GetErrorSubid() const { return m_errorSubid; }
- DWORD GetErrorCode() const { return m_errorCode; }
- std::string GetErrorDescription() const { return m_errorDescription; }
- DWORD GetProcessId() const { return m_processId; }
- DWORD GetThreadId() const { return m_threadId; }
-};
-
-
-class LogQueue
-{
-private:
- static std::vector<CPluginError> s_pluginErrors;
- static CComAutoCriticalSection s_criticalSectionQueue;
-
-public:
- static void LogPluginError(DWORD errorCode, int errorId, int errorSubid, const std::string& description="", bool isAsync=false, DWORD dwProcessId=0, DWORD dwThreadId=0);
- static void PostPluginError(int errorId, int errorSubid, DWORD errorCode, const std::string& errorDescription);
- static bool PopFirstPluginError(CPluginError& pluginError);
-};
-
-#endif // _PLUGIN_CLIENT_BASE_H_
« no previous file with comments | « src/plugin/PluginClass.cpp ('k') | src/plugin/PluginClientBase.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld