SL-13567 Users should have separate CEF contexts
parent
117dfd9855
commit
383352c61c
|
|
@ -580,9 +580,9 @@
|
|||
<key>archive</key>
|
||||
<map>
|
||||
<key>hash</key>
|
||||
<string>350866eec6be17ffc265904b91dcfe6b</string>
|
||||
<string>a6af5d12440c2ec4d15d268dae5c017a</string>
|
||||
<key>url</key>
|
||||
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/60900/572290/dullahan-1.7.0.202005311125_81.3.10_gb223419_chromium-81.0.4044.138-darwin64-543086.tar.bz2</string>
|
||||
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/63772/599587/dullahan-1.7.0.202007170815_81.3.10_gb223419_chromium-81.0.4044.138-darwin64-545143.tar.bz2</string>
|
||||
</map>
|
||||
<key>name</key>
|
||||
<string>darwin64</string>
|
||||
|
|
@ -592,9 +592,9 @@
|
|||
<key>archive</key>
|
||||
<map>
|
||||
<key>hash</key>
|
||||
<string>aa4faf9ef9057362d63f8d57092506b3</string>
|
||||
<string>1f1c8b2850da982dfa876cb9b55707d7</string>
|
||||
<key>url</key>
|
||||
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/60902/572301/dullahan-1.7.0.202005311828_81.3.10_gb223419_chromium-81.0.4044.138-windows-543086.tar.bz2</string>
|
||||
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/63774/599578/dullahan-1.7.0.202007171514_81.3.10_gb223419_chromium-81.0.4044.138-windows-545143.tar.bz2</string>
|
||||
</map>
|
||||
<key>name</key>
|
||||
<string>windows</string>
|
||||
|
|
@ -604,16 +604,16 @@
|
|||
<key>archive</key>
|
||||
<map>
|
||||
<key>hash</key>
|
||||
<string>6e29ea2ccdad80dcf1b5dc974932c1f6</string>
|
||||
<string>73bce404b3a8c4f252eeca4400c4bc19</string>
|
||||
<key>url</key>
|
||||
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/60901/572302/dullahan-1.7.0.202005311828_81.3.10_gb223419_chromium-81.0.4044.138-windows64-543086.tar.bz2</string>
|
||||
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/63773/599579/dullahan-1.7.0.202007171514_81.3.10_gb223419_chromium-81.0.4044.138-windows64-545143.tar.bz2</string>
|
||||
</map>
|
||||
<key>name</key>
|
||||
<string>windows64</string>
|
||||
</map>
|
||||
</map>
|
||||
<key>version</key>
|
||||
<string>1.7.0.202005311828_81.3.10_gb223419_chromium-81.0.4044.138</string>
|
||||
<string>1.7.0.202007171514_81.3.10_gb223419_chromium-81.0.4044.138</string>
|
||||
</map>
|
||||
<key>elfio</key>
|
||||
<map>
|
||||
|
|
|
|||
|
|
@ -857,12 +857,12 @@ void LLPluginClassMedia::paste()
|
|||
}
|
||||
|
||||
void LLPluginClassMedia::setUserDataPath(const std::string &user_data_path_cache,
|
||||
const std::string &user_data_path_cookies,
|
||||
const std::string &username,
|
||||
const std::string &user_data_path_cef_log)
|
||||
{
|
||||
LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "set_user_data_path");
|
||||
message.setValue("cache_path", user_data_path_cache);
|
||||
message.setValue("cookies_path", user_data_path_cookies);
|
||||
message.setValue("cache_path", user_data_path_cache);
|
||||
message.setValue("username", username); // cef shares cache between users but creates user-based contexts
|
||||
message.setValue("cef_log_file", user_data_path_cef_log);
|
||||
|
||||
bool cef_verbose_log = gSavedSettings.getBOOL("CefVerboseLog");
|
||||
|
|
|
|||
|
|
@ -195,7 +195,7 @@ public:
|
|||
bool canPaste() const { return mCanPaste; };
|
||||
|
||||
// These can be called before init(), and they will be queued and sent before the media init message.
|
||||
void setUserDataPath(const std::string &user_data_path_cache, const std::string &user_data_path_cookies, const std::string &user_data_path_cef_log);
|
||||
void setUserDataPath(const std::string &user_data_path_cache, const std::string &username, const std::string &user_data_path_cef_log);
|
||||
void setLanguageCode(const std::string &language_code);
|
||||
void setPluginsEnabled(const bool enabled);
|
||||
void setJavascriptEnabled(const bool enabled);
|
||||
|
|
|
|||
|
|
@ -98,7 +98,9 @@ private:
|
|||
bool mCanCut;
|
||||
bool mCanCopy;
|
||||
bool mCanPaste;
|
||||
std::string mRootCachePath;
|
||||
std::string mCachePath;
|
||||
std::string mContextCachePath;
|
||||
std::string mCefLogFile;
|
||||
bool mCefLogVerbose;
|
||||
std::vector<std::string> mPickedFiles;
|
||||
|
|
@ -527,7 +529,9 @@ void MediaPluginCEF::receiveMessage(const char* message_string)
|
|||
settings.accept_language_list = mHostLanguage;
|
||||
settings.background_color = 0xffffffff;
|
||||
settings.cache_enabled = true;
|
||||
settings.root_cache_path = mRootCachePath;
|
||||
settings.cache_path = mCachePath;
|
||||
settings.context_cache_path = mContextCachePath;
|
||||
settings.cookies_enabled = mCookiesEnabled;
|
||||
settings.disable_gpu = mDisableGPU;
|
||||
#if LL_DARWIN
|
||||
|
|
@ -583,9 +587,25 @@ void MediaPluginCEF::receiveMessage(const char* message_string)
|
|||
else if (message_name == "set_user_data_path")
|
||||
{
|
||||
std::string user_data_path_cache = message_in.getValue("cache_path");
|
||||
std::string user_data_path_cookies = message_in.getValue("cookies_path");
|
||||
std::string subfolder = message_in.getValue("username");
|
||||
|
||||
mCachePath = user_data_path_cache + "cef_cache";
|
||||
mRootCachePath = user_data_path_cache + "cef_cache";
|
||||
if (!subfolder.empty())
|
||||
{
|
||||
std::string delim;
|
||||
#if LL_WINDOWS
|
||||
// media plugin doesn't have access to gDirUtilp
|
||||
delim = "\\";
|
||||
#else
|
||||
delim = "/";
|
||||
#endif
|
||||
mCachePath = mRootCachePath + delim + subfolder;
|
||||
}
|
||||
else
|
||||
{
|
||||
mCachePath = mRootCachePath;
|
||||
}
|
||||
mContextCachePath = ""; // disabled by ""
|
||||
mCefLogFile = message_in.getValue("cef_log_file");
|
||||
mCefLogVerbose = message_in.getValueBoolean("cef_verbose_log");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1719,23 +1719,8 @@ LLPluginClassMedia* LLViewerMediaImpl::newSourceFromMediaType(std::string media_
|
|||
std::string user_data_path_cache = gDirUtilp->getCacheDir(false);
|
||||
user_data_path_cache += gDirUtilp->getDirDelimiter();
|
||||
|
||||
std::string user_data_path_cookies = gDirUtilp->getOSUserAppDir();
|
||||
user_data_path_cookies += gDirUtilp->getDirDelimiter();
|
||||
|
||||
std::string user_data_path_cef_log = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "cef_log.txt");
|
||||
|
||||
// Fix for EXT-5960 - make browser profile specific to user (cache, cookies etc.)
|
||||
// If the linden username returned is blank, that can only mean we are
|
||||
// at the login page displaying login Web page or Web browser test via Develop menu.
|
||||
// In this case we just use whatever gDirUtilp->getOSUserAppDir() gives us (this
|
||||
// is what we always used before this change)
|
||||
std::string linden_user_dir = gDirUtilp->getLindenUserDir();
|
||||
if ( ! linden_user_dir.empty() )
|
||||
{
|
||||
user_data_path_cookies = linden_user_dir;
|
||||
user_data_path_cookies += gDirUtilp->getDirDelimiter();
|
||||
};
|
||||
|
||||
// See if the plugin executable exists
|
||||
llstat s;
|
||||
if(LLFile::stat(launcher_name, &s))
|
||||
|
|
@ -1752,7 +1737,7 @@ LLPluginClassMedia* LLViewerMediaImpl::newSourceFromMediaType(std::string media_
|
|||
{
|
||||
media_source = new LLPluginClassMedia(owner);
|
||||
media_source->setSize(default_width, default_height);
|
||||
media_source->setUserDataPath(user_data_path_cache, user_data_path_cookies, user_data_path_cef_log);
|
||||
media_source->setUserDataPath(user_data_path_cache, gDirUtilp->getUserName(), user_data_path_cef_log);
|
||||
media_source->setLanguageCode(LLUI::getLanguage());
|
||||
media_source->setZoomFactor(zoom_factor);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue