• yzshen@chromium.org's avatar
    InterfacePtr: not setup proxy until actual read/write is needed. · 93b1f7dc
    yzshen@chromium.org authored
    A common usage of InterfacePtr is:
    (1) Create a new InterfacePtr instance.
    (2) BindToProxy() is called to bind the interface pointer to an implementation.
    (3) Immediately, the message pipe handle underneath the interface pointer is detached and sent over another message pipe.
    
    In step (2), currently we do all the setup work for the interface pointer: construct Router and Connector instance, post task to start watching the message pipe handle, etc. All the work is thrown away at step (3).
    
    With this CL, the proxy setup work won't be done until actual read/write is needed.
    
    BUG=394883
    TEST=None
    
    Review URL: https://codereview.chromium.org/400043004
    
    git-svn-id: svn://svn.chromium.org/chrome/trunk/src@284034 0039d316-1c4b-4281-b951-d872f2087c98
    93b1f7dc
interface_ptr.h 4.35 KB