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

Issue 12330073: Disable ProfileKeyedServices on import process by default. (Closed)

Created:
7 years, 10 months ago by Andrew T Wilson (Slow)
Modified:
7 years, 9 months ago
CC:
chromium-reviews, Raman Kakilate, akalin, estade+watch_chromium.org, benquan, Raghu Simha, ahutter, dbeam+watch-autofill_chromium.org, sail+watch_chromium.org, Dane Wallinga, dyu1, dhollowa+watch_chromium.org, Albert Bodenhamer, haitaol1, Ilya Sherman, tim (not reviewing), macourteau
Visibility:
Public.

Description

Disable ProfileKeyedServices on import process by default. Added a new ProfileKeyedBaseFactory::ServiceIsNULLOnImportProcess() API which disables all services by default. Services which must run on the import process can override this to allow creation. BUG=174864 Closing this CL since I don't want to land it (gab@ is working on a better CL which delays the creation of the profile on the main browser process until after import is done)

Patch Set 1 #

Total comments: 1

Patch Set 2 : Address pkasting review comments. #

Patch Set 3 : Rebase to ToT #

Total comments: 1

Patch Set 4 : Enable more services on import process #

Patch Set 5 : Merge to ToT #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+97 lines, -17 lines) Patch
M chrome/browser/bookmarks/bookmark_model_factory.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/bookmarks/bookmark_model_factory.cc View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/content_settings/cookie_settings.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/content_settings/cookie_settings.cc View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/custom_handlers/protocol_handler_registry_factory.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/custom_handlers/protocol_handler_registry_factory.cc View 1 2 3 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/extensions/activity_log.h View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/extensions/activity_log.cc View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/extensions/extension_pref_value_map_factory.h View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/extensions/extension_pref_value_map_factory.cc View 1 2 3 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/extensions/extension_system_factory.h View 1 2 3 2 chunks +2 lines, -0 lines 0 comments Download
M chrome/browser/extensions/extension_system_factory.cc View 1 2 3 4 2 chunks +8 lines, -0 lines 1 comment Download
M chrome/browser/history/history_service_factory.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/history/history_service_factory.cc View 1 2 3 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/plugins/plugin_prefs_factory.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/plugins/plugin_prefs_factory.cc View 1 2 3 4 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/browser/policy/user_policy_signin_service.cc View 2 chunks +0 lines, -7 lines 0 comments Download
M chrome/browser/prerender/prerender_manager_factory.h View 1 2 3 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/prerender/prerender_manager_factory.cc View 1 2 3 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/profiles/gaia_info_update_service_factory.h View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/profiles/gaia_info_update_service_factory.cc View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/profiles/profile_impl.cc View 1 2 3 4 1 chunk +2 lines, -1 line 1 comment Download
M chrome/browser/profiles/profile_io_data.cc View 1 2 3 4 1 chunk +4 lines, -2 lines 0 comments Download
M chrome/browser/profiles/profile_keyed_base_factory.h View 1 chunk +8 lines, -0 lines 0 comments Download
M chrome/browser/profiles/profile_keyed_base_factory.cc View 1 2 3 4 3 chunks +14 lines, -0 lines 0 comments Download
M chrome/browser/profiles/profile_manager.cc View 1 2 3 4 1 chunk +4 lines, -1 line 0 comments Download
M chrome/browser/sync/profile_sync_service_factory.cc View 2 chunks +0 lines, -5 lines 0 comments Download
M chrome/browser/webdata/web_data_service.cc View 1 2 3 4 1 chunk +5 lines, -1 line 0 comments Download

Messages

