OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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/ui/network_profile_bubble.h" | 5 #include "chrome/browser/ui/network_profile_bubble.h" |
6 | 6 |
7 #include <windows.h> | 7 #include <windows.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <wtsapi32.h> | 10 #include <wtsapi32.h> |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 | 167 |
168 // static | 168 // static |
169 void NetworkProfileBubble::RecordUmaEvent(MetricNetworkedProfileCheck event) { | 169 void NetworkProfileBubble::RecordUmaEvent(MetricNetworkedProfileCheck event) { |
170 UMA_HISTOGRAM_ENUMERATION(kMetricNetworkedProfileCheck, | 170 UMA_HISTOGRAM_ENUMERATION(kMetricNetworkedProfileCheck, |
171 event, | 171 event, |
172 METRIC_NETWORKED_PROFILE_CHECK_SIZE); | 172 METRIC_NETWORKED_PROFILE_CHECK_SIZE); |
173 } | 173 } |
174 | 174 |
175 // static | 175 // static |
176 void NetworkProfileBubble::NotifyNetworkProfileDetected() { | 176 void NetworkProfileBubble::NotifyNetworkProfileDetected() { |
177 Browser* browser = chrome::FindLastActiveWithHostDesktopType( | 177 Browser* browser = chrome::FindLastActive(); |
178 chrome::GetActiveDesktop()); | |
179 | 178 |
180 if (browser) | 179 if (browser) |
181 ShowNotification(browser); | 180 ShowNotification(browser); |
182 else | 181 else |
183 BrowserList::AddObserver(new BrowserListObserver()); | 182 BrowserList::AddObserver(new BrowserListObserver()); |
184 } | 183 } |
OLD | NEW |