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++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2 * vim: sw=2 ts=2 et lcs=trail\:.,tab\:>~ :
3 * This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef nsPlacesIndexes_h__
8 #define nsPlacesIndexes_h__
10 #define CREATE_PLACES_IDX(__name, __table, __columns, __type) \
11 NS_LITERAL_CSTRING( \
12 "CREATE " __type " INDEX IF NOT EXISTS " __table "_" __name \
13 " ON " __table " (" __columns ")" \
14 )
16 /**
17 * moz_places
18 */
19 #define CREATE_IDX_MOZ_PLACES_URL \
20 CREATE_PLACES_IDX( \
21 "url_uniqueindex", "moz_places", "url", "UNIQUE" \
22 )
24 #define CREATE_IDX_MOZ_PLACES_FAVICON \
25 CREATE_PLACES_IDX( \
26 "faviconindex", "moz_places", "favicon_id", "" \
27 )
29 #define CREATE_IDX_MOZ_PLACES_REVHOST \
30 CREATE_PLACES_IDX( \
31 "hostindex", "moz_places", "rev_host", "" \
32 )
34 #define CREATE_IDX_MOZ_PLACES_VISITCOUNT \
35 CREATE_PLACES_IDX( \
36 "visitcount", "moz_places", "visit_count", "" \
37 )
39 #define CREATE_IDX_MOZ_PLACES_FRECENCY \
40 CREATE_PLACES_IDX( \
41 "frecencyindex", "moz_places", "frecency", "" \
42 )
44 #define CREATE_IDX_MOZ_PLACES_LASTVISITDATE \
45 CREATE_PLACES_IDX( \
46 "lastvisitdateindex", "moz_places", "last_visit_date", "" \
47 )
49 #define CREATE_IDX_MOZ_PLACES_GUID \
50 CREATE_PLACES_IDX( \
51 "guid_uniqueindex", "moz_places", "guid", "UNIQUE" \
52 )
54 /**
55 * moz_historyvisits
56 */
58 #define CREATE_IDX_MOZ_HISTORYVISITS_PLACEDATE \
59 CREATE_PLACES_IDX( \
60 "placedateindex", "moz_historyvisits", "place_id, visit_date", "" \
61 )
63 #define CREATE_IDX_MOZ_HISTORYVISITS_FROMVISIT \
64 CREATE_PLACES_IDX( \
65 "fromindex", "moz_historyvisits", "from_visit", "" \
66 )
68 #define CREATE_IDX_MOZ_HISTORYVISITS_VISITDATE \
69 CREATE_PLACES_IDX( \
70 "dateindex", "moz_historyvisits", "visit_date", "" \
71 )
73 /**
74 * moz_bookmarks
75 */
77 #define CREATE_IDX_MOZ_BOOKMARKS_PLACETYPE \
78 CREATE_PLACES_IDX( \
79 "itemindex", "moz_bookmarks", "fk, type", "" \
80 )
82 #define CREATE_IDX_MOZ_BOOKMARKS_PARENTPOSITION \
83 CREATE_PLACES_IDX( \
84 "parentindex", "moz_bookmarks", "parent, position", "" \
85 )
87 #define CREATE_IDX_MOZ_BOOKMARKS_PLACELASTMODIFIED \
88 CREATE_PLACES_IDX( \
89 "itemlastmodifiedindex", "moz_bookmarks", "fk, lastModified", "" \
90 )
92 #define CREATE_IDX_MOZ_BOOKMARKS_GUID \
93 CREATE_PLACES_IDX( \
94 "guid_uniqueindex", "moz_bookmarks", "guid", "UNIQUE" \
95 )
97 /**
98 * moz_annos
99 */
101 #define CREATE_IDX_MOZ_ANNOS_PLACEATTRIBUTE \
102 CREATE_PLACES_IDX( \
103 "placeattributeindex", "moz_annos", "place_id, anno_attribute_id", "UNIQUE" \
104 )
106 /**
107 * moz_items_annos
108 */
110 #define CREATE_IDX_MOZ_ITEMSANNOS_PLACEATTRIBUTE \
111 CREATE_PLACES_IDX( \
112 "itemattributeindex", "moz_items_annos", "item_id, anno_attribute_id", "UNIQUE" \
113 )
115 /**
116 * moz_favicons
117 */
119 #define CREATE_IDX_MOZ_FAVICONS_GUID \
120 CREATE_PLACES_IDX( \
121 "guid_uniqueindex", "moz_favicons", "guid", "UNIQUE" \
122 )
124 #endif // nsPlacesIndexes_h__