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 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5 #include "VisitInfo.h"
6 #include "nsIURI.h"
8 namespace mozilla {
9 namespace places {
11 ////////////////////////////////////////////////////////////////////////////////
12 //// VisitInfo
14 VisitInfo::VisitInfo(int64_t aVisitId,
15 PRTime aVisitDate,
16 uint32_t aTransitionType,
17 already_AddRefed<nsIURI> aReferrer)
18 : mVisitId(aVisitId)
19 , mVisitDate(aVisitDate)
20 , mTransitionType(aTransitionType)
21 , mReferrer(aReferrer)
22 {
23 }
25 ////////////////////////////////////////////////////////////////////////////////
26 //// mozIVisitInfo
28 NS_IMETHODIMP
29 VisitInfo::GetVisitId(int64_t* _visitId)
30 {
31 *_visitId = mVisitId;
32 return NS_OK;
33 }
35 NS_IMETHODIMP
36 VisitInfo::GetVisitDate(PRTime* _visitDate)
37 {
38 *_visitDate = mVisitDate;
39 return NS_OK;
40 }
42 NS_IMETHODIMP
43 VisitInfo::GetTransitionType(uint32_t* _transitionType)
44 {
45 *_transitionType = mTransitionType;
46 return NS_OK;
47 }
49 NS_IMETHODIMP
50 VisitInfo::GetReferrerURI(nsIURI** _referrer)
51 {
52 NS_IF_ADDREF(*_referrer = mReferrer);
53 return NS_OK;
54 }
56 ////////////////////////////////////////////////////////////////////////////////
57 //// nsISupports
59 NS_IMPL_ISUPPORTS(
60 VisitInfo
61 , mozIVisitInfo
62 )
64 } // namespace places
65 } // namespace mozilla