| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "app/resource_bundle.h" | 9 #include "app/resource_bundle.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 #include "net/predictor_api.h" | 41 #include "net/predictor_api.h" |
| 42 | 42 |
| 43 #if defined(OS_WIN) | 43 #if defined(OS_WIN) |
| 44 #include "chrome/browser/rlz/rlz.h" | 44 #include "chrome/browser/rlz/rlz.h" |
| 45 #endif | 45 #endif |
| 46 | 46 |
| 47 #if defined(OS_CHROMEOS) | 47 #if defined(OS_CHROMEOS) |
| 48 #include "chrome/browser/chromeos/boot_times_loader.h" | 48 #include "chrome/browser/chromeos/boot_times_loader.h" |
| 49 #include "chrome/browser/chromeos/cros/cros_library.h" | 49 #include "chrome/browser/chromeos/cros/cros_library.h" |
| 50 #include "chrome/browser/chromeos/cros/login_library.h" | 50 #include "chrome/browser/chromeos/cros/login_library.h" |
| 51 #include "chrome/browser/chromeos/wm_ipc.h" | |
| 52 #endif | 51 #endif |
| 53 | 52 |
| 54 using base::Time; | 53 using base::Time; |
| 55 using base::TimeDelta; | 54 using base::TimeDelta; |
| 56 | 55 |
| 57 namespace browser_shutdown { | 56 namespace browser_shutdown { |
| 58 | 57 |
| 59 // Whether the browser is trying to quit (e.g., Quit chosen from menu). | 58 // Whether the browser is trying to quit (e.g., Quit chosen from menu). |
| 60 bool g_trying_to_quit = false; | 59 bool g_trying_to_quit = false; |
| 61 | 60 |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 245 std::string shutdown_ms = | 244 std::string shutdown_ms = |
| 246 base::Int64ToString(shutdown_delta.InMilliseconds()); | 245 base::Int64ToString(shutdown_delta.InMilliseconds()); |
| 247 int len = static_cast<int>(shutdown_ms.length()) + 1; | 246 int len = static_cast<int>(shutdown_ms.length()) + 1; |
| 248 FilePath shutdown_ms_file = GetShutdownMsPath(); | 247 FilePath shutdown_ms_file = GetShutdownMsPath(); |
| 249 file_util::WriteFile(shutdown_ms_file, shutdown_ms.c_str(), len); | 248 file_util::WriteFile(shutdown_ms_file, shutdown_ms.c_str(), len); |
| 250 } | 249 } |
| 251 | 250 |
| 252 UnregisterURLRequestChromeJob(); | 251 UnregisterURLRequestChromeJob(); |
| 253 | 252 |
| 254 #if defined(OS_CHROMEOS) | 253 #if defined(OS_CHROMEOS) |
| 255 chromeos::WmIpc::instance()->NotifyAboutSignout(); | |
| 256 if (chromeos::CrosLibrary::Get()->EnsureLoaded()) { | 254 if (chromeos::CrosLibrary::Get()->EnsureLoaded()) { |
| 257 chromeos::CrosLibrary::Get()->GetLoginLibrary()->StopSession(""); | 255 chromeos::CrosLibrary::Get()->GetLoginLibrary()->StopSession(""); |
| 258 } | 256 } |
| 259 #endif | 257 #endif |
| 260 } | 258 } |
| 261 | 259 |
| 262 void ReadLastShutdownFile( | 260 void ReadLastShutdownFile( |
| 263 ShutdownType type, | 261 ShutdownType type, |
| 264 int num_procs, | 262 int num_procs, |
| 265 int num_procs_slow) { | 263 int num_procs_slow) { |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 332 | 330 |
| 333 bool ShuttingDownWithoutClosingBrowsers() { | 331 bool ShuttingDownWithoutClosingBrowsers() { |
| 334 #if defined(USE_X11) | 332 #if defined(USE_X11) |
| 335 if (GetShutdownType() == browser_shutdown::END_SESSION) | 333 if (GetShutdownType() == browser_shutdown::END_SESSION) |
| 336 return true; | 334 return true; |
| 337 #endif | 335 #endif |
| 338 return false; | 336 return false; |
| 339 } | 337 } |
| 340 | 338 |
| 341 } // namespace browser_shutdown | 339 } // namespace browser_shutdown |
| OLD | NEW |