|
@@ -408,8 +408,18 @@ namespace Chromium {
|
|
|
if (stopAll)
|
|
|
killAllChromium();
|
|
|
else
|
|
|
- LogWarn(Severity_Low, Error_NotSupport, LOG_WARN_CHROMIUM_NOT_SUPPORT_TOKILL_SPECIFIED_BROWSER,
|
|
|
- CSimpleStringA::Format("StopChromiumBrowser: %s", reason._to_string()));
|
|
|
+ {
|
|
|
+ CSimpleStringA strBasePath(true);
|
|
|
+ this->m_pEntity->GetFunction()->GetPath("BaseDir", strBasePath);
|
|
|
+ std::string strPath(strBasePath.GetData());
|
|
|
+ std::string stopBrowser_path = "sudo " + strPath + SPLIT_SLASH_STR + "res" + SPLIT_SLASH_STR + "RunScript" + SPLIT_SLASH_STR + "stopBrowser.sh";
|
|
|
+ stopBrowser_path.append(" --vtm_browser_type=").append(reason._to_string());
|
|
|
+ DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM).setAPI(__FUNCTION__)("StopChromiumBrowser cmdline:%s", stopBrowser_path.c_str());
|
|
|
+ do {
|
|
|
+ boost::process::child child_process(stopBrowser_path);
|
|
|
+ child_process.wait();
|
|
|
+ } while (false);
|
|
|
+ }
|
|
|
#endif //_MSC_VER
|
|
|
}
|
|
|
|
|
@@ -599,8 +609,8 @@ namespace Chromium {
|
|
|
CSimpleStringA strBasePath(true);
|
|
|
this->m_pEntity->GetFunction()->GetPath("BaseDir", strBasePath);
|
|
|
std::string strPath(strBasePath.GetData());
|
|
|
- const std::string execute_newbrowser_path = strPath + SPLIT_SLASH_STR + "res" + SPLIT_SLASH_STR + "RunScript" + SPLIT_SLASH_STR + "startBrower.sh";
|
|
|
- const std::string execute_oldbrowser_path = strPath + SPLIT_SLASH_STR + "res" + SPLIT_SLASH_STR + "RunScript" + SPLIT_SLASH_STR + "startUOSBrower.sh";
|
|
|
+ const std::string execute_newbrowser_path = "sudo " + strPath + SPLIT_SLASH_STR + "res" + SPLIT_SLASH_STR + "RunScript" + SPLIT_SLASH_STR + "startBrower.sh";
|
|
|
+ const std::string execute_oldbrowser_path = "sudo " + strPath + SPLIT_SLASH_STR + "res" + SPLIT_SLASH_STR + "RunScript" + SPLIT_SLASH_STR + "startUOSBrower.sh";
|
|
|
CSimpleStringA strParams(true);
|
|
|
if (width > 0 && height > 0)
|
|
|
strParams.Append(" --window-size=").Append(std::to_string(width).c_str()).Append(",").Append(std::to_string(height).c_str());
|
|
@@ -669,6 +679,7 @@ namespace Chromium {
|
|
|
CSimpleStringA usrDataPath(tempPath);
|
|
|
usrDataPath.Append(SPLIT_SLASH_STR).Append("UOSBrowserConfig_").Append(name.c_str());
|
|
|
strParams.Append(" --user-data-dir=").Append(usrDataPath);
|
|
|
+ strParams.Append(" --vtm_browser_type=").Append(name.c_str());
|
|
|
|
|
|
CSimpleStringA debug_log_path = usrDataPath + "/chrome_debug.log";
|
|
|
if (ConfigManager::getInstance().m_withDebugMode)
|
|
@@ -706,6 +717,7 @@ namespace Chromium {
|
|
|
CSimpleStringA usrDataPath(tempPath);
|
|
|
usrDataPath.Append(SPLIT_SLASH_STR).Append("BrowserConfig_").Append(name.c_str());
|
|
|
strParams.Append(" --user-data-dir=").Append(usrDataPath);
|
|
|
+ strParams.Append(" --vtm_browser_type=").Append(name.c_str());
|
|
|
CSimpleStringA debug_log_path = usrDataPath + "/chrome_debug.log";
|
|
|
if (ConfigManager::getInstance().m_withDebugMode)
|
|
|
strParams.Append(" --enable-logging --vmodule=*/webrtc/*=2,*/media/*=2 --log-file=").Append(debug_log_path);
|
|
@@ -787,11 +799,11 @@ namespace Chromium {
|
|
|
CSimpleStringA strBasePath(true);
|
|
|
this->m_pEntity->GetFunction()->GetPath("BaseDir", strBasePath);
|
|
|
std::string strPath(strBasePath.GetData());
|
|
|
- const std::string execute_newbrowser_path = strPath + SPLIT_SLASH_STR + "res" + SPLIT_SLASH_STR + "RunScript" + SPLIT_SLASH_STR + "startBrower.sh";
|
|
|
- const std::string execute_oldbrowser_path = strPath + SPLIT_SLASH_STR + "res" + SPLIT_SLASH_STR + "RunScript" + SPLIT_SLASH_STR + "startUOSBrower.sh";
|
|
|
+ const std::string execute_newbrowser_path = "sudo " + strPath + SPLIT_SLASH_STR + "res" + SPLIT_SLASH_STR + "RunScript" + SPLIT_SLASH_STR + "startBrower.sh";
|
|
|
+ const std::string execute_oldbrowser_path = "sudo " + strPath + SPLIT_SLASH_STR + "res" + SPLIT_SLASH_STR + "RunScript" + SPLIT_SLASH_STR + "startUOSBrower.sh";
|
|
|
|
|
|
std::string name = "";
|
|
|
- if (pageType == 0 || pageType == 2 || pageType == 3) {
|
|
|
+ if (pageType == 0) {
|
|
|
name = (+ERR_PAGE_REASON::main)._to_string();
|
|
|
}
|
|
|
else if (pageType == 1) {
|
|
@@ -891,6 +903,7 @@ namespace Chromium {
|
|
|
usrDataPath.Append(CSimpleStringA(SPLIT_SLASH_STR)).Append("UOSBrowserConfigMain_").Append((+ERR_PAGE_REASON::OutsideRequest)._to_string());
|
|
|
}
|
|
|
strParams.Append(" --user-data-dir=").Append(usrDataPath);
|
|
|
+ strParams.Append(" --vtm_browser_type=").Append(name.c_str());
|
|
|
|
|
|
CSimpleStringA debug_log_path = usrDataPath + "/chrome_debug.log";
|
|
|
if (ConfigManager::getInstance().m_withDebugMode)
|
|
@@ -967,6 +980,7 @@ namespace Chromium {
|
|
|
cachePath.Append(CSimpleStringA(SPLIT_SLASH_STR)).Append("BrowserConfigMain_").Append((+ERR_PAGE_REASON::OutsideRequest)._to_string());
|
|
|
}
|
|
|
strParams.Append(" --user-data-dir=").Append(usrDataPath);
|
|
|
+ strParams.Append(" --vtm_browser_type=").Append(name.c_str());
|
|
|
CSimpleStringA debug_log_path = usrDataPath + "/chrome_debug.log";
|
|
|
if (ConfigManager::getInstance().m_withDebugMode)
|
|
|
strParams.Append(" --enable-logging --vmodule=*/webrtc/*=2,*/media/*=2 --log-file=").Append(debug_log_path);
|
|
@@ -1138,7 +1152,7 @@ namespace Chromium {
|
|
|
if (!checkRet.first)
|
|
|
{
|
|
|
LogWarn(Severity_High, Error_NetBroken, LOG_WARN_CHROMIUM_INSTALL_URLS_CHECK,
|
|
|
- CSimpleString::Format("install page check err, can not connect to %s or %s", installUrls[0].c_str(), installUrls[1].c_str()).GetData());
|
|
|
+ CSimpleString::Format("install page check err, can not connect to %s", installUrls[0].c_str()));
|
|
|
}
|
|
|
std::string dstInstallUrl = checkRet.first ? checkRet.second : installUrls[0];
|
|
|
CSimpleString runningVer = "";
|
|
@@ -1450,8 +1464,8 @@ namespace Chromium {
|
|
|
CSimpleStringA strBasePath(true);
|
|
|
this->m_pEntity->GetFunction()->GetPath("BaseDir", strBasePath);
|
|
|
std::string strPath(strBasePath.GetData());
|
|
|
- const std::string execute_newbrowser_path = strPath + SPLIT_SLASH_STR + "res" + SPLIT_SLASH_STR + "RunScript" + SPLIT_SLASH_STR + "startBrower.sh";
|
|
|
- const std::string execute_oldbrowser_path = strPath + SPLIT_SLASH_STR + "res" + SPLIT_SLASH_STR + "RunScript" + SPLIT_SLASH_STR + "startUOSBrower.sh";
|
|
|
+ const std::string execute_newbrowser_path = "sudo " + strPath + SPLIT_SLASH_STR + "res" + SPLIT_SLASH_STR + "RunScript" + SPLIT_SLASH_STR + "startBrower.sh";
|
|
|
+ const std::string execute_oldbrowser_path = "sudo " + strPath + SPLIT_SLASH_STR + "res" + SPLIT_SLASH_STR + "RunScript" + SPLIT_SLASH_STR + "startUOSBrower.sh";
|
|
|
|
|
|
int result(0);
|
|
|
std::string additional("");
|