Commit Graph

71 Commits

Author SHA1 Message Date
Marco Bonardo
e3b58c0292 Bug 656936 - Remove Bookmarks::GetRemoveFolderTransaction. r=standard8
MozReview-Commit-ID: DLyjzC7ODyB

--HG--
extra : rebase_source : 4d71ab1909ca6e1065e31dc1824de3b119e05e7c
2018-02-23 17:27:43 +01:00
Marco Bonardo
de4bd875a7 Bug 1432434 - Remove Bookmarks::getItemDateAdded and setItemDateAdded. r=kitcambridge
MozReview-Commit-ID: XVoil1CK7c

--HG--
extra : rebase_source : 18213447f00177686dbc56d263674fa4e630663e
2018-02-08 23:24:38 +01:00
Mark Banner
6ccff895ed Bug 1436966 - Remove the bookmark-observers & history-observers category listeners. r=mak
MozReview-Commit-ID: 2dsyxZG98IR

--HG--
extra : rebase_source : 89767cf42ee5e903f0b72900e7c8f85ac590a3c3
2018-02-09 11:21:14 +00:00
Marco Bonardo
ce1ef88b66 Bug 1433304 - Remove synchronous Bookmarks::GetIdForItemAt. r=standard8
MozReview-Commit-ID: HZ2AiPgFawN

--HG--
extra : rebase_source : a38aa91eb3db3611c7e75d98992efc20abcea2fd
2018-02-08 15:40:23 +01:00
Marco Bonardo
4dac8ecfe1 Bug 1432439 - Remove getBookmarkIdsForURI. r=standard8
MozReview-Commit-ID: FoXR3IclKQk

--HG--
extra : rebase_source : dff4b7f763706c60603fb4501b314bdd0c20f5c6
2018-01-23 13:12:23 +01:00
Marco Bonardo
52f4c19c6b Bug 1432746 - Some folders in the Library may not show their bookmark children. r=standard8
Don't use the parent node options when creating new folder nodes, since they should retain
their original options.
Additionally, we can filter nodes in the queries rather than building a lot of nodes that
will be filtered out.

MozReview-Commit-ID: MmlGDe5QgV

--HG--
extra : rebase_source : 66eea325825007266e08424630b092b9e8d75b67
2018-01-24 17:55:42 +01:00
Marco Bonardo ext:(%20%3Cmbonardo%40mozilla.com%3E)
bed8d88705 Bug 1428342 - Make Places queries directly inherit options from their parent. r=standard8
Rather then trying to guess options from the parent or the root node, make query nodes directly
inherit some options from their parent.

MozReview-Commit-ID: 1YgDjrrMqGY

--HG--
extra : rebase_source : 5714e6243b0080c977cf6ab454c3f624990414dd
2017-12-14 10:06:37 -06:00
Doug Thayer
b3eef35a05 Bug 1421703 - replace onVisit with onVisits r=mak
There's a heavy enough overhead to going through XPConnect for
every observer for every visit on the nsINavHistoryObserver
interface, so this patch reduces that by replacing the single-
visit notification with one which accepts an array of visits.

Some notes: To avoid problems with the orderings of the various
ways in which we notify about visits, we have to send our bulk
onVisits notification before doing any of the others. This does
mean it technically behaves slightly different than the prior
approach of interleaving the notifications, but I can't find any
way in which this has any consequences to the end result, and it
doesn't break any tests.

MozReview-Commit-ID: GdeooH8mCkg

--HG--
extra : rebase_source : 48b5f886c4650a756e70f4657cb9d62c8ce40f74
2017-12-20 14:27:24 -08:00
Kit Cambridge
f50dcb6368 Bug 1417101 - Remove the annotation observer from the bookmarks service. r=mak
Since `SetItemAnnotation` already queries `moz_bookmarks`, we can fetch
and pass the changed bookmark's info directly to
`nsNavBookmarks::NotifyItemChanged`, without going through the anno
observer.

This patch refactors the internal `Set*` methods to receive an optional
`BookmarkData` for item annotation changes, and fire `OnItemChanged`
notifications after notifying anno observers. `NotifyItemChanged` also
updates the bookmark's last modified time if requested.

MozReview-Commit-ID: Hz5qiOmAjsD

--HG--
extra : rebase_source : a3bd929290e64c91ba2d2acb01e4e55b1e07181b
2017-11-16 16:49:03 -08:00
Noemi Erli
40495fde1b Backed out changeset e0eab399db59 (bug 1417101) for Static errors in toolkit/components/places/target r=backout on a CLOSED TREE 2017-11-18 02:48:42 +02:00
Kit Cambridge
870acfd373 Bug 1417101 - Remove the annotation observer from the bookmarks service. r=mak
Since `SetItemAnnotation` already queries `moz_bookmarks`, we can fetch
and pass the changed bookmark's info directly to
`nsNavBookmarks::NotifyItemChanged`, without going through the anno
observer.

