OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "chromeos/network/connection_change_notifier_factory.h" |
| 6 |
| 7 #include "chromeos/network/connection_change_notifier.h" |
| 8 |
| 9 namespace chromeos { |
| 10 |
| 11 namespace { |
| 12 |
| 13 ConnectionChangeNotifier* g_connection_change_notifier = NULL; |
| 14 |
| 15 } // namespace |
| 16 |
| 17 net::NetworkChangeNotifier* ConnectionChangeNotifierFactory::CreateInstance() { |
| 18 DCHECK(!g_connection_change_notifier) << "Instance was already created."; |
| 19 g_connection_change_notifier = new ConnectionChangeNotifier(); |
| 20 return g_connection_change_notifier; |
| 21 } |
| 22 |
| 23 // static |
| 24 ConnectionChangeNotifier* ConnectionChangeNotifierFactory::GetInstance() { |
| 25 return g_connection_change_notifier; |
| 26 } |
| 27 |
| 28 } // namespace chromeos |
OLD | NEW |