diff options
author | rlarocque@chromium.org <rlarocque@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-02-15 17:59:48 +0000 |
---|---|---|
committer | rlarocque@chromium.org <rlarocque@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-02-15 17:59:48 +0000 |
commit | 79dc04cce3973949e5ad5effa8b634aaf5e25c2b (patch) | |
tree | 518abd7ca489e06c759048dcc80388d94e502fc0 /crypto/nss_util_unittest.cc | |
parent | 80771de8ce0c3f13c041cb03853174b95461a151 (diff) | |
download | chromium_src-79dc04cce3973949e5ad5effa8b634aaf5e25c2b.zip chromium_src-79dc04cce3973949e5ad5effa8b634aaf5e25c2b.tar.gz chromium_src-79dc04cce3973949e5ad5effa8b634aaf5e25c2b.tar.bz2 |
Remove routing_info and workers from SyncSession
For all outward appearances, the SyncSession's workers and routing info
will always precisely mirror those found in the SyncSessionContext. It
is equivalent, and much simpler, to grab the latest routing info from
the context wherever it's needed.
Any SyncSession that makes it to a sync cycle will either have been
initialized with the SyncSessionContext's routing info and workers, or
Coalesced (set union) and Rebased (set intersection) with the
SyncSessionContext's routing info and workers to the point where it's
effectively equivalent to copying the context's data. Much of the logic
to implement this book-keeping has been simplified in this patch.
Configure mode is an important exception. While configuring, we would
attempt to keep all currently enabled types enabled in the
SyncSessionContext, while passing a restricted amount of routing info
the the SyncSession. It turns out that it's not necessary to allow the
SyncSessionContext and SyncSession routing info diverge in this case;
it's OK to set the context's routing info to the restricted routes.
In addition to trimming the session's routing info and workers list,
RebaseRoutingInfoWithLatest was also responsible for trimming the list
of notification hints to match the set of currently enabled types. This
is redundant because the code in DownloadUpdatesCommand performs the
same filtering using the same routing info. RebaseRoutingInfoWithLatest
had no remaining useful features, so it was removed entirely.
The Coalesce function still exists in a reduced form to handle merge
sources between sessions. Its name and signature have been changed to
reflect its new responsibilities.
Without its own copy of the workers and routing info, the
SyncSessionContext can no longer easily calculate the set of enabled
groups. Fortunately, that information is only accessed by a single test
case. The relevant code was moved into this test case.
BUG=175024
Review URL: https://chromiumcodereview.appspot.com/12225091
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@182756 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'crypto/nss_util_unittest.cc')
0 files changed, 0 insertions, 0 deletions