OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 | 4 |
5 #include "chrome/browser/local_discovery/wifi/mock_wifi_manager.h" | 5 #include "chrome/browser/local_discovery/wifi/mock_wifi_manager.h" |
6 | 6 |
7 namespace local_discovery { | 7 namespace local_discovery { |
8 | 8 |
9 namespace wifi { | 9 namespace wifi { |
10 | 10 |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 WifiManager::SetFactory(this); | 78 WifiManager::SetFactory(this); |
79 } | 79 } |
80 | 80 |
81 MockWifiManagerFactory::~MockWifiManagerFactory() { | 81 MockWifiManagerFactory::~MockWifiManagerFactory() { |
82 WifiManager::SetFactory(NULL); | 82 WifiManager::SetFactory(NULL); |
83 } | 83 } |
84 | 84 |
85 scoped_ptr<WifiManager> MockWifiManagerFactory::CreateWifiManager() { | 85 scoped_ptr<WifiManager> MockWifiManagerFactory::CreateWifiManager() { |
86 last_created_manager_ = new MockWifiManager(); | 86 last_created_manager_ = new MockWifiManager(); |
87 | 87 |
| 88 WifiManagerCreated(); |
| 89 |
88 return scoped_ptr<WifiManager>(last_created_manager_); | 90 return scoped_ptr<WifiManager>(last_created_manager_); |
89 } | 91 } |
90 | 92 |
| 93 MockWifiManager* MockWifiManagerFactory::GetLastCreatedWifiManager() { |
| 94 return last_created_manager_; |
| 95 } |
| 96 |
91 } // namespace wifi | 97 } // namespace wifi |
92 | 98 |
93 } // namespace local_discovery | 99 } // namespace local_discovery |
OLD | NEW |