Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(359)

Side by Side Diff: chrome/browser/chrome_browser_main.cc

Issue 9125015: Implement profiler log writing at shutdown (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/chrome_browser_main.h" 5 #include "chrome/browser/chrome_browser_main.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 1138 matching lines...) Expand 10 before | Expand all | Expand 10 after
1149 } 1149 }
1150 1150
1151 if (parsed_command_line().HasSwitch(switches::kEnableProfiling)) { 1151 if (parsed_command_line().HasSwitch(switches::kEnableProfiling)) {
1152 // User wants to override default tracking status. 1152 // User wants to override default tracking status.
1153 std::string flag = 1153 std::string flag =
1154 parsed_command_line().GetSwitchValueASCII(switches::kEnableProfiling); 1154 parsed_command_line().GetSwitchValueASCII(switches::kEnableProfiling);
1155 bool enabled = flag.compare("0") != 0; 1155 bool enabled = flag.compare("0") != 0;
1156 tracked_objects::ThreadData::InitializeAndSetTrackingStatus(enabled); 1156 tracked_objects::ThreadData::InitializeAndSetTrackingStatus(enabled);
1157 } 1157 }
1158 1158
1159 if (parsed_command_line().HasSwitch(switches::kProfilingOutputFile)) {
1160 tracking_objects_.set_output_file_path(
1161 parsed_command_line().GetSwitchValuePath(
1162 switches::kProfilingOutputFile));
1163 }
1164
1159 // This forces the TabCloseableStateWatcher to be created and, on chromeos, 1165 // This forces the TabCloseableStateWatcher to be created and, on chromeos,
1160 // register for the notifications it needs to track the closeable state of 1166 // register for the notifications it needs to track the closeable state of
1161 // tabs. 1167 // tabs.
1162 browser_process_->tab_closeable_state_watcher(); 1168 browser_process_->tab_closeable_state_watcher();
1163 1169
1164 local_state_ = InitializeLocalState(parsed_command_line(), 1170 local_state_ = InitializeLocalState(parsed_command_line(),
1165 is_first_run_); 1171 is_first_run_);
1166 1172
1167 // If we're running tests (ui_task is non-null), then the ResourceBundle 1173 // If we're running tests (ui_task is non-null), then the ResourceBundle
1168 // has already been initialized. 1174 // has already been initialized.
(...skipping 817 matching lines...) Expand 10 before | Expand all | Expand 10 after
1986 if (base::win::GetVersion() <= base::win::VERSION_XP) 1992 if (base::win::GetVersion() <= base::win::VERSION_XP)
1987 uma_name += "_XP"; 1993 uma_name += "_XP";
1988 1994
1989 uma_name += "_PreRead"; 1995 uma_name += "_PreRead";
1990 uma_name += pre_read == "1" ? "Enabled" : "Disabled"; 1996 uma_name += pre_read == "1" ? "Enabled" : "Disabled";
1991 AddPreReadHistogramTime(uma_name.c_str(), time); 1997 AddPreReadHistogramTime(uma_name.c_str(), time);
1992 } 1998 }
1993 #endif 1999 #endif
1994 #endif 2000 #endif
1995 } 2001 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698