This patch refactors the internal `Set*` methods to pass an optional
`BookmarkData` from `SetItemAnnotation`, and fire `OnItemChanged`
notifications after notifying anno observers. `NotifyItemChanged` also
updates the bookmark's last modified time if requested.

MozReview-Commit-ID: Hz5qiOmAjsD

--HG--
extra : rebase_source : 37170f4661341e3a401f8210ceec84cbf439b4b2
2017-11-16 16:49:03 -08:00
Mark Banner
17760ce731 Bug 1388250 - Remove old sync isBookmarked and getBookmarkedURIFor APIs from nsINavBookmarksService. r=Paolo
Also remove IsBookmarkedInDatabase(), mItemCount, RecursiveFindRedirectedBookmark(), UpdateKeywordsForRemovedBookmark() from nsNavBookmarks as they aren't used anywhere.

MozReview-Commit-ID: 4cZXAdRuVoF

--HG--
extra : rebase_source : 2c08a09de48cfb06c3e8db261dfe7ea1b1526e10
2017-08-08 07:58:59 +01:00
Marco Bonardo
deccd6c2ca Bug 1380302 - Fix -Wmaybe-uninitialized warnings in Places. r=adw
MozReview-Commit-ID: 2HxDMhYzaib

--HG--
extra : rebase_source : dfaab44c56d811c551999208025fe449ed3c1d92
2017-07-12 21:29:58 +02:00
Marco Bonardo
bfc44708bc Bug 1371677 - Delay the database connection in the history service as far as possible. r=adw
Makes initing Places services cheaper, by delaying the connection creation to the first time
it's actually needed.
Same way, delays reading the bookmark roots at the first time they are requested.
Deprecates the concept of lazy observers, since they are no more needed, we can just use addObserver.
Simplifies the startup path: always sends "places-init-complete" (both as a category and a topic) when
the connection starts and adds a "locked" database state when we can't get a working connection.
Makes PlacesCategoriesStarter register for the new category, since it's cheaper than being a bookmarks
observer.
Fixes a couple race conditions in keywords and expiration due to new startup timings.
Removes a test in test_keywords.js that is no more easily feasible, since it'd requires a pre-build
places.sqlite that should be kept up-to-date at every version.

MozReview-Commit-ID: 6ccPUZ651m0

--HG--
extra : rebase_source : 07376076eb42c84caaedeffd75f133d83a6c3d70
2017-06-09 18:51:09 +02:00
milindl
e39cee520c Bug 653816 - returning only nontags for GetBookmarkIdsForURI and fixing consumers, r=mak
Most consumers of `GetBookmarkIdsForURI` already don't need tags, the only
consumer which does (`TaggingService`) has been changed to use a separate
database query.

MozReview-Commit-ID: LabjaA6Q0GF

--HG--
extra : rebase_source : e13dc730a53b5b46ca1766bf896112aa65aa00af
2017-05-30 19:48:17 +05:30
Edouard Oger
a8af04a2b5 Bug 1228827 - Sync correctly the bookmark separators positions. r=kitcambridge
MozReview-Commit-ID: 9nvZqIt2Xgu

--HG--
extra : rebase_source : 4329ef6f8ac1b9f043043bff194a33d3df5f092f
2017-01-26 17:41:12 -05:00
Kit Cambridge
9679aeaf76 Bug 1258127 - Update nsNavBookmarksService (C++) to track sync changes. r=mak,rnewman
MozReview-Commit-ID: AV6Uyr2eMtA

--HG--
extra : rebase_source : aaff92ff702eb15a11e004ec2ae7b9fd8a7a0234
2016-11-17 14:50:24 -08:00
Kit Cambridge
14321604da Bug 1302901 - Create a Places mobile bookmarks root. r=mak
MozReview-Commit-ID: IESvIHCM2fK

--HG--
extra : rebase_source : 14db95c76cc8286380d80ef5717151bbd90532bd
2016-09-29 13:44:08 -07:00
Kit Cambridge
68481200d7 Bug 1303405 - Ensure RemoveFolderTransaction::UndoTransaction passes the reinserted GUID to observers. r=mak
MozReview-Commit-ID: 5HpDKEmsjRW

