diff options
author | rlarocque@chromium.org <rlarocque@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-12 01:46:05 +0000 |
---|---|---|
committer | rlarocque@chromium.org <rlarocque@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-12 01:46:05 +0000 |
commit | 9508f239f64b85fa913df6f7518c231b6bf7e78c (patch) | |
tree | efcce01fd3f4db7d015cd126fbe8e98dd68a6e36 /net/dns/host_resolver.h | |
parent | d9615f5d7d3bb74864ff8d7750221fdbb1ee48b2 (diff) | |
download | chromium_src-9508f239f64b85fa913df6f7518c231b6bf7e78c.zip chromium_src-9508f239f64b85fa913df6f7518c231b6bf7e78c.tar.gz chromium_src-9508f239f64b85fa913df6f7518c231b6bf7e78c.tar.bz2 |
sync: Add interface for SyncCoreProxy
Defines an interface for SyncCoreProxy. This will be used for testing.
The SyncCoreProxy is a natural boundary for tests. To its clients, it
represents the sync thread and all of its functionality. By allowing it
to be overloaded in tests, we can stub out all of the sync thread
functionality so we can better test the parts that communicate with it.
This required some fairly large changes. In order to allow it to be
used as an interface, the SyncCoreProxy could no longer be stored on the
stack and copied around everywhere. The objects that call its virtual
functions must manage it as a pointer or reference, rather than
a concrete object.
For now, ownership is settled by having one or two elements on each
thread hold a scoped_ptr to their own copy of it. The SyncCoreProxy is
passed around as a pointer, and ownership is not transferred in these
calls. Objects that want to keep their own private copy can make use of
the Clone() method and store the resulting copy in a scoped_ptr.
BUG=351005
Review URL: https://codereview.chromium.org/225863006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@263448 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/dns/host_resolver.h')
0 files changed, 0 insertions, 0 deletions