summaryrefslogtreecommitdiffstats
path: root/chrome/browser/bookmarks/bookmark_model.cc
Commit message (Collapse)AuthorAgeFilesLines
* Try the original CL "Always persist bookmark IDs" again with the fix tomunjal@chromium.org2009-07-131-45/+14
| | | | | | | | | | | | | | Valgrind issue. The fix is in bookmark_storage.h - initialized the newly added member ids_reassigned_ of LoadDetails class. See http://codereview.chromium.org/149310 for the original CL. TEST=NONE BUG=16068 Review URL: http://codereview.chromium.org/155456 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20565 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Always persist bookmark IDs."tc@google.com2009-07-131-14/+45
| | | | | | | | | | | | | This reverts commit r20532 because valgrind was complaining about uninitialized memory: http://build.chromium.org/buildbot/waterfall/builders/Chromium%20Linux%20(valgrind)/builds/697/steps/valgrind%20test:%20unit/logs/stdio TBR=munjal Review URL: http://codereview.chromium.org/155448 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20550 0039d316-1c4b-4281-b951-d872f2087c98
* Always persist bookmark IDs.munjal@chromium.org2009-07-131-45/+14
| | | | | | | | | | | | | | | | Remove the preference to persist IDs. NOTE that we need to save the file the first time with IDs since existing bookmark files won't have IDs and the file won't be saved until something changes in the bookmark model. So we need to explicitly save once when we assign ids for the first time. TEST=NONE BUG=16068 Review URL: http://codereview.chromium.org/149310 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20532 0039d316-1c4b-4281-b951-d872f2087c98
* Lands http://codereview.chromium.org/155128 for Thiago.sky@chromium.org2009-07-081-12/+25
| | | | | | | | | | | | | Description from Thiago: Converting the history::StarredEntry::Type to a type defined in BookmarkNode. BUG=NONE TEST=NONE Review URL: http://codereview.chromium.org/155165 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20195 0039d316-1c4b-4281-b951-d872f2087c98
* Make bookmark model public interface use const BookmarkNode* instead ofmunjal@chromium.org2009-06-261-68/+78
| | | | | | | | | | | | | | | BookmarkNode*. This helps in making the BookmarkNode class setters public also without worrying about someone inadvertently changing BookmarkNode properties directly for bookmark model bookmarks. Change all the call sites to reflect this. BUG=none TEST=none Review URL: http://codereview.chromium.org/146116 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19428 0039d316-1c4b-4281-b951-d872f2087c98
* Replace std:;wstring with std::string and string16 in locale-name related APIs.jshin@chromium.org2009-06-241-1/+1
| | | | | | | | | | | | | | | 1. Change the locale param to be std::string because they're always ASCII and change call-sites accordingly. 2. Add GetStringFUTF16 to l10n_util. On Windows, they're inline helpers calling the correspondingGetStringF returning wstring while on Mac/Linux, they just return the result of |string16 GetStringF|without converting to wstring. This is part 1 of the fix for issue 8647. Some of newly introduced conversions are temporary and will be removed later (e.g. ASCIIToWide applied to the result of GetApplicationLocale in a few places). Note : this CL will be landed after http://codereview.chromium.org/147038 is landed. BUG=8647 (http://crbug.com/8647) TEST=Pass l10n_util_unittest and other unit tests Review URL: http://codereview.chromium.org/126223 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19183 0039d316-1c4b-4281-b951-d872f2087c98
* We need to save bookmarks file when the persist_ids settings changesmunjal@chromium.org2009-05-281-0/+16
| | | | | | | | or when the file is detected to be changed externally. Review URL: http://codereview.chromium.org/114055 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17105 0039d316-1c4b-4281-b951-d872f2087c98
* Add a preference to enable/disable ID persistence in bookmark model andmunjal@chromium.org2009-05-271-0/+32
| | | | | | | | add methods in bookmark model to get/set this preference. Review URL: http://codereview.chromium.org/113882 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17017 0039d316-1c4b-4281-b951-d872f2087c98
* Moves decoding and population of bookmark index to background thread.sky@chromium.org2009-05-221-24/+42
| | | | | | | | | BUG=6646 TEST=make sure bookmarks persist after running chrome. Review URL: http://codereview.chromium.org/113768 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16757 0039d316-1c4b-4281-b951-d872f2087c98
* More NotificationRegistrar conversions.pkasting@chromium.org2009-05-221-11/+3
| | | | | | | BUG=2381 Review URL: http://codereview.chromium.org/113736 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16700 0039d316-1c4b-4281-b951-d872f2087c98
* Moves GetFavIcon from BookmarkNode to BookmarkModel. I'm doing thissky@chromium.org2009-05-201-21/+20
| | | | | | | | | | | | | | | | for two reasons: . it cuts down on each node needing a reference to the model. . it makes it clear nodes shouldn't need to talk with the model. I'm primarily doing this for the last point as I'm going to populate nodes on a background thread shortly and I don't want to risk the chance of someone trying to talk with the model. BUG=none TEST=none Review URL: http://codereview.chromium.org/113617 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16491 0039d316-1c4b-4281-b951-d872f2087c98
* Adds an index over bookmark titles for fast look up.sky@chromium.org2009-05-191-0/+17
| | | | | | | | | | | | | The index is currently built on the main thread (because that's where we do the decoding now), but I'll change that after landing this. BUG=6646 TEST=There are tests to cover this, but make sure the omnibox still suggests bookmark titles. Review URL: http://codereview.chromium.org/115403 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16357 0039d316-1c4b-4281-b951-d872f2087c98
* Move the bookmark node iD generation to bookmark model isntead ofmunjal@chromium.org2009-05-121-19/+12
| | | | | | | | bookmark node. This will also make the IDs more dense. Review URL: http://codereview.chromium.org/99304 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15839 0039d316-1c4b-4281-b951-d872f2087c98
* Converted BookmarkStorage to use ImportantFileWriterphajdan.jr@chromium.org2009-05-081-77/+3
| | | | | | | | | | | | | | | | | | Also made BookmarkStorage completely responsible for migration of bookmark data from history database. Previously the logic crossed file and class boundaries a few times. This made it a bit hard to follow. Now it should be a bit more clear. Made ImportantFileWriter also batch data serializations. TEST=Make sure that bookmarks still work. Also test migrating bookmarks from history database. http://crbug.com/10618 Review URL: http://codereview.chromium.org/99192 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15635 0039d316-1c4b-4281-b951-d872f2087c98
* Move l10n_util to app/ben@chromium.org2009-05-051-1/+1
| | | | | | | http://crbug.com/11387 Review URL: http://codereview.chromium.org/109043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15352 0039d316-1c4b-4281-b951-d872f2087c98
* Move scoped_vector.h and stl_util-inl.h to base/ben@chromium.org2009-05-051-1/+1
| | | | | | | | http://crbug.com/11387 Review URL: http://codereview.chromium.org/107001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15272 0039d316-1c4b-4281-b951-d872f2087c98
* Implement ID persistence for bookmarks:munjal@chromium.org2009-04-301-8/+22
| | | | | | | | | | | | | | | | - Bookmark codec now takes in a ctor argument persist_ids - If it's true, it will serialize IDs of bookmarks when encoding, and deserialize already serialized IDs (if present) when decoding. - During decoding, unique-ify the IDs if they are not unique. - Add unit tests for all new code. Coming up in a separate changelist: - Move ID generation logic to bookmark model, and make it non-static. Review URL: http://codereview.chromium.org/99217 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15013 0039d316-1c4b-4281-b951-d872f2087c98
* Fixes bug were sorting bookmarks wouldn't trigger a save.sky@google.com2009-03-121-0/+3
| | | | | | | | | BUG=8655 TEST=see bug Review URL: http://codereview.chromium.org/42103 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11513 0039d316-1c4b-4281-b951-d872f2087c98
* Adds support for BlockTillLoaded to Linux.markus@chromium.org2009-03-091-17/+4
| | | | | | Review URL: http://codereview.chromium.org/39298 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11300 0039d316-1c4b-4281-b951-d872f2087c98
* Changes bookmark sorting to sort folders first.sky@google.com2009-03-051-3/+38
| | | | | | | | | BUG=8338 TEST=covered by unit tests Review URL: http://codereview.chromium.org/39175 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10993 0039d316-1c4b-4281-b951-d872f2087c98
* Adds ability to sort the children of a node in the bookmark model. Isky@google.com2009-02-251-0/+15
| | | | | | | | | | | | plan on doing this in chunks, next phase is updating observers, then changing the bookmark manager to call into the new method. BUG=1750 TEST=none yet Review URL: http://codereview.chromium.org/27082 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10313 0039d316-1c4b-4281-b951-d872f2087c98
* Update include paths for grit files. Go ahead and resorttc@google.com2009-02-221-2/+1
| | | | | | | | the headers too. Review URL: http://codereview.chromium.org/21472 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10167 0039d316-1c4b-4281-b951-d872f2087c98
* Re-check in some of my dynamic linking change.evan@chromium.org2009-02-101-7/+23
| | | | | | | | | | | | | We can't link in any more of these fixed .cc files because of a chain of dependencies: - temp_scaffolding_stubs defines the same symbols as these files - removing the scaffolding pulls in more source - pulling in that extra source breaks on Mac. I have resigned myself to checking in this small bit. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9448 0039d316-1c4b-4281-b951-d872f2087c98
* Revert basically everything I've done today as it fails mysteriouslyevan@chromium.org2009-02-101-23/+7
| | | | | | | and I lack the patience to diagnose why mac doesn't link in libjpeg. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9447 0039d316-1c4b-4281-b951-d872f2087c98
* Bring a bunch more headers into the non-Windows build:evan@chromium.org2009-02-101-7/+23
| | | | | | | | | | | | | - history - autocomplete - bookmarks These were all reviewed separately but turned out to be interdependent. :~( Review URL: http://codereview.chromium.org/21170 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9444 0039d316-1c4b-4281-b951-d872f2087c98
* Remove most header file dependencies on the notification type list. It isbrettw@chromium.org2009-02-011-12/+15
| | | | | | | | | | | really painful to add more types, since lots of headers include the notification service to derive from the notification observer. This splits that out, so much less of the project should end up including notification_types.h ---Paths modified but not in any changelist: Review URL: http://codereview.chromium.org/19744 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9020 0039d316-1c4b-4281-b951-d872f2087c98
* Attempt 2 at this. This differs from first version in that I renamedsky@google.com2008-12-161-0/+8
| | | | | | | | | | | | | | | set_store to ClearStore and properly remove an observer I added. And I'm disabling a test that needs more investigation. Makes the interactive bookmark bar view tests faster by disabling saving. This is why BookmarkBarViewTest9 keeps timing out. BUG=none TEST=none Review URL: http://codereview.chromium.org/14471 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7091 0039d316-1c4b-4281-b951-d872f2087c98
* Moves some utility functions out of bookmark model intosky@google.com2008-12-091-120/+4
| | | | | | | | | | | | bookmark_utils. In addition I've converted to using TreeNodeIterator. This doesn't contain any functionality changes. BUG=4065 TEST=none Review URL: http://codereview.chromium.org/13642 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6589 0039d316-1c4b-4281-b951-d872f2087c98
* Fixes bug in adding bookmark groups. Adding wasn't setting thesky@google.com2008-11-131-0/+1
| | | | | | | | | | | | modified date, which meant newly added groups wouldn't show up in the combobox of the bookmark bubble. BUG=766 TEST=see bug Review URL: http://codereview.chromium.org/10709 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5400 0039d316-1c4b-4281-b951-d872f2087c98
* Adds the ability for ObserverList to not notify observers added duringsky@google.com2008-10-311-0/+1
| | | | | | | | | | | | | notification. I need this for bookmarks. If a new observer is added while the bookmark model is in the process of sending out notification the newly added observer gets confused. BUG=674 TEST=none Review URL: http://codereview.chromium.org/8919 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4267 0039d316-1c4b-4281-b951-d872f2087c98
* Move Time, TimeDelta and TimeTicks into namespace base.dsh@google.com2008-10-271-0/+2
| | | | | | Review URL: http://codereview.chromium.org/7995 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4022 0039d316-1c4b-4281-b951-d872f2087c98
* Adds models needed by the bookmark manager. Specifically asky@google.com2008-10-231-4/+23
| | | | | | | | | | | | | BookmarkTableModel, which will be used to show one of the following: the children of a folder, recently bookmarked or the results of a search. And the tree model implementation that shows the folders. BUG=674 TEST=covered by unit tests Review URL: http://codereview.chromium.org/8063 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3814 0039d316-1c4b-4281-b951-d872f2087c98
* Changes BookmarkModel to not grab the same lock twice.sky@google.com2008-10-091-4/+8
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/6391 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3127 0039d316-1c4b-4281-b951-d872f2087c98
* Port some more of chrome/ to Linux.deanm@google.com2008-10-021-0/+1
| | | | | | | | Original review: http://codereview.chromium.org/4247 Patch from Pawel Hajdan Jr. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2793 0039d316-1c4b-4281-b951-d872f2087c98
* Changes the bookmark model to allow more than one bookmark tosky@google.com2008-09-191-20/+72
| | | | | | | | | | | | | | | | reference the same url. Clicking the star button edits the most recently added bookmark for the URL. Dragging a button/star always does a move, otherwise drops on the bookmark bar create a new bookmark. Also changed the add page context menu for the bookmark bar to remember where you invoked it from. BUG=1173228 1678 Review URL: http://codereview.chromium.org/3203 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2413 0039d316-1c4b-4281-b951-d872f2087c98
* Adds logging of loading/saving bookmarks to help me diagnose why somesky@google.com2008-09-161-0/+9
| | | | | | | | | | | folks are having problems. BUG=none TEST=none Review URL: http://codereview.chromium.org/2914 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2290 0039d316-1c4b-4281-b951-d872f2087c98
* Renames BoomarkBarModel to BookmarkModel.sky@google.com2008-09-111-0/+693
BUG=none TEST=none Review URL: http://codereview.chromium.org/1912 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2057 0039d316-1c4b-4281-b951-d872f2087c98