| 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 <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 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 250 // and then write it to a file to be read at startup. | 250 // and then write it to a file to be read at startup. |
| 251 // We can't use prefs since all services are shutdown at this point. | 251 // We can't use prefs since all services are shutdown at this point. |
| 252 TimeDelta shutdown_delta = Time::Now() - shutdown_started_; | 252 TimeDelta shutdown_delta = Time::Now() - shutdown_started_; |
| 253 std::string shutdown_ms = | 253 std::string shutdown_ms = |
| 254 base::Int64ToString(shutdown_delta.InMilliseconds()); | 254 base::Int64ToString(shutdown_delta.InMilliseconds()); |
| 255 int len = static_cast<int>(shutdown_ms.length()) + 1; | 255 int len = static_cast<int>(shutdown_ms.length()) + 1; |
| 256 FilePath shutdown_ms_file = GetShutdownMsPath(); | 256 FilePath shutdown_ms_file = GetShutdownMsPath(); |
| 257 file_util::WriteFile(shutdown_ms_file, shutdown_ms.c_str(), len); | 257 file_util::WriteFile(shutdown_ms_file, shutdown_ms.c_str(), len); |
| 258 } | 258 } |
| 259 | 259 |
| 260 UnregisterURLRequestChromeJob(); | |
| 261 | |
| 262 #if defined(OS_CHROMEOS) | 260 #if defined(OS_CHROMEOS) |
| 263 BrowserList::NotifyAndTerminate(false); | 261 BrowserList::NotifyAndTerminate(false); |
| 264 #endif | 262 #endif |
| 265 | 263 |
| 266 // Clean up data sources before the UI thread is removed. | 264 ChromeURLDataManager::DeleteDataSources(); |
| 267 ChromeURLDataManager* data_manager = ChromeURLDataManager::GetInstance(); | |
| 268 if (data_manager) | |
| 269 data_manager->RemoveAllDataSources(); | |
| 270 } | 265 } |
| 271 | 266 |
| 272 void ReadLastShutdownFile( | 267 void ReadLastShutdownFile( |
| 273 ShutdownType type, | 268 ShutdownType type, |
| 274 int num_procs, | 269 int num_procs, |
| 275 int num_procs_slow) { | 270 int num_procs_slow) { |
| 276 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); | 271 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); |
| 277 | 272 |
| 278 FilePath shutdown_ms_file = GetShutdownMsPath(); | 273 FilePath shutdown_ms_file = GetShutdownMsPath(); |
| 279 std::string shutdown_ms_str; | 274 std::string shutdown_ms_str; |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 342 | 337 |
| 343 bool ShuttingDownWithoutClosingBrowsers() { | 338 bool ShuttingDownWithoutClosingBrowsers() { |
| 344 #if defined(USE_X11) | 339 #if defined(USE_X11) |
| 345 if (GetShutdownType() == browser_shutdown::END_SESSION) | 340 if (GetShutdownType() == browser_shutdown::END_SESSION) |
| 346 return true; | 341 return true; |
| 347 #endif | 342 #endif |
| 348 return false; | 343 return false; |
| 349 } | 344 } |
| 350 | 345 |
| 351 } // namespace browser_shutdown | 346 } // namespace browser_shutdown |
| OLD | NEW |