Commit c3189977 authored by Lei Zhang's avatar Lei Zhang Committed by Commit Bot

Fix some comments in content::NetworkConnectionTracker.

Fix some nits as well.

Change-Id: I8340ee189d751643a74841ef826fd2df2b8884b5
Reviewed-on: https://chromium-review.googlesource.com/1141107Reviewed-by: default avatarHelen Li <xunjieli@chromium.org>
Reviewed-by: default avatarAvi Drissman <avi@chromium.org>
Commit-Queue: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#576130}
parent bc0f85d1
......@@ -26,12 +26,12 @@ namespace content {
// This class subscribes to network change events from
// network::mojom::NetworkChangeManager and propogates these notifications to
// its NetworkConnectionObservers registered through
// AddObserver()/RemoveObserver().
// AddNetworkConnectionObserver()/RemoveNetworkConnectionObserver().
class CONTENT_EXPORT NetworkConnectionTracker
: public network::mojom::NetworkChangeManagerClient {
public:
typedef base::OnceCallback<void(network::mojom::ConnectionType)>
ConnectionTypeCallback;
using ConnectionTypeCallback =
base::OnceCallback<void(network::mojom::ConnectionType)>;
class CONTENT_EXPORT NetworkConnectionObserver {
public:
......@@ -40,11 +40,7 @@ class CONTENT_EXPORT NetworkConnectionTracker
virtual void OnConnectionChanged(network::mojom::ConnectionType type) = 0;
protected:
NetworkConnectionObserver() {}
virtual ~NetworkConnectionObserver() {}
private:
DISALLOW_COPY_AND_ASSIGN(NetworkConnectionObserver);
};
// Constructs a NetworkConnectionTracker. |callback| should return the network
......@@ -77,8 +73,8 @@ class CONTENT_EXPORT NetworkConnectionTracker
void AddNetworkConnectionObserver(NetworkConnectionObserver* observer);
// Unregisters |observer| from receiving notifications. This must be called
// on the same thread on which AddObserver() was called.
// All observers must be unregistred before |this| is destroyed.
// on the same thread on which AddNetworkConnectionObserver() was called.
// All observers must be unregistered before |this| is destroyed.
void RemoveNetworkConnectionObserver(NetworkConnectionObserver* observer);
protected:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment