| 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 "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
| (...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 248 file_util::WriteFile(shutdown_ms_file, shutdown_ms.c_str(), len); | 248 file_util::WriteFile(shutdown_ms_file, shutdown_ms.c_str(), len); |
| 249 } | 249 } |
| 250 | 250 |
| 251 UnregisterURLRequestChromeJob(); | 251 UnregisterURLRequestChromeJob(); |
| 252 | 252 |
| 253 #if defined(OS_CHROMEOS) | 253 #if defined(OS_CHROMEOS) |
| 254 if (chromeos::CrosLibrary::Get()->EnsureLoaded()) { | 254 if (chromeos::CrosLibrary::Get()->EnsureLoaded()) { |
| 255 chromeos::CrosLibrary::Get()->GetLoginLibrary()->StopSession(""); | 255 chromeos::CrosLibrary::Get()->GetLoginLibrary()->StopSession(""); |
| 256 } | 256 } |
| 257 #endif | 257 #endif |
| 258 |
| 259 // Clean up data sources before the UI thread is removed. |
| 260 ChromeURLDataManager* data_manager = ChromeURLDataManager::GetInstance(); |
| 261 if (data_manager) |
| 262 data_manager->RemoveAllDataSources(); |
| 258 } | 263 } |
| 259 | 264 |
| 260 void ReadLastShutdownFile( | 265 void ReadLastShutdownFile( |
| 261 ShutdownType type, | 266 ShutdownType type, |
| 262 int num_procs, | 267 int num_procs, |
| 263 int num_procs_slow) { | 268 int num_procs_slow) { |
| 264 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); | 269 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); |
| 265 | 270 |
| 266 FilePath shutdown_ms_file = GetShutdownMsPath(); | 271 FilePath shutdown_ms_file = GetShutdownMsPath(); |
| 267 std::string shutdown_ms_str; | 272 std::string shutdown_ms_str; |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 330 | 335 |
| 331 bool ShuttingDownWithoutClosingBrowsers() { | 336 bool ShuttingDownWithoutClosingBrowsers() { |
| 332 #if defined(USE_X11) | 337 #if defined(USE_X11) |
| 333 if (GetShutdownType() == browser_shutdown::END_SESSION) | 338 if (GetShutdownType() == browser_shutdown::END_SESSION) |
| 334 return true; | 339 return true; |
| 335 #endif | 340 #endif |
| 336 return false; | 341 return false; |
| 337 } | 342 } |
| 338 | 343 |
| 339 } // namespace browser_shutdown | 344 } // namespace browser_shutdown |
| OLD | NEW |