Fix "clear cookies" not clearing cookies in some cases

LLViewerMedia::clearAllCookies was sending "clear cookies" messages to all plugins and deleting cookie files, but it wasn't clearing the cookies in the central store.  It now does all of the above.
meow-7.2.2
Monroe Linden 2010-03-26 18:21:10 -07:00
parent 8a3fe4d9e4
commit cb7ea3f354
1 changed files with 5 additions and 1 deletions

View File

@ -1008,6 +1008,9 @@ void LLViewerMedia::clearAllCookies()
}
}
// Clear all cookies from the cookie store
getCookieStore()->setAllCookies("");
// FIXME: this may not be sufficient, since the on-disk cookie file won't get written until some browser instance exits cleanly.
// It also won't clear cookies for other accounts, or for any account if we're not logged in, and won't do anything at all if there are no webkit plugins loaded.
// Until such time as we can centralize cookie storage, the following hack should cover these cases:
@ -1051,7 +1054,8 @@ void LLViewerMedia::clearAllCookies()
{
LLFile::remove(target);
}
// Other accounts may have new-style cookie files too -- delete them as well
target = base_dir;
target += filename;
target += gDirUtilp->getDirDelimiter();