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

Issue 3825005: Fix syncing of sessions. Numerous changes have been made. Currently, the mode... (Closed)

Created:
10 years, 2 months ago by Nicolas Zea
Modified:
9 years, 7 months ago
CC:
chromium-reviews, ncarter (slow), idana, Raghu Simha, ben+cc_chromium.org, Paweł Hajdan Jr., James Hawkins, dhollowa
Visibility:
Public.

Description

Fix syncing of sessions. Numerous changes have been made. Currently, the model associator does not have a local model to associate with, but instead contains a buffer of protobuf specifics for foreign sessions which gets completely overwritten everytime an update occurs. This buffer is then used to create a vector of foreign sessions for each foreign session handler. As a result, The model associator is slightly different from other datatypes. The creation of a persistent unique machine tag needs to be resolved still. Something understandable by the user would be good (home, work, etc.), but for now we use the directory kernel's cache_guid. Unfortunately, this gets reset each time sync is enabled/disabled, resulting in stale client session info that remains visible. BUG=30519 TEST=unit_test Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=63266

Patch Set 1 #

Patch Set 2 : Rebase #

Patch Set 3 : Missing grd file from changelog #

Total comments: 12

Patch Set 4 : Reviewer comments. Also noticed issue with machine tag getting reset. #

Patch Set 5 : Rebased, added reference to machine name bug #

Patch Set 6 : Rebased, svn:eol-style set based on gcl presubmit checks #

Patch Set 7 : Rebased again #

Unified diffs Side-by-side diffs Delta from patch set Stats (+209 lines, -169 lines) Patch
M chrome/app/generated_resources.grd View 3 4 5 6 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/dom_ui/foreign_session_handler.h View 1 2 3 4 5 6 2 chunks +2 lines, -1 line 0 comments Download
M chrome/browser/dom_ui/foreign_session_handler.cc View 1 2 3 4 5 6 2 chunks +41 lines, -22 lines 0 comments Download
M chrome/browser/dom_ui/ntp_resource_cache.cc View 1 2 3 4 5 6 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/dom_ui/options/sync_options_handler.cc View 1 2 3 4 5 6 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/sessions/session_restore.cc View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/sessions/session_service.cc View 1 2 3 4 5 6 2 chunks +1 line, -2 lines 0 comments Download
M chrome/browser/sync/glue/autofill_change_processor.cc View 1 2 3 4 5 6 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/sync/glue/session_change_processor.h View 1 2 3 4 5 6 2 chunks +0 lines, -3 lines 0 comments Download
M chrome/browser/sync/glue/session_change_processor.cc View 1 2 3 4 5 6 5 chunks +15 lines, -37 lines 0 comments Download
M chrome/browser/sync/glue/session_model_associator.h View 1 2 3 4 5 6 9 chunks +36 lines, -21 lines 0 comments Download
M chrome/browser/sync/glue/session_model_associator.cc View 1 2 3 4 5 6 7 chunks +91 lines, -55 lines 0 comments Download
M chrome/browser/sync/profile_sync_service_session_unittest.cc View 1 2 3 4 5 6 9 chunks +6 lines, -22 lines 0 comments Download
M chrome/browser/sync/sync_setup_flow.cc View 1 2 3 4 5 6 1 chunk +6 lines, -0 lines 0 comments Download
M chrome/browser/sync/sync_setup_wizard.cc View 1 2 3 4 5 6 2 chunks +1 line, -1 line 0 comments Download
M chrome/common/notification_type.h View 1 2 3 4 5 6 1 chunk +2 lines, -3 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
Nicolas Zea
UI changes can be found here: http://codereview.chromium.org/3767009/show
10 years, 2 months ago (2010-10-14 23:24:14 UTC) #1
tim (not reviewing)
This looks like a nice improvement. Good call on using NotificationService! http://codereview.chromium.org/3825005/diff/28002/29002 File chrome/browser/dom_ui/foreign_session_handler.cc (right): ...
10 years, 2 months ago (2010-10-15 05:47:41 UTC) #2
Nicolas Zea
I've left the current machine tag solution alone for now, and simply described the problem ...
10 years, 2 months ago (2010-10-15 19:13:09 UTC) #3
tim (not reviewing)
10 years, 2 months ago (2010-10-19 18:38:12 UTC) #4
On 2010/10/15 19:13:09, nzea wrote:
> I've left the current machine tag solution alone for now, and simply described
> the problem in the comments.
> 
> http://codereview.chromium.org/3825005/diff/28002/29002
> File chrome/browser/dom_ui/foreign_session_handler.cc (right):
> 
> http://codereview.chromium.org/3825005/diff/28002/29002#newcode62
> chrome/browser/dom_ui/foreign_session_handler.cc:62: return;
> On 2010/10/15 05:47:41, timsteele wrote:
> > This isn't really necessary.
> 
> Done.
> 
> http://codereview.chromium.org/3825005/diff/28002/29009
> File chrome/browser/sync/glue/session_change_processor.cc (right):
> 
> http://codereview.chromium.org/3825005/diff/28002/29009#newcode68
> chrome/browser/sync/glue/session_change_processor.cc:68: // Replaces old
> UpdateModel with an all-at-once functionality that ignores
> On 2010/10/15 05:47:41, timsteele wrote:
> > i wouldn't reference UpdateModel here if it doesn't exist anymore.
> 
> Done.
> 
> http://codereview.chromium.org/3825005/diff/28002/29009#newcode75
> chrome/browser/sync/glue/session_change_processor.cc:75: // (what has changed,
> how many sessions, etc. Not useful for now.)
> On 2010/10/15 05:47:41, timsteele wrote:
> > I get what you're saying... but I think we can skip the "todo: use details
if
> we
> > need it" todo :)
> > 
> > I would, however, add a source parameter (perhaps just this change
processor).
> 
> > WIthout it, it likely breaks the multi profile scenario, which would break
the
> > integration tests (if we had some running with this code :) )
> 
> Done.
> 
> http://codereview.chromium.org/3825005/diff/28002/29009#newcode112
> chrome/browser/sync/glue/session_change_processor.cc:112:
> NotificationType::FOREIGN_SESSION_DISABLED,
> On 2010/10/15 05:47:41, timsteele wrote:
> > I don't think I understand this notification, we call StopObserving in
> > ApplyModelChanges, for example...
> 
> Done.
> 
> I think this is more appropriate is |DisassociateModels|
> 
> http://codereview.chromium.org/3825005/diff/28002/29012
> File chrome/browser/sync/glue/session_model_associator.h (right):
> 
> http://codereview.chromium.org/3825005/diff/28002/29012#newcode129
> chrome/browser/sync/glue/session_model_associator.h:129: std::vector<const
> sync_pb::SessionSpecifics*>& specifics);
> On 2010/10/15 05:47:41, timsteele wrote:
> > nit - indent
> 
> Done.
> 
> http://codereview.chromium.org/3825005/diff/28002/29013
> File chrome/browser/sync/profile_sync_service_session_unittest.cc (right):
> 
> http://codereview.chromium.org/3825005/diff/28002/29013#newcode140
> chrome/browser/sync/profile_sync_service_session_unittest.cc:140: int
> notification_type_;
> On 2010/10/15 05:47:41, timsteele wrote:
> > what's this used for?
> 
> Done.

LGTM!

Powered by Google App Engine
This is Rietveld 408576698