Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(664)

Issue 6979007: Many fixes to bookmark importing. (Closed)

Created:
9 years, 7 months ago by Ilya Sherman
Modified:
9 years, 7 months ago
CC:
chromium-reviews, pam+watch_chromium.org, Paweł Hajdan Jr.
Visibility:
Public.

Description

Many fixes to bookmark importing. In particular: * All bookmarks are imported to the toolbar -- nothing goes to Other Bookmarks. If there are initially no bookmarks on the toolbar, we try to reduce nesting of the imported bookmarks as much as possible. If there are already bookmarks on the toolbar, all the imported bookmarks end up in a new folder -- e.g. "Imported from Safari" -- on the toolbar. * All importers explicitly include a containing folder for bookmarks in the toolbar. o The ProfileWriter is responsible for stripping this folder off when the bookmarks should be imported directly to the toolbar. * All importers do *not* include a containing folder for the remaining bookmarks. o The ProfileWriter is responsible for creating this folder as appropriate. In fact, this is how things used to work previously, too, since the folder name needed to be uniquified. This CL makes the logic much clearer though (I hope). * All importers should now be able to handle importing empty folders. * The ProfileWriter no longer takes in a bitset of options for importing bookmarks. These options were all either set identically by all clients, or could be more accurately computed locally. * Some implementation details for ProfileWriter have been removed from the header file. Others have just been completely nuked from orbit, and replaced by simpler code (again, I hope). BUG=79427, 79433, 71351 TEST=unit_tests --gtest_filter=*Import* Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=86861

Patch Set 1 #

Total comments: 3

Patch Set 2 : Rebased #

Patch Set 3 : Test fixes + debugging printfs #

Patch Set 4 : Happy tests =) #

