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

Issue 9703038: Profiles: Really fix refcounted services. (Closed)

Created:
8 years, 9 months ago by Elliot Glaysher
Modified:
8 years, 9 months ago
CC:
chromium-reviews, GeorgeY, ncarter (slow), jam, akalin, dhollowa+watch_chromium.org, achuith+watch_chromium.org, mihaip+watch_chromium.org, timurrrr+watch_chromium.org, Aaron Boodman, glider+watch_chromium.org, darin-cc_chromium.org, pam+watch_chromium.org, dyu1, Raghu Simha, stuartmorgan+watch_chromium.org, Ilya Sherman, tim (not reviewing), bruening+watch_chromium.org
Visibility:
Public.

Description

Profiles: Really fix refcounted services. Previous attempts to share code between ProfileKeyedServiceFactory and RefcountedProfileKeyedServiceFactory were ill advised. The core logic code must maintain refcounted data in a scoped_refptr<> for the entire lifecycle, across interface and implementation, preventing any real abstraction here. This removes the common ProfileKeyedBase and splits the two worlds entirely in two. This has quite a bit of exact code with different types now. Fallout from this is far reaching: - Since there isn't one common heiarchy, now the testing methods either return ProfileKeyedServices or scoped_refptr<RefcountedProfileKeyedService>s. This is a lot of change. - Many consumers handled the refcounted ptrs as raw pointers, which probably isn't a good idea. - There is now a bunch of code duplication. BUG=118196, 77155 R=mirandac,tim TBR=jhawkins,sky,scottbyer

Patch Set 1 #

Patch Set 2 : Missed this one #

Patch Set 3 : (Same code, different set of trybots) #

Patch Set 4 : Fix chromeos compile #

Patch Set 5 : Upload again to try against specific revision. #

Patch Set 6 : Fix compile #

Total comments: 34

Patch Set 7 : mirandac comments #

Patch Set 8 : Forgot to save a file. >_< #

Unified diffs Side-by-side diffs Delta from patch set Stats (+384 lines, -298 lines) Patch
M chrome/browser/autofill/autofill_manager_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/content_settings/cookie_settings.h View 3 chunks +4 lines, -3 lines 0 comments Download
M chrome/browser/content_settings/cookie_settings.cc View 2 chunks +4 lines, -3 lines 0 comments Download
M chrome/browser/extensions/api/browsingdata/browsing_data_api.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/extensions/app_notify_channel_setup_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/intents/register_intent_handler_infobar_delegate_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/password_manager/mock_password_store.h View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/password_manager/mock_password_store.cc View 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/password_manager/password_manager_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/password_manager/password_store_factory.h View 2 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/password_manager/password_store_factory.cc View 5 chunks +7 lines, -6 lines 0 comments Download
M chrome/browser/password_manager/password_store_x.cc View 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/plugin_data_remover_helper.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/plugin_prefs.h View 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/plugin_prefs.cc View 1 chunk +6 lines, -6 lines 0 comments Download
M chrome/browser/plugin_prefs_factory.h View 1 2 3 4 5 1 chunk +8 lines, -5 lines 0 comments Download
M chrome/browser/plugin_prefs_factory.cc View 2 chunks +11 lines, -7 lines 0 comments Download
M chrome/browser/printing/cloud_print/cloud_print_proxy_service_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/printing/cloud_print/test/cloud_print_proxy_process_browsertest.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/profiles/profile_dependency_manager.cc View 1 chunk +2 lines, -2 lines 0 comments Download
D chrome/browser/profiles/profile_keyed_base.h View 1 chunk +0 lines, -18 lines 0 comments Download
M chrome/browser/profiles/profile_keyed_base_factory.h View 1 2 3 4 5 6 6 chunks +24 lines, -48 lines 0 comments Download
M chrome/browser/profiles/profile_keyed_base_factory.cc View 1 2 3 4 5 6 3 chunks +35 lines, -86 lines 0 comments Download
M chrome/browser/profiles/profile_keyed_service.h View 2 chunks +5 lines, -2 lines 0 comments Download
M chrome/browser/profiles/profile_keyed_service_factory.h View 1 2 3 4 5 6 4 chunks +34 lines, -10 lines 0 comments Download
M chrome/browser/profiles/profile_keyed_service_factory.cc View 1 2 3 4 5 6 3 chunks +79 lines, -17 lines 0 comments Download
M chrome/browser/profiles/refcounted_profile_keyed_service.h View 2 chunks +1 line, -3 lines 0 comments Download
M chrome/browser/profiles/refcounted_profile_keyed_service_factory.h View 1 2 3 4 5 6 7 2 chunks +34 lines, -5 lines 0 comments Download
M chrome/browser/profiles/refcounted_profile_keyed_service_factory.cc View 1 2 3 4 5 6 3 chunks +87 lines, -16 lines 0 comments Download
M chrome/browser/protector/mock_protector_service.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/search_engines/template_url_service_test_util.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/signin/signin_manager_fake.h View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/signin/signin_manager_fake.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/signin/signin_tracker_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/spellchecker/spellcheck_profile_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/sync/abstract_profile_sync_service_test.h View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/sync/abstract_profile_sync_service_test.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/sync/glue/password_model_worker.h View 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/sync/glue/password_model_worker.cc View 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/sync/glue/sync_backend_registrar.cc View 2 chunks +3 lines, -2 lines 0 comments Download
M chrome/browser/sync/glue/theme_util_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/sync/profile_sync_service_autofill_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/sync/profile_sync_service_mock.h View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/sync/profile_sync_service_mock.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/sync/profile_sync_service_password_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/sync/sync_setup_wizard_unittest.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/tabs/pinned_tab_service_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/webui/sync_setup_handler_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/chrome_browser.gypi View 1 chunk +0 lines, -1 line 0 comments Download
M chrome/test/base/testing_profile.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M tools/valgrind/memcheck/suppressions.txt View 1 chunk +0 lines, -20 lines 0 comments Download

