Split the initialisation of NeworkChangeNotifierMac.
The initialization function is split into two:
- to register for SCNetworkReachability notifications,
- to register for SCDynamicStore notifications.
BUG=NONE
TEST=NONE
Review URL: http://codereview.chromium.org/9150002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@117200 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/net/base/network_change_notifier_mac.h b/net/base/network_change_notifier_mac.h
index 54ca27d..ec2bb1f 100644
--- a/net/base/network_change_notifier_mac.h
+++ b/net/base/network_change_notifier_mac.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -45,6 +45,9 @@
virtual void Init() OVERRIDE {
net_config_watcher_->SetInitialState();
}
+ virtual void StartReachabilityNotifications() OVERRIDE {
+ net_config_watcher_->StartReachabilityNotifications();
+ }
virtual void SetDynamicStoreNotificationKeys(
SCDynamicStoreRef store) OVERRIDE {
net_config_watcher_->SetDynamicStoreNotificationKeys(store);
@@ -58,7 +61,8 @@
DISALLOW_COPY_AND_ASSIGN(Forwarder);
};
- // NetworkConfigWatcherMac::Delegate implementation:
+ // Methods directly called by the NetworkConfigWatcherMac::Delegate:
+ void StartReachabilityNotifications();
void SetDynamicStoreNotificationKeys(SCDynamicStoreRef store);
void OnNetworkConfigChange(CFArrayRef changed_keys);