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

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: Rebase + Update Created 8 years, 10 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 1134 matching lines...) Expand 10 before | Expand all | Expand 10 after
1145 } 1145 }
1146 1146
1147 if (parsed_command_line().HasSwitch(switches::kEnableProfiling)) { 1147 if (parsed_command_line().HasSwitch(switches::kEnableProfiling)) {
1148 // User wants to override default tracking status. 1148 // User wants to override default tracking status.
1149 std::string flag = 1149 std::string flag =
1150 parsed_command_line().GetSwitchValueASCII(switches::kEnableProfiling); 1150 parsed_command_line().GetSwitchValueASCII(switches::kEnableProfiling);
1151 bool enabled = flag.compare("0") != 0; 1151 bool enabled = flag.compare("0") != 0;
1152 tracked_objects::ThreadData::InitializeAndSetTrackingStatus(enabled); 1152 tracked_objects::ThreadData::InitializeAndSetTrackingStatus(enabled);
1153 } 1153 }
1154 1154
1155 if (parsed_command_line().HasSwitch(switches::kProfilingOutputFile)) {
1156 tracking_objects_.set_output_file_path(
1157 parsed_command_line().GetSwitchValuePath(
1158 switches::kProfilingOutputFile));
1159 }
1160
1155 // This forces the TabCloseableStateWatcher to be created and, on chromeos, 1161 // This forces the TabCloseableStateWatcher to be created and, on chromeos,
1156 // register for the notifications it needs to track the closeable state of 1162 // register for the notifications it needs to track the closeable state of
1157 // tabs. 1163 // tabs.
1158 browser_process_->tab_closeable_state_watcher(); 1164 browser_process_->tab_closeable_state_watcher();
1159 1165
1160 local_state_ = InitializeLocalState(parsed_command_line(), 1166 local_state_ = InitializeLocalState(parsed_command_line(),
1161 is_first_run_); 1167 is_first_run_);
1162 1168
1163 // If we're running tests (ui_task is non-null), then the ResourceBundle 1169 // If we're running tests (ui_task is non-null), then the ResourceBundle
1164 // has already been initialized. 1170 // has already been initialized.
(...skipping 768 matching lines...) Expand 10 before | Expand all | Expand 10 after
1933 if (base::win::GetVersion() <= base::win::VERSION_XP) 1939 if (base::win::GetVersion() <= base::win::VERSION_XP)
1934 uma_name += "_XP"; 1940 uma_name += "_XP";
1935 1941
1936 uma_name += "_PreRead"; 1942 uma_name += "_PreRead";
1937 uma_name += pre_read == "1" ? "Enabled" : "Disabled"; 1943 uma_name += pre_read == "1" ? "Enabled" : "Disabled";
1938 AddPreReadHistogramTime(uma_name.c_str(), time); 1944 AddPreReadHistogramTime(uma_name.c_str(), time);
1939 } 1945 }
1940 #endif 1946 #endif
1941 #endif 1947 #endif
1942 } 1948 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698