Commit Graph
289 Commits
Author SHA1 Message Date
Amy Chung 617901ad39 Bug 1399590 - Modify the argument of nsICookiePermission::CanAccess for changing nsIURI to nsIPrincipal. r=jdm 2017-10-03 14:37:11 +08:00
Amy Chung fef08227cd Bug 1286858 - Data storage and interface changes for SameSite cookies. r=valentin 2017-09-25 01:27:04 +08:00
Chris Peterson 494ce0375a Bug 870698 - Part 7: Replace Insert(NS_LITERAL_CSTRING("")) with InsertLiteral(""). r=erahm
The NS_LITERAL_CSTRING macro creates a temporary nsLiteralCString to encapsulate the string literal and its length, but AssignLiteral() can determine the string literal's length at compile-time without nsLiteralCString.

MozReview-Commit-ID: DbTW5Bhd9E1
2017-09-07 18:15:42 -07:00
Chris Peterson 6137e4ff8b Bug 870698 - Part 2: Replace Append("") with AppendLiteral(""). r=erahm
MozReview-Commit-ID: CrkIP4iHP1U
2017-09-03 22:14:11 -07:00
Kris Maglione 023be4c4c0 Bug 1396676: Return already_AddRefed from cookie service GetSingleton() methods. r=jdm
These methods return an addrefed raw pointer, which makes them easy to use in
ways that cause leaks. If they're to continue returning an addrefed pointer,
they should explicitly return an already_AddRefed.

This also switches to StaticRefPtr with ClearOnShutdown for the cached
pointers for the sake of sanity.

MozReview-Commit-ID: D0lDpU8Hqug
2017-09-04 15:05:10 -07:00
Junior Hsu 1d842fe60f Bug 1388671 - Add null check to avoid crash. r=jduell 2017-08-09 20:39:00 -04:00
Amy Chung f60c764b22 Bug 1331680 - Part 3: Broadcast cookie changes to all content processes. r=jdm 2017-08-03 18:00:12 +08:00
Amy Chung f17d2527f8 Bug 1331680 - Part 2: Use local cookie hashtable in content process, and perform cookie permission checks synchronously. r=jdm 2017-08-03 17:59:31 +08:00
Amy Chung 7e6f632fa7 Bug 1331680 - Part 1: Send required cookies to the content process on demand. r=jdm 2017-08-03 19:00:41 +08:00
Amy Chung 47aebf999c Bug 1331680 - Part 0: Extract nsCookieKey. r=jdm 2017-08-03 17:56:33 +08:00
Masatoshi Kimura c0943e4f30 Bug 1326520 - Rename nsIURI.path to pathQueryRef. r=valentin.gosu
MozReview-Commit-ID: DqJdTGopR9G
2017-07-29 20:50:21 +09:00
Kartikaya Gupta 14424677af Bug 1384233 - Remove SizePrintfMacros.h. r=froydnj
We have a minimum requirement of VS 2015 for Windows builds, which supports
the z length modifier for format specifiers. So we don't need SizePrintfMacros.h
any more, and can just use %zu and friends directly everywhere.

MozReview-Commit-ID: 6s78RvPFMzv
2017-07-26 16:03:57 -04:00
Will Wang 9a475642fe Bug 1366213: Part 1 - Add a new observer notification 'session-cookie-changed'. r=jdm 2017-07-07 17:47:53 +08:00
Nicholas Nethercote 4cbdad69e6 Bug 1374580 (part 2) - Remove nsAFlat{,C}String typedefs. r=froydnj.
All the instances are converted as follows.

- nsAFlatString  --> nsString
- nsAFlatCString --> nsCString
2017-06-20 19:19:05 +10:00
Nicholas Nethercote 8bdcb2343a Bug 1374580 (part 1) - Remove nsASingleFragment{,C}String typedefs. r=froydnj.
All the instances are converted as follows.

- nsASingleFragmentString  --> nsAString
- nsASingleFragmentCString --> nsACString
2017-06-20 19:18:17 +10:00
Valentin Gosu 203e8cfec7 Bug 1374818 - Prevent nsCookieService::AddCookieToList from adding null cookies to the list. r=jdm
MozReview-Commit-ID: IG8aXlzFMgQ
2017-06-21 20:31:39 +02:00
Rob Wu 5064581e81 Bug 1354229 - use private cookie DB in nsICookieManager depending on OriginAttributes r=jdm
Evaluated every method exposed via nsICookieManager and
nsICookieManager2, and ensured that every method uses the right cookie
database depending on whether the mPrivateBrowsingId flag is set in
OriginAttributes.

