• Robbie McElrath's avatar
    Reland "Migrate PrivetTrafficDetector to use NetworkConnectionTracker." · 77922074
    Robbie McElrath authored
    This is a reland of 9b785217 with test
    fixes. The failing unit tests weren't being run when I first landed
    this, but were enabled afterwards and started breaking, so I rolled
    back.
    
    Specifically, I PostTask'd (un)registering with the
    NetworkConnectionTracker to the right threads, and added a
    PrivetTrafficDetector::Stop method to clean up the registration and
    call it from PrivetNotificationService.
    
    Original change's description:
    > Migrate PrivetTrafficDetector to use NetworkConnectionTracker.
    >
    > This migrates PrivetTrafficDetector from using
    > net::NetworkChangeNotifier to content::NetworkConnectionTracker, which
    > works with the network service enabled.
    >
    > Bug: 859134
    > Change-Id: I06f2ecbe142bbed9a8772f69ab109b0c0dc32581
    > Reviewed-on: https://chromium-review.googlesource.com/1123681
    > Reviewed-by: Julian Pastarmov <pastarmovj@chromium.org>
    > Reviewed-by: Lei Zhang <thestig@chromium.org>
    > Commit-Queue: Robbie McElrath <rmcelrath@chromium.org>
    > Cr-Commit-Position: refs/heads/master@{#574700}
    
    Bug: 859134
    Change-Id: I19bc5bf0abdbd41cfbd3da1c0881f122adca6c2b
    Reviewed-on: https://chromium-review.googlesource.com/1137411Reviewed-by: default avatarLei Zhang <thestig@chromium.org>
    Reviewed-by: default avatarHelen Li <xunjieli@chromium.org>
    Commit-Queue: Robbie McElrath <rmcelrath@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#576278}
    77922074
privet_notifications.cc 14.3 KB