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 "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
(...skipping 17 matching lines...) Expand all Loading... |
28 #include "content/public/browser/notification_registrar.h" | 28 #include "content/public/browser/notification_registrar.h" |
29 #include "content/public/browser/notification_service.h" | 29 #include "content/public/browser/notification_service.h" |
30 #include "content/public/browser/render_process_host.h" | 30 #include "content/public/browser/render_process_host.h" |
31 #include "content/public/common/result_codes.h" | 31 #include "content/public/common/result_codes.h" |
32 | 32 |
33 #if defined(OS_MACOSX) | 33 #if defined(OS_MACOSX) |
34 #include "chrome/browser/chrome_browser_application_mac.h" | 34 #include "chrome/browser/chrome_browser_application_mac.h" |
35 #endif | 35 #endif |
36 | 36 |
37 #if defined(OS_CHROMEOS) | 37 #if defined(OS_CHROMEOS) |
| 38 #include "base/chromeos/chromeos_version.h" |
38 #include "chrome/browser/chromeos/boot_times_loader.h" | 39 #include "chrome/browser/chromeos/boot_times_loader.h" |
39 #include "chrome/browser/chromeos/dbus/dbus_thread_manager.h" | 40 #include "chrome/browser/chromeos/dbus/dbus_thread_manager.h" |
40 #include "chrome/browser/chromeos/dbus/session_manager_client.h" | 41 #include "chrome/browser/chromeos/dbus/session_manager_client.h" |
41 #include "chrome/browser/chromeos/dbus/update_engine_client.h" | 42 #include "chrome/browser/chromeos/dbus/update_engine_client.h" |
42 #include "chrome/browser/chromeos/system/runtime_environment.h" | |
43 #if defined(TOOLKIT_USES_GTK) | 43 #if defined(TOOLKIT_USES_GTK) |
44 #include "chrome/browser/chromeos/legacy_window_manager/wm_ipc.h" | 44 #include "chrome/browser/chromeos/legacy_window_manager/wm_ipc.h" |
45 #endif | 45 #endif |
46 #endif | 46 #endif |
47 | 47 |
48 using content::WebContents; | 48 using content::WebContents; |
49 | 49 |
50 namespace { | 50 namespace { |
51 | 51 |
52 // This object is instantiated when the first Browser object is added to the | 52 // This object is instantiated when the first Browser object is added to the |
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
331 if (notified || g_session_manager_requested_shutdown) | 331 if (notified || g_session_manager_requested_shutdown) |
332 return; | 332 return; |
333 notified = true; | 333 notified = true; |
334 #endif | 334 #endif |
335 | 335 |
336 if (fast_path) | 336 if (fast_path) |
337 NotifyAppTerminating(); | 337 NotifyAppTerminating(); |
338 | 338 |
339 #if defined(OS_CHROMEOS) | 339 #if defined(OS_CHROMEOS) |
340 NotifyWindowManagerAboutSignout(); | 340 NotifyWindowManagerAboutSignout(); |
341 if (chromeos::system::runtime_environment::IsRunningOnChromeOS()) { | 341 if (base::chromeos::IsRunningOnChromeOS()) { |
342 // If we're on a ChromeOS device, reboot if an update has been applied, | 342 // If we're on a ChromeOS device, reboot if an update has been applied, |
343 // or else signal the session manager to log out. | 343 // or else signal the session manager to log out. |
344 chromeos::UpdateEngineClient* update_engine_client | 344 chromeos::UpdateEngineClient* update_engine_client |
345 = chromeos::DBusThreadManager::Get()->GetUpdateEngineClient(); | 345 = chromeos::DBusThreadManager::Get()->GetUpdateEngineClient(); |
346 if (update_engine_client->GetLastStatus().status == | 346 if (update_engine_client->GetLastStatus().status == |
347 chromeos::UpdateEngineClient::UPDATE_STATUS_UPDATED_NEED_REBOOT) { | 347 chromeos::UpdateEngineClient::UPDATE_STATUS_UPDATED_NEED_REBOOT) { |
348 update_engine_client->RebootAfterUpdate(); | 348 update_engine_client->RebootAfterUpdate(); |
349 } else { | 349 } else { |
350 chromeos::DBusThreadManager::Get()->GetSessionManagerClient() | 350 chromeos::DBusThreadManager::Get()->GetSessionManagerClient() |
351 ->StopSession(); | 351 ->StopSession(); |
(...skipping 515 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
867 // If no more TabContents from Browsers, check the BackgroundPrintingManager. | 867 // If no more TabContents from Browsers, check the BackgroundPrintingManager. |
868 while (bg_printing_iterator_ != GetBackgroundPrintingManager()->end()) { | 868 while (bg_printing_iterator_ != GetBackgroundPrintingManager()->end()) { |
869 cur_ = *bg_printing_iterator_; | 869 cur_ = *bg_printing_iterator_; |
870 CHECK(cur_); | 870 CHECK(cur_); |
871 ++bg_printing_iterator_; | 871 ++bg_printing_iterator_; |
872 return; | 872 return; |
873 } | 873 } |
874 // Reached the end - no more TabContents. | 874 // Reached the end - no more TabContents. |
875 cur_ = NULL; | 875 cur_ = NULL; |
876 } | 876 } |
OLD | NEW |