| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/browser_shutdown.h" | 5 #include "chrome/browser/browser_shutdown.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 #include "chrome/common/switch_utils.h" | 36 #include "chrome/common/switch_utils.h" |
| 37 #include "content/browser/browser_thread.h" | 37 #include "content/browser/browser_thread.h" |
| 38 #include "content/browser/plugin_process_host.h" | 38 #include "content/browser/plugin_process_host.h" |
| 39 #include "content/browser/renderer_host/render_process_host.h" | 39 #include "content/browser/renderer_host/render_process_host.h" |
| 40 #include "content/browser/renderer_host/render_view_host.h" | 40 #include "content/browser/renderer_host/render_view_host.h" |
| 41 #include "content/browser/renderer_host/render_widget_host.h" | 41 #include "content/browser/renderer_host/render_widget_host.h" |
| 42 #include "net/predictor_api.h" | 42 #include "net/predictor_api.h" |
| 43 #include "ui/base/resource/resource_bundle.h" | 43 #include "ui/base/resource/resource_bundle.h" |
| 44 | 44 |
| 45 #if defined(OS_WIN) | 45 #if defined(OS_WIN) |
| 46 #include "chrome/browser/browser_util_win.h" |
| 46 #include "chrome/browser/first_run/upgrade_util_win.h" | 47 #include "chrome/browser/first_run/upgrade_util_win.h" |
| 47 #include "chrome/browser/rlz/rlz.h" | 48 #include "chrome/browser/rlz/rlz.h" |
| 48 #endif | 49 #endif |
| 49 | 50 |
| 50 #if defined(OS_CHROMEOS) | 51 #if defined(OS_CHROMEOS) |
| 51 #include "chrome/browser/chromeos/boot_times_loader.h" | 52 #include "chrome/browser/chromeos/boot_times_loader.h" |
| 52 #include "chrome/browser/chromeos/cros/cros_library.h" | 53 #include "chrome/browser/chromeos/cros/cros_library.h" |
| 53 #include "chrome/browser/chromeos/cros/login_library.h" | 54 #include "chrome/browser/chromeos/cros/login_library.h" |
| 54 #include "chrome/browser/chromeos/system_key_event_listener.h" | 55 #include "chrome/browser/chromeos/system_key_event_listener.h" |
| 55 #endif | 56 #endif |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 true); | 184 true); |
| 184 #endif | 185 #endif |
| 185 | 186 |
| 186 // Uninstall Jank-O-Meter here after the IO thread is no longer running. | 187 // Uninstall Jank-O-Meter here after the IO thread is no longer running. |
| 187 UninstallJankometer(); | 188 UninstallJankometer(); |
| 188 | 189 |
| 189 if (delete_resources_on_shutdown) | 190 if (delete_resources_on_shutdown) |
| 190 ResourceBundle::CleanupSharedInstance(); | 191 ResourceBundle::CleanupSharedInstance(); |
| 191 | 192 |
| 192 #if defined(OS_WIN) | 193 #if defined(OS_WIN) |
| 193 if (!upgrade_util::IsBrowserAlreadyRunning() && | 194 if (!browser_util::IsBrowserAlreadyRunning() && |
| 194 shutdown_type_ != browser_shutdown::END_SESSION) { | 195 shutdown_type_ != browser_shutdown::END_SESSION) { |
| 195 upgrade_util::SwapNewChromeExeIfPresent(); | 196 upgrade_util::SwapNewChromeExeIfPresent(); |
| 196 } | 197 } |
| 197 #endif | 198 #endif |
| 198 | 199 |
| 199 if (restart_last_session) { | 200 if (restart_last_session) { |
| 200 #if !defined(OS_CHROMEOS) | 201 #if !defined(OS_CHROMEOS) |
| 201 // Make sure to relaunch the browser with the original command line plus | 202 // Make sure to relaunch the browser with the original command line plus |
| 202 // the Restore Last Session flag. Note that Chrome can be launched (ie. | 203 // the Restore Last Session flag. Note that Chrome can be launched (ie. |
| 203 // through ShellExecute on Windows) with a switch argument terminator at | 204 // through ShellExecute on Windows) with a switch argument terminator at |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 331 | 332 |
| 332 bool ShuttingDownWithoutClosingBrowsers() { | 333 bool ShuttingDownWithoutClosingBrowsers() { |
| 333 #if defined(USE_X11) | 334 #if defined(USE_X11) |
| 334 if (GetShutdownType() == browser_shutdown::END_SESSION) | 335 if (GetShutdownType() == browser_shutdown::END_SESSION) |
| 335 return true; | 336 return true; |
| 336 #endif | 337 #endif |
| 337 return false; | 338 return false; |
| 338 } | 339 } |
| 339 | 340 |
| 340 } // namespace browser_shutdown | 341 } // namespace browser_shutdown |
| OLD | NEW |