Sat, 03 Jan 2015 20:18:00 +0100
Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.
1 /* -*- Mode: C++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 8 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #ifndef mozilla_plugins_BrowserStreamParent_h
7 #define mozilla_plugins_BrowserStreamParent_h
9 #include "mozilla/plugins/PBrowserStreamParent.h"
10 #include "mozilla/plugins/AStream.h"
12 namespace mozilla {
13 namespace plugins {
15 class PluginInstanceParent;
17 class BrowserStreamParent : public PBrowserStreamParent, public AStream
18 {
19 friend class PluginModuleParent;
20 friend class PluginInstanceParent;
22 public:
23 BrowserStreamParent(PluginInstanceParent* npp,
24 NPStream* stream);
25 virtual ~BrowserStreamParent();
27 virtual bool IsBrowserStream() MOZ_OVERRIDE { return true; }
29 virtual bool AnswerNPN_RequestRead(const IPCByteRanges& ranges,
30 NPError* result) MOZ_OVERRIDE;
32 virtual bool RecvNPN_DestroyStream(const NPReason& reason) MOZ_OVERRIDE;
34 virtual bool RecvStreamDestroyed() MOZ_OVERRIDE;
36 int32_t WriteReady();
37 int32_t Write(int32_t offset, int32_t len, void* buffer);
38 void StreamAsFile(const char* fname);
40 void NPP_DestroyStream(NPReason reason);
42 private:
43 using PBrowserStreamParent::SendNPP_DestroyStream;
45 PluginInstanceParent* mNPP;
46 NPStream* mStream;
47 nsCOMPtr<nsISupports> mStreamPeer;
49 enum {
50 ALIVE,
51 DYING,
52 DELETING
53 } mState;
54 };
56 } // namespace plugins
57 } // namespace mozilla
59 #endif