--HG--
extra : rebase_source : ac15fa1b1e1aa6b520a13ab29decf371c66b73e3
2016-09-16 13:22:47 -07:00
Andi-Bogdan Postelnicu
b5b8ea8b28 Bug 1282408 - add ignore initialization check flag for some variables in RemoveFolderTransaction. r=adw
MozReview-Commit-ID: 9AYyHN5a5Wf
2016-08-24 11:03:43 +03:00
Kit Cambridge
2aee7885cb Bug 1285408 - Add change source tracking for bookmarks. r=markh
MozReview-Commit-ID: I6IWhMWR1bG

--HG--
extra : rebase_source : b331e448871e44ee51923b4c512e0b8ad4206cd4
2016-08-11 13:13:22 -07:00
Nathan Froyd
01583602a9 Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat
The bulk of this commit was generated with a script, executed at the top
level of a typical source code checkout.  The only non-machine-generated
part was modifying MFBT's moz.build to reflect the new naming.

CLOSED TREE makes big refactorings like this a piece of cake.

 # The main substitution.
find . -name '*.cpp' -o -name '*.cc' -o -name '*.h' -o -name '*.mm' -o -name '*.idl'| \
    xargs perl -p -i -e '
 s/nsRefPtr\.h/RefPtr\.h/g; # handle includes
 s/nsRefPtr ?</RefPtr</g;   # handle declarations and variables
'

 # Handle a special friend declaration in gfx/layers/AtomicRefCountedWithFinalize.h.
perl -p -i -e 's/::nsRefPtr;/::RefPtr;/' gfx/layers/AtomicRefCountedWithFinalize.h

 # Handle nsRefPtr.h itself, a couple places that define constructors
 # from nsRefPtr, and code generators specially.  We do this here, rather
 # than indiscriminantly s/nsRefPtr/RefPtr/, because that would rename
 # things like nsRefPtrHashtable.
perl -p -i -e 's/nsRefPtr/RefPtr/g' \
     mfbt/nsRefPtr.h \
     xpcom/glue/nsCOMPtr.h \
     xpcom/base/OwningNonNull.h \
     ipc/ipdl/ipdl/lower.py \
     ipc/ipdl/ipdl/builtin.py \
     dom/bindings/Codegen.py \
     python/lldbutils/lldbutils/utils.py

 # In our indiscriminate substitution above, we renamed
 # nsRefPtrGetterAddRefs, the class behind getter_AddRefs.  Fix that up.
find . -name '*.cpp' -o -name '*.h' -o -name '*.idl' | \
    xargs perl -p -i -e 's/nsRefPtrGetterAddRefs/RefPtrGetterAddRefs/g'

if [ -d .git ]; then
    git mv mfbt/nsRefPtr.h mfbt/RefPtr.h
else
    hg mv mfbt/nsRefPtr.h mfbt/RefPtr.h
fi

--HG--
rename : mfbt/nsRefPtr.h => mfbt/RefPtr.h
2015-10-18 01:24:48 -04:00
Marco Bonardo
ddb1ecd87c Bug 1150678 - Part 1: notify the old value in onItemChanged (only URI changes for now). r=ttaubert
--HG--
extra : commitid : KYeXHLc1S0W
2015-08-05 23:10:11 +02:00
Wes Kocher
c906ee5d44 Backed out 2 changesets (bug 1150678) for xpcshell bustage
Backed out changeset 1c24d237080c (bug 1150678)
Backed out changeset 9f1f1e11ca37 (bug 1150678)
2015-08-05 16:24:58 -07:00
Marco Bonardo
0aae79f32c Bug 1150678 - Part 1: notify the old value in onItemChanged (only URI changes for now). r=ttaubert
--HG--
extra : commitid : L3Sje2jJyiY
2015-08-05 23:10:11 +02:00
Andrea Marchesini
cb54385682 Bug 1156632 - Remove unused forward class declarations - patch 4 - netwerk image and dom, r=ehsan 2015-04-22 08:29:20 +02:00
Andrea Marchesini
e6f385fb3d Bug 1148527 - Indentation fix after bug 1145631, r=ehsan 2015-03-27 18:52:19 +00:00
Ehsan Akhgari
883849ee32 Bug 1145631 - Part 1: Replace MOZ_OVERRIDE and MOZ_FINAL with override and final in the tree; r=froydnj
This patch was automatically generated using the following script:

function convert() {
echo "Converting $1 to $2..."
find . \
       ! -wholename "*/.git*" \
       ! -wholename "obj-ff-dbg*" \
         -type f \
      \( -iname "*.cpp" \
         -o -iname "*.h" \
         -o -iname "*.c" \
         -o -iname "*.cc" \
         -o -iname "*.idl" \
         -o -iname "*.ipdl" \
         -o -iname "*.ipdlh" \
         -o -iname "*.mm" \) | \
    xargs -n 1 sed -i -e "s/\b$1\b/$2/g"
}

