| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, BookmarkModel::SetTitle(..) would remove leading/trailing whitespace
characters before modifying the bookmark node. This is problematic for any
code that directly interacts with bookmark nodes (for example for comparison
purposes or when loading bookmark from the persisted file). By having this
functionality in the BookmarkNode itself, we ensure consistent titles, and
fix a bug where sync could not find bookmarks and ended up duplicating data.
BUG=108332
TEST=Add a bookmark with leading/trailing spaces. Enable Sync. Restart. Ensure the bookmark has not duplicated. unit_tests --gtest_filter="*ProfileSyncServiceBookmarkTestWithData*"
Review URL: http://codereview.chromium.org/8949053
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@116009 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
| |
IsVisible as it's no longer needed. This cl resulted in a ton of
changes, the majority are renames though.
BUG=102714
TEST=covered by tests
Review URL: http://codereview.chromium.org/8759017
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@112558 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of IDS_BOOMARK it should be IDS_BOOKMARK, notice the missing 'K'.
BUG=None
TEST=None
R=sky@chromium.org
Review URL: http://codereview.chromium.org/7744055
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@98442 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
| |
BUG=none
TEST=base_unittests --gtest_filter=MD5.ContextWithStringData*
Review URL: http://codereview.chromium.org/7466003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@94203 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=None
TEST=None
R=sky@chromium.org
Review URL: http://codereview.chromium.org/7482017
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@93661 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=None
TEST=None
R=sky@chromium.org
Review URL: http://codereview.chromium.org/7465018
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@93464 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=89274
TEST=None
R=evan@chromium.org
Review URL: http://codereview.chromium.org/7395021
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92861 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
And check if a node is not an url by using is_folder() method.
Unrelated change:
- Move the friend declaration of BookmarkModel to private section below.
BUG=None
TEST=None
R=sky@chromium.org
Review URL: http://codereview.chromium.org/7260004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90576 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Second attempt to land this change. Fixes memory leak (82186),
deleted bookmarks (82273) and crash on add bookmarks in windows (82349).
Original desscription:
Mostly ensures that sycned bookmarks are correctly treated as an immutable
folder. Some of the UI-bits maybe incomplete. For example, if
enable-synced-bookmarks-folder is set, then synced bookmarks will appear in the
bookmark manager page and some components of the UI but it's not on the bookmark
bar or anything like that. This change also ensures that the synced bookmark
folder matches a sync folder if one is available.
BUG=
TEST=test bookmark addition/moving around in combination with sync
Review URL: http://codereview.chromium.org/7012005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86902 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Mostly ensures that sycned bookmarks are correctly treated as an immutable
folder. Some of the UI-bits maybe incomplete. For example, if
enable-synced-bookmarks-folder is set, then synced bookmarks will appear in the
bookmark manager page and some components of the UI but it's not on the bookmark
bar or anything like that. This change also ensures that the synced bookmark
folder matches a sync folder if one is available.
BUG=
TEST=
Review URL: http://codereview.chromium.org/6931018
TBR=yfriedman@chromium.org
Review URL: http://codereview.chromium.org/6982028
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@84985 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Mostly ensures that sycned bookmarks are correctly treated as an immutable
folder. Some of the UI-bits maybe incomplete. For example, if
enable-synced-bookmarks-folder is set, then synced bookmarks will appear in the
bookmark manager page and some components of the UI but it's not on the bookmark
bar or anything like that. This change also ensures that the synced bookmark
folder matches a sync folder if one is available.
BUG=
TEST=
Review URL: http://codereview.chromium.org/6931018
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@84829 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is so it matches with the signature used in View class.
BUG=None
TEST=None
R=sky@chromium.org
Review URL: http://codereview.chromium.org/6683024
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78712 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
While I'm here:
- Add OVERRIDE to some methods.
- Remove unnecessary include.
- Remove "virtual" keyword from a method that doesn't need to be overridden.
- Remove an unused forward declaration.
- And some other random cleanups.
BUG=None
TEST=existing unit_tests.
Review URL: http://codereview.chromium.org/6673017
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@77844 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is the first part to get rid of references to group in the bookmarks API.
All of them will be changed from group to folder to make it consistent, since
right now we have a mix of them.
BUG=None
TEST=None
Review URL: http://codereview.chromium.org/6667013
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@77760 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is part of a serie of patches to make the TreeNode API more closer to style
used in the Views Tree API (see views/view.h for reference).
BUG=None
TEST=existing unit_tests.
Review URL: http://codereview.chromium.org/6639015
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@77592 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
BUG=none
TEST=none
TBR=brettw
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72227 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
(Only 424k off Linux debug .a files).
BUG=none
TEST=compiles
Review URL: http://codereview.chromium.org/3859003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63059 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
to GetTitle().
BUG=23581
TEST=builds and passes tests
Review URL: http://codereview.chromium.org/3279005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57834 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
BUG=23581
TEST=builds and passes tests
Review URL: http://codereview.chromium.org/3140022
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57000 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
| |
Also do some drive-by wstring/wchar_t -> string/char changes (in addition to the
necessary ones).
BUG=none
TEST=builds and tests pass
Review URL: http://codereview.chromium.org/3091005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54944 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Also do a bunch of drive-by changes while I'm at it.
Still to do: rename GetStringAsUTF16() to GetString().
BUG=none
TEST=builds everywhere, tests pass
Review URL: http://codereview.chromium.org/3033050
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54915 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
| |
string_number_conversions.h
TEST=it compiles
BUG=none
Review URL: http://codereview.chromium.org/3013046
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54454 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use the base namespace in the new file. Update callers.
I removed all wstring variants and also the string->number ones that ignore the return value. That encourages people to write code and forget about error handling.
TEST=included unit tests
BUG=none
Review URL: http://codereview.chromium.org/3056029
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54355 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
TEST=exists
BUG=32013
Review URL: http://codereview.chromium.org/546094
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36805 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=19852
TEST=See repro steps of the bug
Patch by Bruno Calvignac <BrunoCalvignac@gmail.com>
Original CL http://codereview.chromium.org/282004
Review URL: http://codereview.chromium.org/342046
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30540 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rename GetType and SetType using the Unix style to match with the other usages in BookmarkNode.
GetType -> type
SetType -> set_type
BUG=None
TEST=None
Review URL: http://codereview.chromium.org/297005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29443 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
we reassign them. The particular scenario that can lead to this is
when migrating bookmarks out of the db we never reset the ids of the
newly created nodes, so that we wrote all to the file with ids of
0. I'm not patching that code so that I have coverage of the unit
test, and we'll handle fix up during reading anyway.
BUG=24060
TEST=covered by unit tests
Review URL: http://codereview.chromium.org/268001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28346 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
Although we represent time internally starting from 1601, there are still
things like time explosion that will not work before the year 1900. This
limitation is the same as it was previously.
BUG=14734
Review URL: http://codereview.chromium.org/173296
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24417 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
Coverity finds a condition where this leaks. We are at the moment not using it in such a way that it leaks, but that might of course change. It looks to me like the API is not intended to be used in such a way anyway, so we can just check for it and return false.
BUG=15350
TEST=Decoding bookmarks should work as before.
Review URL: http://codereview.chromium.org/159075
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22379 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
when checksums differ or if IDs are missing and do that
simply by assigning the next maximum id.
Add a unit test.
BUG=16357
TEST=NONE
Review URL: http://codereview.chromium.org/155560
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20779 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of providing a separate check to validate bookmarks while loading, we could assume invalid bookmarks are invalid, hence we don't break the loading sequence. We keep looping since another bookmark might be valid.
If the JSON syntax is broken, it will exit gracefully because the parser can't parse the file. This patch is only good for people who are editing their bookmarks directly and missing a item in the bookmark node.
BUG=10709 (http://crbug.com/10709)
TEST=Deleted any line from the Bookmarks file within the bookmark children node. Loaded up Chromium and it loaded the error free bookmarks.
Review URL: http://codereview.chromium.org/118351
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17960 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ones generated by the codec.
The bookmark bar and other bookmarks nodes get initialized
by the model to ids 1 and 2, respectively. Later, when the
BookmarkCodec is decoding, it starts with the bookmark bar which
has id 1, but continues depth-first from this node instead of
handling other_bookmarks next. This means the first child of
the bookmark bar gets id 2, and this was colliding with
other_bookmarks because the codec wasn't overwriting the id
when a valid |node| is passed in. In other words, two exclusive
unique ID generators are not better than one.
I considered other things, like calling RecordId on the id_generator
for the "special node" ids, but that caused PersistIds test to fail.
Also considered special-casing the two special nodes in Decode, but
those attempts felt either more subtle or lame than this one.
TEST=BookmarkModelTestWithProfile.CreateAndRestore
Review URL: http://codereview.chromium.org/115696
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16772 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
bookmarks file was changed by the user between two chrome runs.
- BookmarkCodec now serializes a checksum of bookmark data along
side bookmark data during encoding.
- During decoding BookmarkCodec computes the checksum of deserialized
data, and it also reads the checksum in the file.
- BookmarkCodec exposes both the checksums via getters.
- Add unit tests for BookmarkCodec, right now only checksum related.
Review URL: http://codereview.chromium.org/69028
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14612 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
| |
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10982 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
| |
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10837 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
| |
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=10818
Review URL: http://codereview.chromium.org/31014
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10833 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
| |
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10821 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
| |
Review URL: http://codereview.chromium.org/31014
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10818 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
| |
Review URL: http://codereview.chromium.org/28281
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10664 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
| |
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
|