Unified diffs Side-by-side diffs Delta from patch set Stats (+361 lines, -503 lines) Patch
M chrome/browser/bookmarks/bookmark_html_writer_unittest.cc View 4 chunks +7 lines, -13 lines 0 comments Download
M chrome/browser/importer/external_process_importer_bridge.h View 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/importer/external_process_importer_bridge.cc View 1 chunk +2 lines, -4 lines 0 comments Download
M chrome/browser/importer/external_process_importer_client.h View 4 chunks +1 line, -8 lines 0 comments Download
M chrome/browser/importer/external_process_importer_client.cc View 4 chunks +6 lines, -13 lines 0 comments Download
M chrome/browser/importer/external_process_importer_host.h View 1 chunk +0 lines, -3 lines 0 comments Download
M chrome/browser/importer/external_process_importer_host.cc View 4 chunks +2 lines, -8 lines 0 comments Download
M chrome/browser/importer/firefox2_importer.h View 1 chunk +0 lines, -2 lines 0 comments Download
M chrome/browser/importer/firefox2_importer.cc View 6 chunks +20 lines, -33 lines 0 comments Download
M chrome/browser/importer/firefox3_importer.cc View 3 chunks +21 lines, -27 lines 0 comments Download
M chrome/browser/importer/firefox_importer_unittest.cc View 3 chunks +31 lines, -59 lines 0 comments Download
M chrome/browser/importer/ie_importer.cc View 3 chunks +4 lines, -15 lines 0 comments Download
M chrome/browser/importer/importer.h View 2 chunks +0 lines, -19 lines 0 comments Download
M chrome/browser/importer/importer.cc View 1 chunk +1 line, -4 lines 0 comments Download
M chrome/browser/importer/importer_bridge.h View 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/importer/importer_host.h View 1 1 chunk +0 lines, -3 lines 0 comments Download
M chrome/browser/importer/importer_host.cc View 3 chunks +0 lines, -11 lines 0 comments Download
M chrome/browser/importer/importer_unittest.cc View 1 2 3 6 chunks +17 lines, -20 lines 0 comments Download
M chrome/browser/importer/in_process_importer_bridge.h View 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/importer/in_process_importer_bridge.cc View 1 chunk +2 lines, -3 lines 0 comments Download
M chrome/browser/importer/profile_import_process_client.h View 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/importer/profile_import_process_client.cc View 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/importer/profile_import_process_host.h View 1 chunk +2 lines, -4 lines 0 comments Download
M chrome/browser/importer/profile_import_process_host.cc View 2 chunks +6 lines, -4 lines 0 comments Download
M chrome/browser/importer/profile_import_process_messages.h View 2 chunks +3 lines, -5 lines 0 comments Download
M chrome/browser/importer/profile_writer.h View 4 chunks +21 lines, -47 lines 0 comments Download
M chrome/browser/importer/profile_writer.cc View 5 chunks +109 lines, -130 lines 0 comments Download
M chrome/browser/importer/safari_importer.h View 2 chunks +3 lines, -1 line 0 comments Download
M chrome/browser/importer/safari_importer.mm View 6 chunks +37 lines, -24 lines 0 comments Download
M chrome/browser/importer/safari_importer_unittest.mm View 1 2 chunks +58 lines, -23 lines 0 comments Download
M chrome/browser/importer/toolbar_importer.cc View 1 chunk +1 line, -3 lines 0 comments Download
M chrome/profile_import/profile_import_thread.h View 2 chunks +2 lines, -4 lines 0 comments Download
M chrome/profile_import/profile_import_thread.cc View 3 chunks +3 lines, -6 lines 0 comments Download
M chrome/test/data/safari_import/Safari/Bookmarks.plist View 0 chunks +-1 lines, --1 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
Ilya Sherman
Note: I have not yet tested this on Windows, so I'm not sure whether the ...
9 years, 7 months ago (2011-05-25 07:24:43 UTC) #1
Takashi Toyoshima
This change seems to fix Issue 71351, too. Coud you add it into BUG= line ...
9 years, 7 months ago (2011-05-25 08:58:11 UTC) #2
Miranda Callahan
I love the simplification -- but it looks like firefox importer tests are failing on ...
9 years, 7 months ago (2011-05-25 13:20:13 UTC) #3
tfarina
http://codereview.chromium.org/6979007/diff/1/chrome/browser/importer/external_process_importer_host.cc File chrome/browser/importer/external_process_importer_host.cc (right): http://codereview.chromium.org/6979007/diff/1/chrome/browser/importer/external_process_importer_host.cc#newcode56 chrome/browser/importer/external_process_importer_host.cc:56: client_ = new ExternalProcessImporterClient(this, *source_profile_, items_, When the args ...
9 years, 7 months ago (2011-05-25 17:01:27 UTC) #4
Ilya Sherman
On 2011/05/25 08:58:11, toyoshim wrote: > This change seems to fix Issue 71351, too. > ...
9 years, 7 months ago (2011-05-26 00:13:20 UTC) #5
tfarina
On 2011/05/26 00:13:20, Ilya Sherman wrote: > http://codereview.chromium.org/6979007/diff/1/chrome/browser/importer/external_process_importer_host.cc > File chrome/browser/importer/external_process_importer_host.cc (right): > > http://codereview.chromium.org/6979007/diff/1/chrome/browser/importer/external_process_importer_host.cc#newcode56 ...
9 years, 7 months ago (2011-05-26 00:23:39 UTC) #6
Ilya Sherman
On 2011/05/26 00:23:39, tfarina wrote: > On 2011/05/26 00:13:20, Ilya Sherman wrote: > > > ...
9 years, 7 months ago (2011-05-26 00:35:47 UTC) #7
tfarina
On 2011/05/26 00:35:47, Ilya Sherman wrote: > That said, if it's really important to you ...
9 years, 7 months ago (2011-05-26 00:40:02 UTC) #8
Miranda Callahan
9 years, 7 months ago (2011-05-26 12:54:02 UTC) #9
The Mac test is the one you said fails because of the binary, right?  Take it on
home! LGTM!

Powered by Google App Engine
This is Rietveld 408576698