| 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/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/bind.h" | 10 #include "base/bind.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 #include "build/build_config.h" | 22 #include "build/build_config.h" |
| 23 #include "chrome/browser/about_flags.h" | 23 #include "chrome/browser/about_flags.h" |
| 24 #include "chrome/browser/browser_process.h" | 24 #include "chrome/browser/browser_process.h" |
| 25 #include "chrome/browser/first_run/upgrade_util.h" | 25 #include "chrome/browser/first_run/upgrade_util.h" |
| 26 #include "chrome/browser/jankometer.h" | 26 #include "chrome/browser/jankometer.h" |
| 27 #include "chrome/browser/lifetime/application_lifetime.h" | 27 #include "chrome/browser/lifetime/application_lifetime.h" |
| 28 #include "chrome/browser/metrics/metrics_service.h" | 28 #include "chrome/browser/metrics/metrics_service.h" |
| 29 #include "chrome/browser/prefs/pref_service.h" | 29 #include "chrome/browser/prefs/pref_service.h" |
| 30 #include "chrome/browser/profiles/profile_manager.h" | 30 #include "chrome/browser/profiles/profile_manager.h" |
| 31 #include "chrome/browser/service/service_process_control.h" | 31 #include "chrome/browser/service/service_process_control.h" |
| 32 #include "chrome/browser/ui/webui/chrome_url_data_manager.h" | |
| 33 #include "chrome/common/chrome_paths.h" | 32 #include "chrome/common/chrome_paths.h" |
| 34 #include "chrome/common/chrome_switches.h" | 33 #include "chrome/common/chrome_switches.h" |
| 35 #include "chrome/common/pref_names.h" | 34 #include "chrome/common/pref_names.h" |
| 36 #include "chrome/common/switch_utils.h" | 35 #include "chrome/common/switch_utils.h" |
| 37 #include "content/public/browser/browser_thread.h" | 36 #include "content/public/browser/browser_thread.h" |
| 38 #include "content/public/browser/render_process_host.h" | 37 #include "content/public/browser/render_process_host.h" |
| 39 #include "content/public/browser/render_view_host.h" | 38 #include "content/public/browser/render_view_host.h" |
| 40 #include "ui/base/resource/resource_bundle.h" | 39 #include "ui/base/resource/resource_bundle.h" |
| 41 | 40 |
| 42 #if defined(OS_WIN) | 41 #if defined(OS_WIN) |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 248 std::string shutdown_ms = | 247 std::string shutdown_ms = |
| 249 base::Int64ToString(shutdown_delta.InMilliseconds()); | 248 base::Int64ToString(shutdown_delta.InMilliseconds()); |
| 250 int len = static_cast<int>(shutdown_ms.length()) + 1; | 249 int len = static_cast<int>(shutdown_ms.length()) + 1; |
| 251 FilePath shutdown_ms_file = GetShutdownMsPath(); | 250 FilePath shutdown_ms_file = GetShutdownMsPath(); |
| 252 file_util::WriteFile(shutdown_ms_file, shutdown_ms.c_str(), len); | 251 file_util::WriteFile(shutdown_ms_file, shutdown_ms.c_str(), len); |
| 253 } | 252 } |
| 254 | 253 |
| 255 #if defined(OS_CHROMEOS) | 254 #if defined(OS_CHROMEOS) |
| 256 browser::NotifyAndTerminate(false); | 255 browser::NotifyAndTerminate(false); |
| 257 #endif | 256 #endif |
| 258 | |
| 259 ChromeURLDataManager::DeleteDataSources(); | |
| 260 } | 257 } |
| 261 | 258 |
| 262 void ReadLastShutdownFile( | 259 void ReadLastShutdownFile( |
| 263 ShutdownType type, | 260 ShutdownType type, |
| 264 int num_procs, | 261 int num_procs, |
| 265 int num_procs_slow) { | 262 int num_procs_slow) { |
| 266 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); | 263 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); |
| 267 | 264 |
| 268 FilePath shutdown_ms_file = GetShutdownMsPath(); | 265 FilePath shutdown_ms_file = GetShutdownMsPath(); |
| 269 std::string shutdown_ms_str; | 266 std::string shutdown_ms_str; |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 331 | 328 |
| 332 bool ShuttingDownWithoutClosingBrowsers() { | 329 bool ShuttingDownWithoutClosingBrowsers() { |
| 333 return g_shutting_down_without_closing_browsers; | 330 return g_shutting_down_without_closing_browsers; |
| 334 } | 331 } |
| 335 | 332 |
| 336 void SetShuttingDownWithoutClosingBrowsers(bool without_close) { | 333 void SetShuttingDownWithoutClosingBrowsers(bool without_close) { |
| 337 g_shutting_down_without_closing_browsers = without_close; | 334 g_shutting_down_without_closing_browsers = without_close; |
| 338 } | 335 } |
| 339 | 336 |
| 340 } // namespace browser_shutdown | 337 } // namespace browser_shutdown |
| OLD | NEW |