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

Issue 7967024: Profile shouldn't own PersonalDataManager (Closed)

Created:
9 years, 3 months ago by dhollowa
Modified:
9 years, 2 months ago
CC:
chromium-reviews, ncarter (slow), idana, Raghu Simha, kkania, Paweł Hajdan Jr., Ilya Sherman, tim (not reviewing)
Visibility:
Public.

Description

Profile shouldn't own PersonalDataManager Converts PersonalDataManager over to be a ProfileKeyedService. Decouples Sync code from PersonalDataManager and moves to a notification-based update. Changes various test mocks over to the new ProfileKeyedService mechanisms. BUG=94026 TEST=PersonalDataManagerTest.*:AutofillTest.*:AutofillMetricsTests.*:AutofillDataTypeControllerTest.*: and other Sync tests. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=102598

Patch Set 1 #

Total comments: 23

Patch Set 2 : Addressing tfarina #2 and isherman #3. #

Total comments: 2

Patch Set 3 : Addressing lipalani #8 #

Total comments: 3

Patch Set 4 : Addresses isherman #11 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+390 lines, -274 lines) Patch
M chrome/browser/autofill/autofill_browsertest.cc View 2 chunks +2 lines, -1 line 0 comments Download
M chrome/browser/autofill/autofill_manager.cc View 2 chunks +3 lines, -2 lines 0 comments Download
M chrome/browser/autofill/autofill_manager_unittest.cc View 22 chunks +36 lines, -27 lines 0 comments Download
M chrome/browser/autofill/autofill_merge_unittest.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/autofill/autofill_metrics_unittest.cc View 8 chunks +26 lines, -18 lines 0 comments Download
M chrome/browser/autofill/personal_data_manager.h View 1 7 chunks +33 lines, -13 lines 0 comments Download
M chrome/browser/autofill/personal_data_manager.cc View 3 chunks +30 lines, -0 lines 0 comments Download
A chrome/browser/autofill/personal_data_manager_factory.h View 1 1 chunk +38 lines, -0 lines 0 comments Download
A chrome/browser/autofill/personal_data_manager_factory.cc View 1 1 chunk +38 lines, -0 lines 0 comments Download
M chrome/browser/autofill/personal_data_manager_unittest.cc View 1 2 3 4 chunks +5 lines, -6 lines 0 comments Download
M chrome/browser/automation/testing_automation_provider.cc View 4 chunks +6 lines, -5 lines 0 comments Download
M chrome/browser/browsing_data_remover.cc View 2 chunks +3 lines, -1 line 0 comments Download
M chrome/browser/profiles/off_the_record_profile_impl.h View 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/profiles/off_the_record_profile_impl.cc View 1 2 chunks +0 lines, -8 lines 0 comments Download
M chrome/browser/profiles/profile.h View 2 chunks +0 lines, -4 lines 0 comments Download
M chrome/browser/profiles/profile_dependency_manager.cc View 2 chunks +2 lines, -0 lines 0 comments Download
M chrome/browser/profiles/profile_impl.h View 2 chunks +0 lines, -2 lines 0 comments Download
M chrome/browser/profiles/profile_impl.cc View 1 chunk +0 lines, -8 lines 0 comments Download
M chrome/browser/sync/glue/autofill_change_processor.h View 5 chunks +4 lines, -13 lines 0 comments Download
M chrome/browser/sync/glue/autofill_change_processor.cc View 1 2 4 chunks +4 lines, -11 lines 0 comments Download
M chrome/browser/sync/glue/autofill_data_type_controller.cc View 3 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/sync/glue/autofill_data_type_controller_unittest.cc View 11 chunks +26 lines, -16 lines 0 comments Download
M chrome/browser/sync/glue/autofill_model_associator.h View 3 chunks +3 lines, -4 lines 0 comments Download
M chrome/browser/sync/glue/autofill_model_associator.cc View 1 2 4 chunks +6 lines, -6 lines 0 comments Download
M chrome/browser/sync/glue/autofill_profile_data_type_controller.cc View 2 chunks +0 lines, -2 lines 0 comments Download
M chrome/browser/sync/glue/autofill_profile_syncable_service.h View 4 chunks +3 lines, -8 lines 0 comments Download
M chrome/browser/sync/glue/autofill_profile_syncable_service.cc View 1 2 5 chunks +10 lines, -10 lines 0 comments Download
M chrome/browser/sync/glue/autofill_profile_syncable_service_unittest.cc View 1 chunk +2 lines, -0 lines 0 comments Download
D chrome/browser/sync/glue/do_optimistic_refresh_task.h View 1 chunk +0 lines, -26 lines 0 comments Download
D chrome/browser/sync/glue/do_optimistic_refresh_task.cc View 1 chunk +0 lines, -23 lines 0 comments Download
M chrome/browser/sync/profile_sync_factory.h View 3 chunks +0 lines, -3 lines 0 comments Download
M chrome/browser/sync/profile_sync_factory_impl.h View 1 chunk +0 lines, -2 lines 0 comments Download
M chrome/browser/sync/profile_sync_factory_impl.cc View 2 chunks +3 lines, -5 lines 0 comments Download
M chrome/browser/sync/profile_sync_factory_mock.h View 1 chunk +2 lines, -4 lines 0 comments Download
M chrome/browser/sync/profile_sync_service_autofill_unittest.cc View 8 chunks +27 lines, -25 lines 0 comments Download
M chrome/browser/sync/test/integration/autofill_helper.cc View 3 chunks +5 lines, -4 lines 0 comments Download
M chrome/browser/ui/browser.cc View 2 chunks +2 lines, -1 line 0 comments Download
M chrome/browser/ui/webui/bidi_checker_web_ui_test.cc View 3 chunks +3 lines, -2 lines 0 comments Download
M chrome/browser/ui/webui/options/autofill_options_handler.cc View 2 chunks +3 lines, -1 line 0 comments Download
M chrome/browser/webdata/web_data_service.h View 1 2 2 chunks +8 lines, -0 lines 0 comments Download
M chrome/browser/webdata/web_data_service.cc View 1 2 3 chunks +47 lines, -0 lines 0 comments Download
M chrome/chrome_browser.gypi View 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/common/chrome_notification_types.h View 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/test/base/profile_mock.h View 1 chunk +0 lines, -1 line 0 comments Download
M chrome/test/base/testing_profile.h View 1 chunk +0 lines, -1 line 0 comments Download
M chrome/test/base/testing_profile.cc View 1 chunk +0 lines, -4 lines 0 comments Download

