Remove weak_ptr from CopresenceManager.
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}
Showing
Please register or sign in to comment