summaryrefslogtreecommitdiffstats
path: root/chromeos/network/network_change_notifier_factory_chromeos.cc
diff options
context:
space:
mode:
authorgauravsh@chromium.org <gauravsh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-12-20 10:28:44 +0000
committergauravsh@chromium.org <gauravsh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-12-20 10:28:44 +0000
commit2894798f1bf3bfdc550b66fa267549d5421bfe16 (patch)
tree51a2904e19780949d5cf98615542e8f47f1e05e0 /chromeos/network/network_change_notifier_factory_chromeos.cc
parentd37b59df4b91d125695a98fe7a87be9a154dd76c (diff)
downloadchromium_src-2894798f1bf3bfdc550b66fa267549d5421bfe16.zip
chromium_src-2894798f1bf3bfdc550b66fa267549d5421bfe16.tar.gz
chromium_src-2894798f1bf3bfdc550b66fa267549d5421bfe16.tar.bz2
Implement new network change notifier that uses NetworkStateHandler
This implements the new network change notifier that informs the Chrome network stack of connectivity changes. It's currently behind the --enable-new-network-handlers command line flag. BUG=chromium-os:159647 TEST=unit tests, gmerged on a device and ensured offline->online and online->offline transitions are correctly detected. Review URL: https://chromiumcodereview.appspot.com/11469044 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@174127 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chromeos/network/network_change_notifier_factory_chromeos.cc')
-rw-r--r--chromeos/network/network_change_notifier_factory_chromeos.cc30
1 files changed, 30 insertions, 0 deletions
diff --git a/chromeos/network/network_change_notifier_factory_chromeos.cc b/chromeos/network/network_change_notifier_factory_chromeos.cc
new file mode 100644
index 0000000..1d73c3e
--- /dev/null
+++ b/chromeos/network/network_change_notifier_factory_chromeos.cc
@@ -0,0 +1,30 @@
+// 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.
+
+#include "chromeos/network/network_change_notifier_factory_chromeos.h"
+
+#include "chromeos/network/network_change_notifier_chromeos.h"
+
+namespace chromeos {
+
+namespace {
+
+NetworkChangeNotifierChromeos* g_network_change_notifier_chromeos = NULL;
+
+} // namespace
+
+net::NetworkChangeNotifier*
+NetworkChangeNotifierFactoryChromeos::CreateInstance() {
+ DCHECK(!g_network_change_notifier_chromeos);
+ g_network_change_notifier_chromeos = new NetworkChangeNotifierChromeos();
+ return g_network_change_notifier_chromeos;
+}
+
+// static
+NetworkChangeNotifierChromeos*
+NetworkChangeNotifierFactoryChromeos::GetInstance() {
+ return g_network_change_notifier_chromeos;
+}
+
+} // namespace chromeos