summaryrefslogtreecommitdiffstats
path: root/ceee/ie/plugin/bho/cookie_accountant.cc
diff options
context:
space:
mode:
authorcindylau@google.com <cindylau@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-27 08:43:55 +0000
committercindylau@google.com <cindylau@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-27 08:43:55 +0000
commite8fa42e23401cded7df5bc4da7fd166bbebb413c (patch)
tree016aefc986cda7aa4b4c4d252c29d99f18711327 /ceee/ie/plugin/bho/cookie_accountant.cc
parent47b3c39b87cb9969d30ea05a15d07f177570cde2 (diff)
downloadchromium_src-e8fa42e23401cded7df5bc4da7fd166bbebb413c.zip
chromium_src-e8fa42e23401cded7df5bc4da7fd166bbebb413c.tar.gz
chromium_src-e8fa42e23401cded7df5bc4da7fd166bbebb413c.tar.bz2
Modify the cookies API implementation in IE CEEE to account for the fact that tabs within
protected mode processes have separate cookie stores from those within processes without protected mode, even when protected/unprotected mode tabs are sharing the same frame window. With this change, chrome.cookies.getAllCookieStores will assign protected mode tabs a different cookie store ID from their unprotected counterparts. Finally, added /bigobj flag to ie_unittests/mediumtest_ie Release config to get them to compile again. BUG=none TEST=ie_unittests.exe Review URL: http://codereview.chromium.org/5262006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@67492 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ceee/ie/plugin/bho/cookie_accountant.cc')
-rw-r--r--ceee/ie/plugin/bho/cookie_accountant.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/ceee/ie/plugin/bho/cookie_accountant.cc b/ceee/ie/plugin/bho/cookie_accountant.cc
index 7453bb9..b0c92a2 100644
--- a/ceee/ie/plugin/bho/cookie_accountant.cc
+++ b/ceee/ie/plugin/bho/cookie_accountant.cc
@@ -16,8 +16,10 @@
#include "base/string_tokenizer.h"
#include "base/time.h"
#include "base/utf_string_conversions.h"
+#include "ceee/common/com_utils.h"
#include "ceee/ie/broker/cookie_api_module.h"
#include "ceee/ie/common/ceee_module_util.h"
+#include "ceee/ie/common/ie_util.h"
namespace {
@@ -187,6 +189,15 @@ void CookieAccountant::SetScriptCookieStoreId(cookie_api::CookieInfo* cookie) {
DCHECK_NE(process_id, DWORD(0));
std::ostringstream store_id_stream;
store_id_stream << process_id;
+ // If this is a Protected Mode process, the cookie store ID is different.
+ bool is_protected_mode = false;
+ HRESULT hr = ie_util::GetIEIsInProtectedMode(&is_protected_mode);
+ DCHECK(SUCCEEDED(hr)) << "Unexpected failure while checking the " <<
+ "protected mode setting for IE tab process " << process_id << ". " <<
+ com::LogHr(hr);
+ if (SUCCEEDED(hr) && is_protected_mode) {
+ store_id_stream << cookie_api::kProtectedModeStoreIdSuffix;
+ }
// The broker is responsible for checking that the store ID is registered.
cookie->store_id =
::SysAllocString(ASCIIToWide(store_id_stream.str()).c_str());