convert MOZ_OVERRIDE override
convert MOZ_FINAL final
2015-03-21 12:28:04 -04:00
Marco Bonardo
941b1d7ea2 Bug 1125113 - Change the keywords schema associating them with uris. r=ttaubert 2015-03-20 09:39:20 +01:00
Ehsan Akhgari
126a9df841 Bug 1118413 - Mark virtual overridden functions as MOZ_OVERRIDE in places; r=mak 2015-01-24 14:51:35 -05:00
Marco Bonardo
b81685e028 Backout ce637f8721d3 (bug 1083469) due to failures with old autocomplete enabled. a=bustage on CLOSED TREE 2014-11-27 00:00:23 +01:00
Asaf Romano
40733d42bd Bug 1085291 - A bookmark node that is inserted by live-update code is missing bookmarkGuid value. r=mak (Relanding with the test file included this time). 2014-11-25 11:43:26 +02:00
Carsten "Tomcat" Book
3151484b04 Backed out changeset 6db486ed2de1 (bug 1085291) for breaking Builds on a CLOSED TREE 2014-11-25 09:25:11 +01:00
Asaf Romano
908d732cbf Bug 1085291 - A bookmark node that is inserted by live-update code is missing bookmarkGuid value. r=mak. 2014-11-25 09:06:37 +02:00
Marco Bonardo
8d53fcb53e Bug 1083469 - Allow to use old keywords APIs along with Bookmarks.jsm r=mano
--HG--
extra : rebase_source : 606724d24ed36d9de8045f526d1bb452bf5d0530
2014-11-24 00:51:32 +01:00
Tim Taubert
4c199ab4c3 Bug 1083462 - Remove the bookmarks cache r=mak 2014-11-11 17:52:31 +01:00
Asaf Romano
d83f8d60e1 Bug 1068671 - folderReadOnly doesn't pertain to bookmarks or results. r=mak 2014-10-14 17:03:28 +03:00
Carsten "Tomcat" Book
459781f902 Backed out changeset b30d47d94a85 (bug 1068671) for bc1 test failures 2014-10-01 13:14:06 +02:00
Asaf Romano
896f516dd7 Bug 1068671 - Remove 'read-only' folders support from places. r=mak 2014-10-01 12:19:06 +03:00
Ehsan Akhgari
d0800c4d23 Bug 1060974 - Fix more bad implicit constructors in places; r=mak
--HG--
extra : rebase_source : c8d465b4de55d000d1475994827766e33396ff12
2014-09-03 18:25:36 -04:00
Benoit Jacob
210693da34 Bug 1028588 - Fix dangerous public destructors in toolkit/ - r=ehsan 2014-06-23 18:40:02 -04:00
Robert O'Callahan
15468267dc Bug 955889. Restore caching in EnsureKeywordsHash. r=mano
--HG--
extra : rebase_source : 41847499e245b5e3073dfa1a8ebeb2f9451b802b
2014-01-04 18:14:27 +13:00
Asaf Romano
bd6038d32e Bug 914687 - API for presetting GUIDs on bookmarks. r=mak. sr=gavin 2013-11-19 17:13:27 +02:00
Raymond Lee
075f79d3a3 Bug 627487 - Bookmark JSON backup should contain new-style GUIDs. r=mano 2013-09-03 11:56:25 +08:00
Masatoshi Kimura
1a9e38cc24 Bug 888323 - Stop including prtime.h in nsrootidl.idl. r=ehsan 2013-07-04 00:56:26 +09:00
Ryan VanderMeulen
1d99822149 Backed out changeset d155557b651c (bug 888323) for bustage.
CLOSED TREE
2013-07-02 14:15:39 -04:00
Masatoshi Kimura
c9b73ddb89 Bug 888323 - Stop including prtime.h in nsrootidl.idl. r=ehsan 2013-07-03 02:08:01 +09:00
Aryeh Gregor
8b16f79037 Bug 867101 - Fix more implicit conversion to already_AddRefed; r=Ms2ger 2013-04-28 14:52:10 +03:00
Marco Bonardo
7151a3c0f6 Bug 838839 - Remove deprecated synchronous favicons APIs.
r=Mano sr=gavin
2013-03-20 14:25:19 +01:00
Marco Bonardo
8105744337 Bug 791562 - crash in PlacesFolderConversion::AppendFolder.
r=mano
2012-12-17 15:03:49 +01:00