Parcourir la source

Z991239-6402 #comment feat: 去除chrome对上传无用接口的引用

Signed-Off-By: commit-hook
刘文涛80174520 il y a 3 mois
Parent
commit
ce75eea5c3
2 fichiers modifiés avec 1 ajouts et 68 suppressions
  1. 0 67
      Module/mod_chromium/CModTools.cpp
  2. 1 1
      Module/mod_chromium/CModTools.h

+ 0 - 67
Module/mod_chromium/CModTools.cpp

@@ -1365,73 +1365,6 @@ namespace Chromium {
 		return usercode;
 	}
 
-	bool CModTools::CheckTradeRecord() {
-		std::list<int> timeList;
-
-		using namespace Upload;
-		UploadService_ClientBase* pClient = new UploadService_ClientBase(m_pEntity);
-		auto rc = pClient->Connect();
-		if (rc != Error_Succeed)
-		{
-			DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM).setAPI(__FUNCTION__)("connect to Upload entity fail: %d", rc);
-			pClient->SafeDelete();
-			pClient = NULL;
-		}
-		else
-		{
-			UploadService_UploadDateList_Req req = {};
-			UploadService_UploadDateList_Ans ans = {};
-
-			rc = (*pClient)(EntityResource::getLink().upgradeLink())->UploadDateList(req, ans, 10000);
-
-			if (rc != Error_Succeed)
-				DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM).setAPI(__FUNCTION__)("get CreateProcessRunAs fail from FreeRDPWrap: %d", rc);
-			else
-			{
-				DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM).setAPI(__FUNCTION__)("UploadDateList succeed from Upload");
-				for (int i = 0; i < ans.uploadDateStr.GetCount(); ++i)
-				{
-					CSimpleStringA str = (CSimpleStringA)ans.uploadDateStr[i];
-					int t = StandardToStamp(ans.uploadDateStr[i], true);
-					timeList.emplace_back(t);
-				}
-			}
-			pClient->GetFunction()->CloseSession();
-			pClient = NULL;
-
-		}
-
-		// 比较时间戳 登记时间 <= 列表时间 < 今天 返回true
-		time_t now = time(0);
-		localtime(&now);
-		now -= now % (3600 * 24);
-		now -= 3600 * 8; //处理东八区问题
-		CSmartPointer<IConfigInfo> spConfig;
-		m_pEntity->GetFunction()->OpenConfig(Config_Run, spConfig);
-		CSimpleStringA strLastRecordTime = "";
-		ErrorCodeEnum errorRead = Error_Succeed;
-		errorRead = spConfig->ReadConfigValue("Record", "LastRecordTime", strLastRecordTime);
-		if (errorRead != Error_Succeed)
-		{
-			DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM).setAPI(__FUNCTION__)("Read Record LastRecordTime -> Failed! Maybe LastRecordTime not exist!");
-			strLastRecordTime = "";
-		}
-
-		int timestamp_lastRecordTime = now;
-		if (!strLastRecordTime.IsNullOrEmpty())
-		{
-			timestamp_lastRecordTime = StandardToStamp(strLastRecordTime, false);
-		}
-		for (std::list<int>::iterator it = timeList.begin(); it != timeList.end(); ++it)
-		{
-			if (timestamp_lastRecordTime <= *it && *it < now)
-			{
-				DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM).setAPI(__FUNCTION__)("CheckTradeRecord lastRecordTime=%d, time_list=%d, now=%d", timestamp_lastRecordTime, *it, now);
-				return true;
-			}
-		}
-		return false;
-	}
 
     void CModTools::InitBrowserUseMode()
     {

+ 1 - 1
Module/mod_chromium/CModTools.h

@@ -114,7 +114,7 @@ namespace Chromium {
 		std::string GetSpShellNextRebootTime();
 		void setLimitReason(const char* reason);
 		int StandardToStamp(const char* str_time, bool dateOnly);
-		bool CheckTradeRecord();
+		
 		void InitBrowserUseMode();
 		//0: 检测失败;1:使用旧版UOS浏览器uos-browser-stable ;2:使用新版UOS浏览器org.deepin.browser
 		int ToGetUOSBrowserType();