Messages

Total messages: 12 (0 generated)
Elliot Glaysher
mirandac: profiles, full review tim: real review on the sync/ directory Do not despair at ...
8 years, 9 months ago (2012-03-14 22:01:40 UTC) #1
tim (not reviewing)
sync/ LGTM
8 years, 9 months ago (2012-03-15 07:35:42 UTC) #2
Miranda Callahan
First set of comments; second set coming this afternoon. (Also, you should probably edit the ...
8 years, 9 months ago (2012-03-15 15:31:07 UTC) #3
Miranda Callahan
Second set of comments. A bunch are repeating things in refcounted PKSF that I said ...
8 years, 9 months ago (2012-03-15 16:55:35 UTC) #4
Elliot Glaysher
I believe I've gotten everything. https://chromiumcodereview.appspot.com/9703038/diff/4008/chrome/browser/profiles/profile_keyed_base_factory.cc File chrome/browser/profiles/profile_keyed_base_factory.cc (right): https://chromiumcodereview.appspot.com/9703038/diff/4008/chrome/browser/profiles/profile_keyed_base_factory.cc#newcode41 chrome/browser/profiles/profile_keyed_base_factory.cc:41: dependency_manager_->AssertProfileWasntDestroyed(profile); On 2012/03/15 15:31:07, ...
8 years, 9 months ago (2012-03-15 18:02:40 UTC) #5
Miranda Callahan
LGTM! https://chromiumcodereview.appspot.com/9703038/diff/4008/chrome/browser/profiles/profile_keyed_base_factory.cc File chrome/browser/profiles/profile_keyed_base_factory.cc (right): https://chromiumcodereview.appspot.com/9703038/diff/4008/chrome/browser/profiles/profile_keyed_base_factory.cc#newcode41 chrome/browser/profiles/profile_keyed_base_factory.cc:41: dependency_manager_->AssertProfileWasntDestroyed(profile); On 2012/03/15 18:02:41, Elliot Glaysher wrote: > ...
8 years, 9 months ago (2012-03-15 18:11:21 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/erg@chromium.org/9703038/7008
8 years, 9 months ago (2012-03-15 23:59:57 UTC) #7
commit-bot: I haz the power
Presubmit check for 9703038-7008 failed and returned exit status 1. Running presubmit commit checks ...
8 years, 9 months ago (2012-03-16 00:00:26 UTC) #8
Elliot Glaysher
TBRing OWNERs. These are just a class rename.
8 years, 9 months ago (2012-03-16 00:03:20 UTC) #9
James Hawkins
lgtm
8 years, 9 months ago (2012-03-16 00:05:49 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/erg@chromium.org/9703038/7008
8 years, 9 months ago (2012-03-16 00:34:36 UTC) #11
commit-bot: I haz the power
8 years, 9 months ago (2012-03-16 04:32:45 UTC) #12
Commit queue had an internal error.
Something went really wrong, probably a crash, a hickup or
simply the monkeys went out for diner.
The relevant dude was pinged already.

Powered by Google App Engine
This is Rietveld 408576698