summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorAndreyL ProductEngine <alihatskiy@productengine.com>2019-09-14 05:13:53 +0300
committerAndreyL ProductEngine <alihatskiy@productengine.com>2019-09-14 05:13:53 +0300
commitddbe9583ff0732ac6b8832a476fed4c6e0d54a49 (patch)
tree3af86f07efdc314ae1dfbf0639aaf4b77e0aa79c /indra
parenta07b64d30e65c3b448879825150336a498e91a15 (diff)
Backed out changeset: a6398f90389a
Diffstat (limited to 'indra')
-rw-r--r--indra/llplugin/llpluginclassmedia.cpp2
-rw-r--r--indra/llplugin/llpluginclassmedia.h2
-rw-r--r--indra/media_plugins/cef/media_plugin_cef.cpp4
-rw-r--r--indra/newview/llviewermedia.cpp11
4 files changed, 13 insertions, 6 deletions
diff --git a/indra/llplugin/llpluginclassmedia.cpp b/indra/llplugin/llpluginclassmedia.cpp
index 483a967db6..58069afdf9 100644
--- a/indra/llplugin/llpluginclassmedia.cpp
+++ b/indra/llplugin/llpluginclassmedia.cpp
@@ -857,10 +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 &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("cef_log_file", user_data_path_cef_log);
bool cef_verbose_log = gSavedSettings.getBOOL("CefVerboseLog");
diff --git a/indra/llplugin/llpluginclassmedia.h b/indra/llplugin/llpluginclassmedia.h
index 6f2b875116..9d11ee0421 100644
--- a/indra/llplugin/llpluginclassmedia.h
+++ b/indra/llplugin/llpluginclassmedia.h
@@ -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_cef_log);
+ 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 setLanguageCode(const std::string &language_code);
void setPluginsEnabled(const bool enabled);
void setJavascriptEnabled(const bool enabled);
diff --git a/indra/media_plugins/cef/media_plugin_cef.cpp b/indra/media_plugins/cef/media_plugin_cef.cpp
index 07d82d1a93..d5def44edb 100644
--- a/indra/media_plugins/cef/media_plugin_cef.cpp
+++ b/indra/media_plugins/cef/media_plugin_cef.cpp
@@ -96,6 +96,7 @@ private:
bool mCanCopy;
bool mCanPaste;
std::string mCachePath;
+ std::string mCookiePath;
std::string mCefLogFile;
bool mCefLogVerbose;
std::vector<std::string> mPickedFiles;
@@ -127,6 +128,7 @@ MediaPluginBase(host_send_func, host_user_data)
mCanCopy = false;
mCanPaste = false;
mCachePath = "";
+ mCookiePath = "";
mCefLogFile = "";
mCefLogVerbose = false;
mPickedFiles.clear();
@@ -507,6 +509,7 @@ void MediaPluginCEF::receiveMessage(const char* message_string)
settings.background_color = 0xffffffff;
settings.cache_enabled = true;
settings.cache_path = mCachePath;
+ settings.cookie_store_path = mCookiePath;
settings.cookies_enabled = mCookiesEnabled;
settings.disable_gpu = mDisableGPU;
settings.flash_enabled = mPluginsEnabled;
@@ -561,6 +564,7 @@ void MediaPluginCEF::receiveMessage(const char* message_string)
std::string user_data_path_cookies = message_in.getValue("cookies_path");
mCachePath = user_data_path_cache + "cef_cache";
+ mCookiePath = user_data_path_cookies + "cef_cookies";
mCefLogFile = message_in.getValue("cef_log_file");
mCefLogVerbose = message_in.getValueBoolean("cef_verbose_log");
}
diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp
index a9eb79b649..d4487b22c9 100644
--- a/indra/newview/llviewermedia.cpp
+++ b/indra/newview/llviewermedia.cpp
@@ -1731,10 +1731,12 @@ LLPluginClassMedia* LLViewerMediaImpl::newSourceFromMediaType(std::string media_
std::string launcher_name = gDirUtilp->getLLPluginLauncher();
std::string plugin_name = gDirUtilp->getLLPluginFilename(plugin_basename);
- // cookies now are stored in the CEF cache directory too (no more control over their location)
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.)
@@ -1745,9 +1747,8 @@ LLPluginClassMedia* LLViewerMediaImpl::newSourceFromMediaType(std::string media_
std::string linden_user_dir = gDirUtilp->getLindenUserDir();
if ( ! linden_user_dir.empty() )
{
- // cookies now are stored in the CEF cache directory too (no more control over their location)
- user_data_path_cache = linden_user_dir;
- user_data_path_cache += gDirUtilp->getDirDelimiter();
+ user_data_path_cookies = linden_user_dir;
+ user_data_path_cookies += gDirUtilp->getDirDelimiter();
};
// See if the plugin executable exists
@@ -1766,7 +1767,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_cef_log);
+ media_source->setUserDataPath(user_data_path_cache, user_data_path_cookies, user_data_path_cef_log);
media_source->setLanguageCode(LLUI::getLanguage());
media_source->setZoomFactor(zoom_factor);