summaryrefslogtreecommitdiffstats
path: root/net/base/network_change_notifier_mac.cc
diff options
context:
space:
mode:
authorwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-21 22:40:35 +0000
committerwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-21 22:40:35 +0000
commit740e6bdb0b63c45e1e44d73f473f330b69853c1c (patch)
tree83e2ef11c38fe80cf3666de06cfc6f2a8b9181ef /net/base/network_change_notifier_mac.cc
parent3d8d1c9f38d1f4f26a56ad03d3fa920791bc50ea (diff)
downloadchromium_src-740e6bdb0b63c45e1e44d73f473f330b69853c1c.zip
chromium_src-740e6bdb0b63c45e1e44d73f473f330b69853c1c.tar.gz
chromium_src-740e6bdb0b63c45e1e44d73f473f330b69853c1c.tar.bz2
Pass in NetLog to NetworkChangeNotifier.
BUG=46822 Review URL: http://codereview.chromium.org/2857009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50402 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base/network_change_notifier_mac.cc')
-rw-r--r--net/base/network_change_notifier_mac.cc10
1 files changed, 8 insertions, 2 deletions
diff --git a/net/base/network_change_notifier_mac.cc b/net/base/network_change_notifier_mac.cc
index ba38907..40c0808 100644
--- a/net/base/network_change_notifier_mac.cc
+++ b/net/base/network_change_notifier_mac.cc
@@ -31,6 +31,7 @@
#include "base/message_loop.h"
#include "base/scoped_cftyperef.h"
#include "base/thread.h"
+#include "net/base/net_log.h"
namespace net {
@@ -218,9 +219,10 @@ void NetworkChangeNotifierThread::Init() {
} // namespace
-NetworkChangeNotifierMac::NetworkChangeNotifierMac()
+NetworkChangeNotifierMac::NetworkChangeNotifierMac(NetLog* net_log)
: notifier_thread_(NULL),
- method_factory_(this) {
+ method_factory_(this),
+ net_log_(net_log) {
// TODO(willchan): Look to see if there's a better signal for when it's ok to
// initialize this, rather than just delaying it by a fixed time.
const int kNotifierThreadInitializationDelayMS = 1000;
@@ -234,6 +236,10 @@ NetworkChangeNotifierMac::NetworkChangeNotifierMac()
void NetworkChangeNotifierMac::OnIPAddressChanged() {
DCHECK(CalledOnValidThread());
+ BoundNetLog net_log =
+ BoundNetLog::Make(net_log_, NetLog::SOURCE_NETWORK_CHANGE_NOTIFIER);
+ // TODO(willchan): Add the network change information into an EventParameter.
+ net_log.AddEvent(NetLog::TYPE_NETWORK_IP_ADDRESS_CHANGED, NULL);
FOR_EACH_OBSERVER(Observer, observers_, OnIPAddressChanged());
}