| 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/browser_list.h" | 5 #include "chrome/browser/ui/browser_list.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "chrome/browser/browser_process.h" | 10 #include "chrome/browser/browser_process.h" |
| 11 #include "chrome/browser/browser_shutdown.h" | 11 #include "chrome/browser/browser_shutdown.h" |
| 12 #include "chrome/browser/chrome_notification_types.h" | 12 #include "chrome/browser/chrome_notification_types.h" |
| 13 #include "chrome/browser/lifetime/application_lifetime.h" | 13 #include "chrome/browser/lifetime/application_lifetime.h" |
| 14 #include "chrome/browser/profiles/profile.h" | 14 #include "chrome/browser/profiles/profile.h" |
| 15 #include "chrome/browser/ui/browser.h" | 15 #include "chrome/browser/ui/browser.h" |
| 16 #include "chrome/browser/ui/browser_finder.h" | 16 #include "chrome/browser/ui/browser_finder.h" |
| 17 #include "chrome/browser/ui/browser_iterator.h" | 17 #include "chrome/browser/ui/browser_iterator.h" |
| 18 #include "chrome/browser/ui/browser_list_observer.h" | 18 #include "chrome/browser/ui/browser_list_observer.h" |
| 19 #include "chrome/browser/ui/browser_window.h" | 19 #include "chrome/browser/ui/browser_window.h" |
| 20 #include "chrome/browser/ui/host_desktop.h" | 20 #include "chrome/browser/ui/host_desktop.h" |
| 21 #include "content/public/browser/notification_service.h" | 21 #include "content/public/browser/notification_service.h" |
| 22 #include "content/public/browser/user_metrics.h" | 22 #include "content/public/browser/user_metrics.h" |
| 23 | 23 |
| 24 #if defined(OS_CHROMEOS) | 24 #if defined(OS_CHROMEOS) |
| 25 #include "chrome/browser/chromeos/login/users/user_manager.h" | 25 #include "components/user_manager/user_manager.h" |
| 26 #endif | 26 #endif |
| 27 | 27 |
| 28 using base::UserMetricsAction; | 28 using base::UserMetricsAction; |
| 29 using content::WebContents; | 29 using content::WebContents; |
| 30 | 30 |
| 31 // static | 31 // static |
| 32 base::LazyInstance<ObserverList<chrome::BrowserListObserver> >::Leaky | 32 base::LazyInstance<ObserverList<chrome::BrowserListObserver> >::Leaky |
| 33 BrowserList::observers_ = LAZY_INSTANCE_INITIALIZER; | 33 BrowserList::observers_ = LAZY_INSTANCE_INITIALIZER; |
| 34 | 34 |
| 35 // static | 35 // static |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 } | 177 } |
| 178 | 178 |
| 179 // static | 179 // static |
| 180 void BrowserList::RemoveBrowserFrom(Browser* browser, | 180 void BrowserList::RemoveBrowserFrom(Browser* browser, |
| 181 BrowserVector* browser_list) { | 181 BrowserVector* browser_list) { |
| 182 BrowserVector::iterator remove_browser = | 182 BrowserVector::iterator remove_browser = |
| 183 std::find(browser_list->begin(), browser_list->end(), browser); | 183 std::find(browser_list->begin(), browser_list->end(), browser); |
| 184 if (remove_browser != browser_list->end()) | 184 if (remove_browser != browser_list->end()) |
| 185 browser_list->erase(remove_browser); | 185 browser_list->erase(remove_browser); |
| 186 } | 186 } |
| OLD | NEW |