Messages

Total messages: 21 (0 generated)
dhollowa
Sorry for the size of this one! It was all pretty interwoven, no obvious way ...
9 years, 3 months ago (2011-09-23 02:20:38 UTC) #1
tfarina
http://codereview.chromium.org/7967024/diff/1/chrome/browser/autofill/personal_data_manager_factory.h File chrome/browser/autofill/personal_data_manager_factory.h (right): http://codereview.chromium.org/7967024/diff/1/chrome/browser/autofill/personal_data_manager_factory.h#newcode9 chrome/browser/autofill/personal_data_manager_factory.h:9: #include "base/memory/singleton.h" You can forward declare this instead. template ...
9 years, 3 months ago (2011-09-23 02:30:44 UTC) #2
Ilya Sherman
http://codereview.chromium.org/7967024/diff/1/chrome/browser/autofill/autofill_manager_unittest.cc File chrome/browser/autofill/autofill_manager_unittest.cc (right): http://codereview.chromium.org/7967024/diff/1/chrome/browser/autofill/autofill_manager_unittest.cc#newcode65 chrome/browser/autofill/autofill_manager_unittest.cc:65: return NULL; I don't really understand this pattern... Why ...
9 years, 3 months ago (2011-09-23 03:56:34 UTC) #3
dhollowa
http://codereview.chromium.org/7967024/diff/1/chrome/browser/autofill/autofill_manager_unittest.cc File chrome/browser/autofill/autofill_manager_unittest.cc (right): http://codereview.chromium.org/7967024/diff/1/chrome/browser/autofill/autofill_manager_unittest.cc#newcode65 chrome/browser/autofill/autofill_manager_unittest.cc:65: return NULL; This is how the original code worked, ...
9 years, 3 months ago (2011-09-23 16:30:03 UTC) #4
lipalani1
The changes look good from sync side. But before we L G T M it ...
9 years, 3 months ago (2011-09-23 17:59:23 UTC) #5
Elliot Glaysher
On Fri, Sep 23, 2011 at 10:59 AM, <lipalani@chromium.org> wrote: > The changes look good ...
9 years, 3 months ago (2011-09-23 18:01:44 UTC) #6
Elliot Glaysher
Also, the profile integration parts lgtm. On 2011/09/23 18:01:44, Elliot Glaysher wrote: > On Fri, ...
9 years, 3 months ago (2011-09-23 18:03:36 UTC) #7
lipalani1
LGTM http://codereview.chromium.org/7967024/diff/8001/chrome/browser/sync/glue/autofill_model_associator.cc File chrome/browser/sync/glue/autofill_model_associator.cc (right): http://codereview.chromium.org/7967024/diff/8001/chrome/browser/sync/glue/autofill_model_associator.cc#newcode200 chrome/browser/sync/glue/autofill_model_associator.cc:200: Can you make this a function, just like ...
9 years, 3 months ago (2011-09-23 18:08:30 UTC) #8
lipalani1
LGTM from sync side with one comment.
9 years, 3 months ago (2011-09-23 18:08:42 UTC) #9
Peter Kasting
browser.cc LGTM
9 years, 3 months ago (2011-09-23 19:02:21 UTC) #10
dhollowa
On 2011/09/23 18:01:44, Elliot Glaysher wrote: > On Fri, Sep 23, 2011 at 10:59 AM, ...
9 years, 3 months ago (2011-09-23 19:11:06 UTC) #11
dhollowa
http://codereview.chromium.org/7967024/diff/8001/chrome/browser/sync/glue/autofill_model_associator.cc File chrome/browser/sync/glue/autofill_model_associator.cc (right): http://codereview.chromium.org/7967024/diff/8001/chrome/browser/sync/glue/autofill_model_associator.cc#newcode200 chrome/browser/sync/glue/autofill_model_associator.cc:200: On 2011/09/23 18:08:30, lipalani1 wrote: > Can you make ...
9 years, 3 months ago (2011-09-23 20:09:01 UTC) #12
Evan Stade
ui/webui lgtm
9 years, 3 months ago (2011-09-23 20:22:05 UTC) #13
Paweł Hajdan Jr.
chrome/test LGTM
9 years, 3 months ago (2011-09-23 20:24:08 UTC) #14
Ilya Sherman
http://codereview.chromium.org/7967024/diff/1/chrome/browser/autofill/personal_data_manager_unittest.cc File chrome/browser/autofill/personal_data_manager_unittest.cc (right): http://codereview.chromium.org/7967024/diff/1/chrome/browser/autofill/personal_data_manager_unittest.cc#newcode64 chrome/browser/autofill/personal_data_manager_unittest.cc:64: profile_.reset(NULL); On 2011/09/23 16:30:03, dhollowa wrote: > On 2011/09/23 ...
9 years, 3 months ago (2011-09-23 21:41:38 UTC) #15
dhollowa
http://codereview.chromium.org/7967024/diff/1/chrome/browser/autofill/personal_data_manager_unittest.cc File chrome/browser/autofill/personal_data_manager_unittest.cc (right): http://codereview.chromium.org/7967024/diff/1/chrome/browser/autofill/personal_data_manager_unittest.cc#newcode64 chrome/browser/autofill/personal_data_manager_unittest.cc:64: profile_.reset(NULL); On 2011/09/23 21:41:38, Ilya Sherman wrote: > On ...
9 years, 3 months ago (2011-09-23 22:00:57 UTC) #16
Ilya Sherman
LGTM
9 years, 3 months ago (2011-09-23 22:01:31 UTC) #17
Ilya Sherman
http://codereview.chromium.org/7967024/diff/14001/chrome/browser/autofill/autofill_merge_unittest.cc File chrome/browser/autofill/autofill_merge_unittest.cc (right): http://codereview.chromium.org/7967024/diff/14001/chrome/browser/autofill/autofill_merge_unittest.cc#newcode131 chrome/browser/autofill/autofill_merge_unittest.cc:131: scoped_ptr<PersonalDataManagerMock> personal_data_; On 2011/09/23 22:00:58, dhollowa wrote: > On ...
9 years, 3 months ago (2011-09-23 22:17:43 UTC) #18
GeorgeY
LGTM http://codereview.chromium.org/7967024/diff/1/chrome/browser/autofill/personal_data_manager_unittest.cc File chrome/browser/autofill/personal_data_manager_unittest.cc (right): http://codereview.chromium.org/7967024/diff/1/chrome/browser/autofill/personal_data_manager_unittest.cc#newcode64 chrome/browser/autofill/personal_data_manager_unittest.cc:64: profile_.reset(NULL); FYI, the order of the destruction is ...
9 years, 3 months ago (2011-09-23 22:53:26 UTC) #19
dhollowa
On 2011/09/23 22:17:43, Ilya Sherman wrote: > http://codereview.chromium.org/7967024/diff/14001/chrome/browser/autofill/autofill_merge_unittest.cc > File chrome/browser/autofill/autofill_merge_unittest.cc (right): > > http://codereview.chromium.org/7967024/diff/14001/chrome/browser/autofill/autofill_merge_unittest.cc#newcode131 ...
9 years, 2 months ago (2011-09-26 14:59:10 UTC) #20
dhollowa
9 years, 2 months ago (2011-09-26 16:50:16 UTC) #21
On 2011/09/26 14:59:10, dhollowa wrote:
> On 2011/09/23 22:17:43, Ilya Sherman wrote:
> >
>
http://codereview.chromium.org/7967024/diff/14001/chrome/browser/autofill/aut...
> > File chrome/browser/autofill/autofill_merge_unittest.cc (right):
> > 
> >
>
http://codereview.chromium.org/7967024/diff/14001/chrome/browser/autofill/aut...
> > chrome/browser/autofill/autofill_merge_unittest.cc:131:
> > scoped_ptr<PersonalDataManagerMock> personal_data_;
> > On 2011/09/23 22:00:58, dhollowa wrote:
> > > On 2011/09/23 21:41:38, Ilya Sherman wrote:
> > > > nit: Can this just be |PersonalDataManagerMock personal_data_|?
> > > 
> > > No.  The tests below reset the data with each pass of the data driven
test.
> > 
> > Wait, where does this happen?  If you mean the SetUp() method, I believe
that
> is
> > exactly equivalent to directly having a PersonalDataManagerMock instance
> > variable (without the scoped_ptr).
> 
> AutofillMergeTest::MergeProfiles calls personal_data_->Reset().  But upon
closer
> inspection... this is |Reset()| and not |reset()|.  So you are correct, we
could
> eliminate the scoped_ptr.

Follow-up in http://codereview.chromium.org/8043027

Powered by Google App Engine
This is Rietveld 408576698