|
@@ -701,7 +701,7 @@ namespace Chromium {
|
|
|
if (AdUrlRet.first)
|
|
|
{
|
|
|
auto strAdCmd = generateAdCmd(AdUrlRet.second);
|
|
|
- auto openAdRet = openCef(strAdCmd);
|
|
|
+ auto openAdRet = openCef(strAdCmd, false, !(m_UseUOSBrowser == 2));
|
|
|
if (Error_Succeed != openAdRet.first)
|
|
|
return std::make_pair(false, "open Ad err!");
|
|
|
else
|
|
@@ -737,7 +737,7 @@ namespace Chromium {
|
|
|
|
|
|
auto strCmdLine = generateMainCmd(mainUrlRet.second);
|
|
|
|
|
|
- auto openCefRet = openCef(strCmdLine, m_UseUOSBrowser == 0);//with guard
|
|
|
+ auto openCefRet = openCef(strCmdLine, m_UseUOSBrowser == 0, !(m_UseUOSBrowser == 2));//with guard
|
|
|
if (Error_Succeed == openCefRet.first) {
|
|
|
LogWarn(Severity_Middle, Error_Debug, LOG_EVT_CHROMIUM_OPEN_MAIN_URL,
|
|
|
CSimpleStringA::Format("StartChromiumBrowser %s", mainUrlRet.second.c_str()));
|
|
@@ -1243,7 +1243,7 @@ namespace Chromium {
|
|
|
#endif
|
|
|
}
|
|
|
|
|
|
- std::pair<ErrorCodeEnum, int> CModTools::openCef(std::string cmdline, bool isGuard)
|
|
|
+ std::pair<ErrorCodeEnum, int> CModTools::openCef(std::string cmdline, bool isGuard, bool usingSystemCmd)
|
|
|
{
|
|
|
if (isGuard) {
|
|
|
//mod_chromium相当于cefclient的守护进程
|
|
@@ -1258,11 +1258,14 @@ namespace Chromium {
|
|
|
DbgEx("startProcessInJob failed!");
|
|
|
return std::make_pair(std::get<0>(startRet) ? Error_Succeed : Error_Unexpect, std::get<1>(startRet));
|
|
|
#else
|
|
|
- auto systemStartChromium = [](std::string str) {
|
|
|
- //system(str.c_str());
|
|
|
- SystemRunTest(str);
|
|
|
+ auto systemStartChromium = [](std::string str, bool systemCmd) {
|
|
|
+ if (systemCmd) {
|
|
|
+ system(str.c_str());
|
|
|
+ } else {
|
|
|
+ SystemRunTest(str);
|
|
|
+ }
|
|
|
};
|
|
|
- boost::thread(systemStartChromium, cmdline).detach();
|
|
|
+ boost::thread(systemStartChromium, cmdline, usingSystemCmd).detach();
|
|
|
#endif
|
|
|
}
|
|
|
return std::make_pair(Error_Succeed, 0);
|