summaryrefslogtreecommitdiffstats
path: root/chrome/browser/browser_shutdown.cc
diff options
context:
space:
mode:
authorthestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-27 00:56:43 +0000
committerthestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-27 00:56:43 +0000
commit01109dcfb9dc87900f4227efe0dc81d0d382918a (patch)
tree43fbf90877b3ef7f1de2d3d35cffb8f35d3e7cf7 /chrome/browser/browser_shutdown.cc
parentaf9814e8a471604305ddd01e97ad28c0ada9de67 (diff)
downloadchromium_src-01109dcfb9dc87900f4227efe0dc81d0d382918a.zip
chromium_src-01109dcfb9dc87900f4227efe0dc81d0d382918a.tar.gz
chromium_src-01109dcfb9dc87900f4227efe0dc81d0d382918a.tar.bz2
POSIX: Re-enable browser shutdown measurements. We should write the measurements to the user data directory instead of the temp directory.
BUG=39098 TEST=none Review URL: http://codereview.chromium.org/1253006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42884 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser_shutdown.cc')
-rw-r--r--chrome/browser/browser_shutdown.cc12
1 files changed, 5 insertions, 7 deletions
diff --git a/chrome/browser/browser_shutdown.cc b/chrome/browser/browser_shutdown.cc
index a3adf82..5d24596 100644
--- a/chrome/browser/browser_shutdown.cc
+++ b/chrome/browser/browser_shutdown.cc
@@ -4,6 +4,8 @@
#include "chrome/browser/browser_shutdown.h"
+#include <string>
+
#include "app/resource_bundle.h"
#include "base/file_path.h"
#include "base/file_util.h"
@@ -13,6 +15,7 @@
#include "base/thread.h"
#include "base/time.h"
#include "base/waitable_event.h"
+#include "build/build_config.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/chrome_thread.h"
#include "chrome/browser/dom_ui/chrome_url_data_manager.h"
@@ -81,13 +84,11 @@ void OnShutdownStarting(ShutdownType type) {
}
}
-#if defined(OS_WIN)
FilePath GetShutdownMsPath() {
FilePath shutdown_ms_file;
- PathService::Get(base::DIR_TEMP, &shutdown_ms_file);
+ PathService::Get(chrome::DIR_USER_DATA, &shutdown_ms_file);
return shutdown_ms_file.AppendASCII(kShutdownMsFile);
}
-#endif
void Shutdown() {
// Unload plugins. This needs to happen on the IO thread.
@@ -146,6 +147,7 @@ void Shutdown() {
shutdown_type_ != browser_shutdown::END_SESSION) {
Upgrade::SwapNewChromeExeIfPresent();
}
+#endif
if (shutdown_type_ > NOT_VALID && shutdown_num_processes_ > 0) {
// Measure total shutdown time as late in the process as possible
@@ -157,13 +159,10 @@ void Shutdown() {
FilePath shutdown_ms_file = GetShutdownMsPath();
file_util::WriteFile(shutdown_ms_file, shutdown_ms.c_str(), len);
}
-#endif
UnregisterURLRequestChromeJob();
}
-#if defined(OS_WIN)
-
void ReadLastShutdownFile(
ShutdownType type,
int num_procs,
@@ -226,6 +225,5 @@ void ReadLastShutdownInfo() {
NewRunnableFunction(
&ReadLastShutdownFile, type, num_procs, num_procs_slow));
}
-#endif
} // namespace browser_shutdown