Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 #include "chrome/browser/chromeos/net/cros_network_change_notifier_factory.h" | 4 #include "chrome/browser/chromeos/net/cros_network_change_notifier_factory.h" |
| 5 | 5 |
| 6 #include "chrome/browser/chromeos/net/network_change_notifier_chromeos.h" | 6 #include "chrome/browser/chromeos/net/network_change_notifier_chromeos.h" |
| 7 | 7 |
| 8 namespace chromeos { | 8 namespace chromeos { |
| 9 | 9 |
| 10 namespace { | |
| 11 | |
| 12 NetworkChangeNotifierChromeos* g_network_change_notifier; | |
|
stevenjb
2011/11/03 19:26:17
= NULL
satorux1
2011/11/03 19:30:27
Done.
| |
| 13 | |
| 14 } // namespace | |
| 15 | |
| 10 net::NetworkChangeNotifier* CrosNetworkChangeNotifierFactory::CreateInstance() { | 16 net::NetworkChangeNotifier* CrosNetworkChangeNotifierFactory::CreateInstance() { |
| 11 return new NetworkChangeNotifierChromeos(); | 17 DCHECK(!g_network_change_notifier); |
| 18 g_network_change_notifier = new NetworkChangeNotifierChromeos(); | |
| 19 return g_network_change_notifier; | |
| 20 } | |
| 21 | |
| 22 // static | |
| 23 NetworkChangeNotifierChromeos* CrosNetworkChangeNotifierFactory::GetInstance() { | |
| 24 return g_network_change_notifier; | |
| 12 } | 25 } |
| 13 | 26 |
| 14 } // namespace net | 27 } // namespace net |
| OLD | NEW |