diff options
author | Monroe Linden <monroe@lindenlab.com> | 2010-03-26 16:19:34 -0700 |
---|---|---|
committer | Monroe Linden <monroe@lindenlab.com> | 2010-03-26 16:19:34 -0700 |
commit | 28e3190296f7d6791e6fd0297f9fcab10239648f (patch) | |
tree | 4d124327d7cb710d95f2a0a8bb0891333248639c | |
parent | 4e7838fb004f67c51d1b9991ba6782be7036bd7e (diff) |
Fix a couple of minor issues with the central cookie storage code.
Made LLViewerMedia::clearAllCookies() delete the new per-user cookie file (userdir/plugin_cookies.txt) as well as the old one.
Made LLViewerMedia::loadCookieFile() send the clear_cookies message to all loaded plugins.
-rw-r--r-- | indra/newview/llviewermedia.cpp | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 8863bf187d..ab55fcff6e 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -1018,6 +1018,7 @@ void LLViewerMedia::clearAllCookies() // Places that cookie files can be: // <getOSUserAppDir>/browser_profile/cookies // <getOSUserAppDir>/first_last/browser_profile/cookies (note that there may be any number of these!) + // <getOSUserAppDir>/first_last/plugin_cookies.txt (note that there may be any number of these!) std::string base_dir = gDirUtilp->getOSUserAppDir() + gDirUtilp->getDirDelimiter(); std::string target; @@ -1050,6 +1051,16 @@ void LLViewerMedia::clearAllCookies() { LLFile::remove(target); } + + target = base_dir; + target += filename; + target += gDirUtilp->getDirDelimiter(); + target += PLUGIN_COOKIE_FILE_NAME; + lldebugs << "target = " << target << llendl; + if(LLFile::isfile(target)) + { + LLFile::remove(target); + } } @@ -1142,7 +1153,18 @@ void LLViewerMedia::loadCookieFile() file.close(); - // TODO: send the clear_cookies message to all loaded plugins + // send the clear_cookies message to all loaded plugins + impl_list::iterator iter = sViewerMediaImplList.begin(); + impl_list::iterator end = sViewerMediaImplList.end(); + for (; iter != end; iter++) + { + LLViewerMediaImpl* pimpl = *iter; + if(pimpl->mMediaSource) + { + pimpl->mMediaSource->clear_cookies(); + } + } + } |