summaryrefslogtreecommitdiffstats
path: root/chrome_frame/chrome_frame_npapi.h
diff options
context:
space:
mode:
authorananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-05 23:50:44 +0000
committerananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-05 23:50:44 +0000
commit81d05c6f01a286a4ca537f20c2637570204a87b2 (patch)
treeab9ae5b4455e64f3e4dd65ed1622c5ff48a098e0 /chrome_frame/chrome_frame_npapi.h
parent19cb2008c8641fffeab3906fda4553c6397bfb4f (diff)
downloadchromium_src-81d05c6f01a286a4ca537f20c2637570204a87b2.zip
chromium_src-81d05c6f01a286a4ca537f20c2637570204a87b2.tar.gz
chromium_src-81d05c6f01a286a4ca537f20c2637570204a87b2.tar.bz2
ChromeFrame's host network stack implementation for NPAPI would not get and set cookies correctly
if the browser did not support the NPN_GetValue/NPN_SetValue mechanisms for getting and setting cookies. The fallback was to set/get cookies on the document url which was broken. We now fallback to using the XPCOM cookie service for getting and setting cookies. Fixes bug http://code.google.com/p/chromium/issues/detail?id=37561 Bug=37561 Review URL: http://codereview.chromium.org/669212 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40799 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/chrome_frame_npapi.h')
-rw-r--r--chrome_frame/chrome_frame_npapi.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/chrome_frame/chrome_frame_npapi.h b/chrome_frame/chrome_frame_npapi.h
index cc21ff5..d78f3d9 100644
--- a/chrome_frame/chrome_frame_npapi.h
+++ b/chrome_frame/chrome_frame_npapi.h
@@ -17,6 +17,8 @@
#include "chrome_frame/npapi_url_request.h"
class MessageLoop;
+class nsICookieService;
+class nsIURI;
// ChromeFrameNPAPI: Implementation of the NPAPI plugin, which is responsible
// for hosting a chrome frame, i.e. an iframe like widget which hosts the the
@@ -282,6 +284,18 @@ END_MSG_MAP()
static LRESULT CALLBACK DropKillFocusHook(int code, WPARAM wparam,
LPARAM lparam); // NO_LINT
+ // Helper functions to set and get cookies using the XPCOM cookie service
+ // interfaces. This would only work in Firefox.
+ bool SetCookiesUsingXPCOMCookieService(const GURL& url,
+ const std::string& cookie);
+ bool GetCookiesUsingXPCOMCookieService(const GURL& url,
+ std::string* cookie_string);
+ // Helper function to return the XPCOM nsICookieService interface and
+ // nsIURI interface representing the url passed in.
+ bool GetXPCOMCookieServiceAndURI(const GURL& url,
+ nsICookieService** cookie_service,
+ nsIURI** uri);
+
// The plugins opaque instance handle
NPP instance_;