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

Issue 12670013: Out-of-process import on Windows. (Closed)

Created:
7 years, 9 months ago by gab
Modified:
7 years, 7 months ago
CC:
chromium-reviews, dconnelly
Visibility:
Public.

Description

OOP import on Windows. Gets rid of the import process on all platforms -- replaced by a utility process which communicates with a ProfileWriter back in the browser process to write to the profile (this uses the ExternalProcessImporterHost machinery written 2+ years ago by mirandac@ for import on Mac and still the state of the art today). Gets rid of all issues regarding profile contention and races to profile creation between the browser and import processes on first run (example of issues this has previously caused: http://crbug.com/171475, http://crbug.com/174591, http://crbug.com/180459). Makes bookmarks file import use the same mechanism on all platforms (this means bookmarks file import is now in-process on Linux which still uses ImporterHost (instead of ExternalProcessImporterHost) -- Linux used to use the import process solely for bookmarks file import -- but the work to switch Linux to ExternalProcessImporterHost should be very minimal after this CL and I intend to do it in a follow-up CL to unify the import flow cross-platform once and for all!). Do not use the out-of-process import for Google Toolbar (this was already the case prior to this CL). To make the Google Toolbar importer work out-of-process, we would have to augment the import IPC drastically to support the web auth flow required by this importer (it requires to login to import the google.com/bookmarks favorites). This, as a side-effect, brings silent bookmarks file import from master_preferences to Mac (long standing issue 48880). Also fixes issue 231710 (or at least removes the condition causing the bug by making the ImportLockDialog go away on first run on Windows -- as should already have been the case). Also addresses issue 178083 since the early message loop spinning was caused by ImportSettingsWin which was called too early on Windows (actually resulting in running the full import twice on Windows!) -- via PreCreateThreadsImpl()-->ProcessMasterPreferences()-->SetImportPreferencesAndLaunchImport()-->ImportSettingsWin()... This whole flow is removed in this CL :). This improves first run speed in a debug build from 4901ms to 1477ms, a 332% improvement!!!! (tested by instrumenting a first run browser test, the delta is between the time the test is constructed and the time the test case is called (which happens after the browser has been initialized and import has occurred)). This supersedes https://codereview.chromium.org/12463030/ (which won't be committed because this fix is so much better). BUG=219419, 22142, 56816, 178083, 178051, 48880, 232241, 231710, 223462, 87657, 236225 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=201837

Patch Set 1 : oop import #

Patch Set 2 : fix compile #

Patch Set 3 : fix FirstRun tests #

Patch Set 4 : fix unit_tests #

Patch Set 5 : try new test #

Patch Set 6 : works!!!! #

Patch Set 7 : Importer Browser Tests -- still broken on Firefox #

Patch Set 8 : fixed tests! #

Patch Set 9 : merge up to r194449 #

Patch Set 10 : delete import progress dialog #

Patch Set 11 : merge extracted CLs #

Patch Set 12 : cleanup #

Patch Set 13 : wstring -> string16 #

Patch Set 14 : merge more extracted CLs #

Patch Set 15 : extract some more CLs #

Total comments: 39

Patch Set 16 : merge up to r196136 + modifications in extracted CLs #

Total comments: 9

Patch Set 17 : fix nits #

Patch Set 18 : merge up to r196404 #

Patch Set 19 : +comment #

Patch Set 20 : Merge in https://codereview.chromium.org/14143010/ #

Patch Set 21 : merge up to r196996 #

Patch Set 22 : Keep Google Toolbar import in-process. #

Total comments: 2

Patch Set 23 : update comment #

Patch Set 24 : merge up to r197907 and try to fix 14143010... #

Patch Set 25 : merge https://codereview.chromium.org/14651007/ #

Patch Set 26 : merge up to r198447 #

Patch Set 27 : merge up to r199501 #

Patch Set 28 : merge up to r199992 #

Patch Set 29 : merge up to r201293 #

Patch Set 30 : rebase on top of https://codereview.chromium.org/15736014/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+317 lines, -728 lines) Patch
M chrome/browser/chrome_browser_main.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 4 chunks +5 lines, -25 lines 0 comments Download
M chrome/browser/extensions/extension_service.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 2 chunks +0 lines, -4 lines 0 comments Download
M chrome/browser/extensions/extension_system.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/first_run/first_run.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 3 chunks +15 lines, -20 lines 0 comments Download
M chrome/browser/first_run/first_run.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 12 chunks +123 lines, -80 lines 0 comments Download
M chrome/browser/first_run/first_run_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 3 chunks +106 lines, -43 lines 0 comments Download
M chrome/browser/first_run/first_run_internal.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 3 chunks +0 lines, -59 lines 0 comments Download
M chrome/browser/first_run/first_run_linux.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 1 chunk +0 lines, -31 lines 0 comments Download
M chrome/browser/first_run/first_run_mac.mm View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +0 lines, -5 lines 0 comments Download
M chrome/browser/first_run/first_run_posix.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 4 chunks +0 lines, -62 lines 0 comments Download
M chrome/browser/first_run/first_run_win.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 4 chunks +2 lines, -310 lines 0 comments Download
M chrome/browser/importer/external_process_importer_bridge.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 4 chunks +35 lines, -18 lines 0 comments Download
M chrome/browser/importer/firefox_importer_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 2 chunks +2 lines, -3 lines 0 comments Download
M chrome/browser/importer/ie_importer_browsertest_win.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 3 chunks +3 lines, -4 lines 0 comments Download
M chrome/browser/policy/cloud/user_policy_signin_service.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 1 chunk +1 line, -4 lines 0 comments Download
M chrome/browser/profiles/profile.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/profiles/profile_manager.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +0 lines, -4 lines 0 comments Download
M chrome/browser/profiles/profile_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 2 chunks +7 lines, -16 lines 0 comments Download
M chrome/browser/sync/profile_sync_service_factory.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 1 chunk +0 lines, -4 lines 0 comments Download
M chrome/browser/ui/sync/profile_signin_confirmation_helper_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +1 line, -6 lines 0 comments Download
M chrome/browser/ui/webui/options/import_data_handler.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +10 lines, -6 lines 0 comments Download
M chrome/common/chrome_switches.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 1 chunk +0 lines, -2 lines 0 comments Download
M chrome/common/chrome_switches.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 1 chunk +0 lines, -8 lines 0 comments Download
M chrome/common/switch_utils.cc View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -2 lines 0 comments Download
M chrome/common/switch_utils_unittest.cc View 1 2 3 4 chunks +2 lines, -6 lines 0 comments Download
M chrome/utility/profile_import_handler.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 1 chunk +4 lines, -3 lines 0 comments Download

Messages

Total messages: 24 (0 generated)
gab
Carlos/Miranda, OOP import on Windows is finally here, please take a look! I extracted as ...
7 years, 8 months ago (2013-04-18 21:51:18 UTC) #1
gab
Wow... :)! Updated CL description, but in short: this is a drastic improvement to first ...
7 years, 8 months ago (2013-04-19 17:12:01 UTC) #2
dconnelly
https://codereview.chromium.org/12670013/diff/99003/chrome/browser/profiles/profile.cc File chrome/browser/profiles/profile.cc (left): https://codereview.chromium.org/12670013/diff/99003/chrome/browser/profiles/profile.cc#oldcode145 chrome/browser/profiles/profile.cc:145: // TODO(dconnelly): revisit this when crbug.com/22142 (unifying the profile ...
7 years, 8 months ago (2013-04-22 08:18:56 UTC) #3
gab
An extra piece of information to help review this massive change. Thanks! Gab https://codereview.chromium.org/12670013/diff/99003/chrome/browser/first_run/first_run_win.cc File ...
7 years, 8 months ago (2013-04-22 22:32:24 UTC) #4
cpu_(ooo_6.6-7.5)
still digesting Cl. Don't we need a reviewer for the profiles part?
7 years, 8 months ago (2013-04-22 23:54:18 UTC) #5
gab
On 2013/04/22 23:54:18, cpu wrote: > still digesting Cl. Don't we need a reviewer for ...
7 years, 8 months ago (2013-04-23 02:42:00 UTC) #6
Miranda Callahan
I am still a profiles/* OWNER, and feel comfortable reviewing the relatively minor changes to ...
7 years, 8 months ago (2013-04-23 06:55:32 UTC) #7
Miranda Callahan
(s/theres/there's). Also -- I am OOO at a conference in Paris this week, unfortunately -- ...
7 years, 8 months ago (2013-04-23 08:15:21 UTC) #8
cpu_(ooo_6.6-7.5)
https://codereview.chromium.org/12670013/diff/99003/chrome/browser/first_run/first_run.cc File chrome/browser/first_run/first_run.cc (right): https://codereview.chromium.org/12670013/diff/99003/chrome/browser/first_run/first_run.cc#newcode115 chrome/browser/first_run/first_run.cc:115: // ends, this class should quit the message loop. ...
7 years, 8 months ago (2013-04-23 23:36:04 UTC) #9
cpu_(ooo_6.6-7.5)
lgtm on the CL, I did not review the following chrome/browser/importer/* chrome/browser/profiles/*
7 years, 8 months ago (2013-04-23 23:37:21 UTC) #10
tapted
On 2013/04/18 21:51:18, gab wrote: > @tapted: Have a look at the modified first_run_browsertests Really ...
7 years, 8 months ago (2013-04-24 08:08:35 UTC) #11
gab
FYI, I merged in what should be the final version of all the extracted CLs ...
7 years, 8 months ago (2013-04-24 14:48:15 UTC) #12
Miranda Callahan
LGTM with some nits. Great work. https://codereview.chromium.org/12670013/diff/99003/chrome/browser/first_run/first_run.cc File chrome/browser/first_run/first_run.cc (right): https://codereview.chromium.org/12670013/diff/99003/chrome/browser/first_run/first_run.cc#newcode76 chrome/browser/first_run/first_run.cc:76: int g_auto_import_state = ...
7 years, 8 months ago (2013-04-24 15:16:40 UTC) #13
gab
@thakis for OWNER approval on side-effects not covered by current reviewers, i.e.: chrome\browser\chrome_browser_main.cc chrome\browser\extensions\extension_service.cc chrome\browser\extensions\extension_system.cc ...
7 years, 8 months ago (2013-04-24 20:24:58 UTC) #14
Nico
lgtm!
7 years, 8 months ago (2013-04-24 22:53:47 UTC) #15
tapted
slgtm - thanks for clarifying https://codereview.chromium.org/12670013/diff/99003/chrome/browser/first_run/first_run_browsertest.cc File chrome/browser/first_run/first_run_browsertest.cc (right): https://codereview.chromium.org/12670013/diff/99003/chrome/browser/first_run/first_run_browsertest.cc#newcode133 chrome/browser/first_run/first_run_browsertest.cc:133: } } // namespace ...
7 years, 8 months ago (2013-04-25 00:02:42 UTC) #16
Miranda Callahan
https://codereview.chromium.org/12670013/diff/113001/chrome/browser/first_run/first_run.cc File chrome/browser/first_run/first_run.cc (right): https://codereview.chromium.org/12670013/diff/113001/chrome/browser/first_run/first_run.cc#newcode809 chrome/browser/first_run/first_run.cc:809: int GetAutoImportState() { yes, that's even better. :-) On ...
7 years, 8 months ago (2013-04-25 11:37:05 UTC) #17
gab
Done, trying to find a solution to the failing IEImporterTest, the problem is that they ...
7 years, 8 months ago (2013-04-25 18:49:59 UTC) #18
gab
Fixed the IE tests, the fix was fairly involved (https://codereview.chromium.org/14143010/) so I kept it as ...
7 years, 7 months ago (2013-04-26 17:41:21 UTC) #19
gab
@thakis: PTAL at chrome/browser/ui/webui/options/import_data_handler.cc. Modified chrome/browser/ui/webui/options/import_data_handler.cc to keep the Google Toolbar import in-process. As I ...
7 years, 7 months ago (2013-04-29 02:56:38 UTC) #20
Nico
still lgtm https://codereview.chromium.org/12670013/diff/170004/chrome/browser/ui/webui/options/import_data_handler.cc File chrome/browser/ui/webui/options/import_data_handler.cc (right): https://codereview.chromium.org/12670013/diff/170004/chrome/browser/ui/webui/options/import_data_handler.cc#newcode115 chrome/browser/ui/webui/options/import_data_handler.cc:115: // The Google Toolbar import doesn't work ...
7 years, 7 months ago (2013-04-29 03:24:54 UTC) #21
gab
Thanks https://codereview.chromium.org/12670013/diff/170004/chrome/browser/ui/webui/options/import_data_handler.cc File chrome/browser/ui/webui/options/import_data_handler.cc (right): https://codereview.chromium.org/12670013/diff/170004/chrome/browser/ui/webui/options/import_data_handler.cc#newcode115 chrome/browser/ui/webui/options/import_data_handler.cc:115: // The Google Toolbar import doesn't work for ...
7 years, 7 months ago (2013-04-29 12:41:53 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/gab@chromium.org/12670013/295001
7 years, 7 months ago (2013-05-23 13:43:44 UTC) #23
commit-bot: I haz the power
7 years, 7 months ago (2013-05-23 18:49:51 UTC) #24
Message was sent while issue was closed.
Change committed as 201837

Powered by Google App Engine
This is Rietveld 408576698