The usePrivateMode method has been removed since it was introduced in
bugzil.la/777620 and not used anywhere else.

This should be covered by
toolkit/components/extensions/test/mochitest/test_ext_cookies.html,
but due to bugzil.la/1309637, the relevant private browsing tests
have been disabled. These tests will be enabled in one of the next
commits.

MozReview-Commit-ID: DMhE42LGu9S
2017-06-09 18:00:06 +02:00
Ryan VanderMeulen 8bf51df27d Backed out changeset b2fe8f4df701 (bug 1158387) for making Win64 xpcshell nearly permafail. 2017-06-12 16:45:34 -04:00
Junior Hsu b060be16e4 Bug 1158387 - Remove "PRAGMA synchronous = OFF" to avoid corruption in cookie service. r=mak 2017-05-21 18:48:00 -04:00
Junior Hsu b8909ead17 Bug 1370454 - Part2: Expose runInTransaction in nsICookieService.idl, r=jduell 2017-06-06 05:36:00 +02:00
Junior Hsu 04211cbb8e Bug 867798 - avoid blocking main thread when we closes nsCookieService syncConn db, r=mak 2017-06-08 20:06:00 +02:00
Junior Hsu 77755f1195 Bug 1370456 - Batch operations for nsCookieService, r=jduell 2017-06-08 20:05:00 +02:00
Sebastian Hengst 51466ba460 Backed out changeset 4f0f6745c23d (bug 1158387) for failing extensions/cookie/test/unit/test_cookies_async_failure.js on Windows 7 VM opt. r=backout 2017-05-22 22:03:32 +02:00
Junior Hsu e4858b786d Bug 1158387 - Remove "PRAGMA synchronous = OFF" to avoid corruption in cookie service. r=mak 2017-05-21 18:48:00 -04:00
Will Wang 3e91588963 Bug 1356605 - Part 1: Add an enumerator for getting session cookies only. r=valentin 2017-05-10 09:50:17 +08:00
Jonathan Kingston 41e6c125f5 Bug 1334587 - Fix cookie store removal and updating to use originAttributes. r=baku
MozReview-Commit-ID: HpdlT4gxrl0
2017-04-16 17:58:53 +01:00
Yoshi Huang e6dd82b3f8 Bug 1284579 - Part 3: remove IsPrivate arg from nsCookieService. r=valentin
Since we already passed origin attributes into these functions, we can
remove the extra isPrivate argument.
2017-05-04 09:40:21 +08:00
Tom Tromey a0148cdc8d Bug 1334278 - change mozilla::Smprintf to return a UniquePtr; r=froydnj
Change mozilla::Smprintf and friends to return a UniquePtr, rather than
relying on manual memory management.  (Though after this patch there are
still a handful of spots needing SmprintfFree.)