Total messages: 28 (0 generated)
Andrew T Wilson (Slow)
erg: PTAL pkasting: PTAL at web_data_service.cc (changed DCHECK to CHECK) tapted: Is running the browser ...
7 years, 10 months ago (2013-02-22 16:50:59 UTC) #1
Elliot Glaysher
+rlp to see if she has an opinion on this.
7 years, 10 months ago (2013-02-22 19:01:38 UTC) #2
rpetterson
On 2013/02/22 19:01:38, Elliot Glaysher wrote: > +rlp to see if she has an opinion ...
7 years, 10 months ago (2013-02-22 19:21:08 UTC) #3
Peter Kasting
https://codereview.chromium.org/12330073/diff/1/chrome/browser/webdata/web_data_service.cc File chrome/browser/webdata/web_data_service.cc (right): https://codereview.chromium.org/12330073/diff/1/chrome/browser/webdata/web_data_service.cc#newcode93 chrome/browser/webdata/web_data_service.cc:93: CHECK(!ProfileManager::IsImportProcess(*CommandLine::ForCurrentProcess())); CHECK means "Chrome has to crash immediately if ...
7 years, 10 months ago (2013-02-22 21:34:55 UTC) #4
Andrew T Wilson (Slow)
Yes, I intend for it to crash the import process, for two reasons: 1) It's ...
7 years, 10 months ago (2013-02-22 22:18:35 UTC) #5
Peter Kasting
On 2013/02/22 22:18:35, Andrew T Wilson wrote: > Yes, I intend for it to crash ...
7 years, 10 months ago (2013-02-23 00:28:22 UTC) #6
Andrew T Wilson (Slow)
On 2013/02/23 00:28:22, Peter Kasting wrote: > On 2013/02/22 22:18:35, Andrew T Wilson wrote: > ...
7 years, 10 months ago (2013-02-23 12:21:10 UTC) #7
Andrew T Wilson (Slow)
On 2013/02/22 19:21:08, rpetterson wrote: > I don't see any issues with this assuming that ...
7 years, 10 months ago (2013-02-23 12:22:16 UTC) #8
Peter Kasting
Really the solution to all this stuff seems like "fix bug 22142". Until that happens, ...
7 years, 10 months ago (2013-02-23 18:59:08 UTC) #9
tapted
On 2013/02/22 16:50:59, Andrew T Wilson wrote: > tapted: Is running the browser tests sufficient ...
7 years, 10 months ago (2013-02-24 22:33:53 UTC) #10
rpetterson
On 2013/02/23 12:22:16, Andrew T Wilson wrote: > On 2013/02/22 19:21:08, rpetterson wrote: > > ...
7 years, 9 months ago (2013-02-25 19:00:40 UTC) #11
Elliot Glaysher
I really dislike this since we're now baking in details just for the import process ...
7 years, 9 months ago (2013-02-25 19:06:39 UTC) #12
tapted
Nothing stands out to me btw - lgtm. But you might want to wait for ...
7 years, 9 months ago (2013-02-26 11:00:35 UTC) #13
gab
See below (+cc macourteau). Cheers, Gab https://codereview.chromium.org/12330073/diff/1011/chrome/browser/webdata/web_data_service.cc File chrome/browser/webdata/web_data_service.cc (right): https://codereview.chromium.org/12330073/diff/1011/chrome/browser/webdata/web_data_service.cc#newcode93 chrome/browser/webdata/web_data_service.cc:93: CHECK(!ProfileManager::IsImportProcess(*CommandLine::ForCurrentProcess())); FWIW, we ...
7 years, 9 months ago (2013-03-07 15:46:57 UTC) #14
Andrew T Wilson (Slow)
I would say that's a good thing - we should fail to import rather than ...
7 years, 9 months ago (2013-03-07 15:54:14 UTC) #15
gab
On 2013/03/07 15:54:14, Andrew T Wilson wrote: > I would say that's a good thing ...
7 years, 9 months ago (2013-03-07 15:57:22 UTC) #16
gab
On 2013/03/07 15:57:22, gab wrote: > On 2013/03/07 15:54:14, Andrew T Wilson wrote: > > ...
7 years, 9 months ago (2013-03-07 15:58:23 UTC) #17
Andrew T Wilson (Slow)
Agreed, and I don't know the behavior since I don't have a release build built. ...
7 years, 9 months ago (2013-03-07 16:06:08 UTC) #18
macourteau
FWIW, the issue related to the DCHECK being hit is this one: https://code.google.com/p/chromium/issues/detail?id=180306
7 years, 9 months ago (2013-03-07 16:36:37 UTC) #19
Andrew T Wilson (Slow)
erg, gab, PTAL since I've updated the patch to allow more services to run on ...
7 years, 9 months ago (2013-03-07 17:57:36 UTC) #20
gab
I'm not an expert in ProfileKeyedServices (caitkp CC'ed might have a better opinion). It seems ...
7 years, 9 months ago (2013-03-07 19:54:22 UTC) #21
Elliot Glaysher
https://codereview.chromium.org/12330073/diff/26001/chrome/browser/extensions/extension_system_factory.cc File chrome/browser/extensions/extension_system_factory.cc (right): https://codereview.chromium.org/12330073/diff/26001/chrome/browser/extensions/extension_system_factory.cc#newcode90 chrome/browser/extensions/extension_system_factory.cc:90: return false; The extension system depends on a lot ...
7 years, 9 months ago (2013-03-07 20:45:48 UTC) #22
Cait (Slow)
I'm by no means a PKS expert either, but I'll weigh in: I agree with ...
7 years, 9 months ago (2013-03-07 21:00:26 UTC) #23
Andrew T Wilson (Slow)
On 2013/03/07 21:00:26, caitkp wrote: > I'm by no means a PKS expert either, but ...
7 years, 9 months ago (2013-03-07 22:35:52 UTC) #24
gab
What bothers me is that the import process probably needs more services if other import ...
7 years, 9 months ago (2013-03-07 22:49:41 UTC) #25
gab
On 2013/03/07 22:49:41, gab wrote: > What bothers me is that the import process probably ...
7 years, 9 months ago (2013-03-07 22:57:18 UTC) #26
Andrew T Wilson (Slow)
Agreed, we don't have test coverage for the rest of the import prefs, so it'd ...
7 years, 9 months ago (2013-03-07 23:20:19 UTC) #27
tapted
7 years, 9 months ago (2013-03-07 23:24:57 UTC) #28
On 2013/03/07 22:57:18, gab wrote:
> On 2013/03/07 22:49:41, gab wrote:
> > What bothers me is that the import process probably needs more services if
> other
> > import preferences are present (i.e. import_bookmarks,
> > import_bookmarks_from_file, import_history, import_home_page, and
> > import_search_engine).
> > 
> > In fact we should probably add a FirstRunBrowserTest to test the different
> > import preferences (currently the only tests are (1) default prefs and (2)
all
> > prefs == false).
> 
> Actually, tapted has a TODO to do just that I think
>
(https://code.google.com/p/chromium/codesearch#chromium/src/chrome/browser/fir...),
> would be nice to get those tests up before landing this (especially if we want
> to merge this in M26...).
> 
> Trent could you look into that please?

Yep - I'll check it out. That TODO has been an itch I've been meaning to scratch
for a while..

Powered by Google App Engine
This is Rietveld 408576698