Browse Source

#IQRV #comment [DeviceControl] 移除清缓存的操作

gifur 3 years ago
parent
commit
2a8feab66e

+ 0 - 42
Module/mod_DeviceControl/DeviceControlFSM.cpp

@@ -124,7 +124,6 @@ ErrorCodeEnum CDeviceControlFSM::OnInit()
         }
     }
 
-    DoBrowserCacheClearJob();
     //DoRestartSogouServicesJob();
 
     return Error_Succeed;
@@ -162,47 +161,6 @@ ErrorCodeEnum CDeviceControlFSM::InitializeTokenLib()
 #endif //RVC_OS_WIN
 }
 
-void CDeviceControlFSM::DoBrowserCacheClearJob()
-{
-    LOG_FUNCTION();
-
-    CSmartPointer<IConfigInfo> spConfig;
-    ErrorCodeEnum err = GetEntityBase()->GetFunction()->OpenConfig(Config_Run, spConfig);
-    CSimpleStringA str(true);
-    err = spConfig->ReadConfigValue("Browser", "CacheClear", str);
-    if (str.Compare("true", true) == 0) {
-
-        BOOL bSucc(FALSE);
-        CSimpleStringA strCachePath;
-        GetEntityBase()->GetFunction()->GetPath("Temp", strCachePath);
-        if (!strCachePath.IsNullOrEmpty()) {
-
-            bSucc = TRUE;
-
-            const char* cacheDirs[] = {"cefCache", "cefCache_Ad", "cefCache_breakdown", "cefCache_ErrNotify", "cefCache_main"
-                , "UOSBrowser_Ad", "UOSBrowser_main" };
- 
-            for(int i=0; i<array_size(cacheDirs); ++i)
-            {
-                CSimpleStringA strcefCachePath(strCachePath);
-                strcefCachePath += SPLIT_SLASH_STR;
-                strcefCachePath += cacheDirs[i];
-
-                if (ExistsDirA(strcefCachePath)) {
-                    RemoveDirRecursiveA(strcefCachePath);
-                    LogWarn(Severity_Middle, Error_Debug, LOG_DEVICECONTROL_BROWSER_CACHE_CLEAER, 
-                            CSimpleStringA::Format("clear chromium browser cache: %s", strcefCachePath.GetData()));
-                }
-
-            } 
-        }
-
-        if (bSucc) {
-            spConfig->WriteConfigValue("Browser", "CacheClear", NULL);
-        }
-    }
-}
-
 void CDeviceControlFSM::DoRestartSogouServicesJob()
 {
     LOG_FUNCTION();

+ 0 - 1
Module/mod_DeviceControl/DeviceControlFSM.h

@@ -153,7 +153,6 @@ public:
 	ErrorCodeEnum InitializeTokenLib();
 	ErrorCodeEnum RestartSogouServices();
 private:
-	void DoBrowserCacheClearJob();
 	void DoRestartSogouServicesJob();