MozReview-Commit-ID: COa4nzIX5qa
2017-03-03 08:17:27 -07:00
Yoshi Huang ce8a5704a9 Bug 1356165 - Log origin attributes for cookie. r=jduell
So that when I do export MOZ_LOG="cookie:3", I can also see origin attributes
of the cookie.
2017-04-17 11:08:54 +08:00
Amy Chung 73cc4766b6 Bug 1319403 - Modified nsCookieService::FindStaleCookie() and test cases, r=jdm 2017-02-27 18:31:33 +08:00
Tom Tromey a4b717ab39 Bug 1060419 - make log_print use Printf.h, r=froydnj
MozReview-Commit-ID: BIZ1GQEZ1vs
2016-12-15 20:16:31 -07:00
Tom Tromey 3a529f22fd Bug 1060419 - make nsCookieService.cpp use Printf.h, r=froydnj
MozReview-Commit-ID: G2ge9NFbDV6
2016-12-09 10:21:55 -10:00
Sylvestre Ledru fe74f041a1 Bug 1338086 - Remove useless else blocks in order to reduce complexity in netwerk/ r=dragana
MozReview-Commit-ID: 2TSxhHWmL2H
2017-02-09 11:21:38 +01:00
amy 2e65cacf1e Bug 1325909 - Added a new bucket and modify the bucket name on telemetry COOKIE_LEAVE_SECURE_ALONE, r=dveditz 2017-01-23 18:18:47 +08:00
Andrea Marchesini 46a9207d60 Bug 1328653 - Merging all the various *OriginAttributes to just one, r=huseby 2017-01-12 17:38:48 +01:00
Ehsan Akhgari 78b4d73d95 Bug 1321912 - Remove the appId field from the moz_cookies table; r=jdm 2017-01-03 22:34:46 -05:00
dimi d2fb140df2 Bug 1320402 - Move url-classifier off of using appIds. r=ehsan, gcp
MozReview-Commit-ID: IqnAVrv2c9W
2017-01-03 14:21:58 +08:00
Ehsan Akhgari 3c90e541e0 Bug 1318210 - Remove nsIAppsService; r=baku 2016-11-17 10:41:36 -05:00
Ehsan Akhgari 516a4de699 Bug 1318206 - Remove some unused code for clearing app data; r=baku,mcmanus 2016-11-17 08:30:21 -05:00
Wes Kocher 390c1f407f Merge inbound to m-c a=merge CLOSED TREE 2016-11-16 17:07:26 -08:00
Ehsan Akhgari 917a5e63fc Bug 1310845 - Remove support for mozapp iframes; r=fabrice,jryans,baku,mcmanus
This patch removes support for mozapp iframes, leaving support for
mozbrowser iframes intact.  Some of the code has been rewritten in order
to phrase things in terms of mozbrowser only, as opposed to mozbrowser
or app.  In some places, code that was only useful with apps has been
completely removed, so that the APIs consumed can also be removed.  In
some places where the notion of appId was bleeding out of this API, now
we use NO_APP_ID.  Other notions of appId which were restricted to this
API have been removed.
2016-11-16 09:13:38 -05:00
Carsten "Tomcat" Book 84568d0bc2 Backed out changeset 7d1f7dd996f7 (bug 1310845) 2016-11-16 14:50:44 +01:00
Ehsan Akhgari 2d792bd2ad Bug 1310845 - Remove support for mozapp iframes; r=fabrice,jryans,baku,mcmanus
This patch removes support for mozapp iframes, leaving support for
mozbrowser iframes intact.  Some of the code has been rewritten in order
to phrase things in terms of mozbrowser only, as opposed to mozbrowser
or app.  In some places, code that was only useful with apps has been
completely removed, so that the APIs consumed can also be removed.  In
some places where the notion of appId was bleeding out of this API, now
we use NO_APP_ID.  Other notions of appId which were restricted to this
API have been removed.
2016-11-15 18:31:46 -05:00
Sylvestre Ledru b371255198 Bug 1317250 - Avoid a copy in nsCookieService::FindStaleCookie r=jdm
MozReview-Commit-ID: G61TtsTNU7x
2016-11-14 11:01:34 +01:00
Sylvestre Ledru 3935e2e7c7 Bug 1317430 - Avoid a unnecessary copy by passing a const & in netwerk/ r=valentin
MozReview-Commit-ID: LKgXjObeXOZ
2016-11-14 23:16:40 +01:00
amy b377a90850 Bug 976073 - Part 1 : Implement spec, r=jdm r=dveditz 2016-11-09 17:14:21 +08:00
Andi-Bogdan Postelnicu e5ba38c49a Bug 1311669 - Use C++11's override and remove virtual where applicable. r=valentin
MozReview-Commit-ID: Ab5BC8NhbIO
2016-11-08 16:36:58 +02:00
Andi-Bogdan Postelnicu 2843f5a91e Bug 1311669 - Replace integer literals which are cast to bool. r=valentin
MozReview-Commit-ID: LdvpF0mFA5V
2016-11-01 14:44:10 +02:00
Andi-Bogdan Postelnicu 15794c143e Bug 1311669 - replace default bodies of special member functions with = default; r=valentin
MozReview-Commit-ID: YxHWVHUyDq
2016-11-01 14:44:09 +02:00
Jesper Kristensen e625714a40 Bug 777620 - Support access to private prowsing cookies in nsICookieManager. r=jduell
MozReview-Commit-ID: G97YHqCOpM6
2016-03-31 18:29:27 +02:00