• rkc's avatar
    Remove weak_ptr from CopresenceManager. · 0e07df1b
    rkc authored
    The WhispernetClient object provided by the CopresenceDelegate passed to the
    CopresenceManager has a lifetime exceeding that of the CopresenceManager. We
    explicitly want to decouple their lifetimes since we may have lifetime
    restrictions imposed on WhispernetClient which may require it to outlive the
    CopresenceManager. For this reason, when passing a callback to the
    WhispernetClient from CopresenceManager, we were using a WeakPtr. This is
    unnecessary since the same can be accomplished by passing a CancelableCallback
    to the WhispernetClient and Canceling the callback in the CopresenceManager
    destructor.
    
    R=derat@chromium.org, willchan@chromium.org
    BUG=None.
    
    Review URL: https://codereview.chromium.org/517753002
    
    Cr-Commit-Position: refs/heads/master@{#292772}
    0e07df1b
copresence_manager.cc 1.45 KB