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/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 1137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1148 } | 1148 } |
1149 | 1149 |
1150 if (parsed_command_line().HasSwitch(switches::kEnableProfiling)) { | 1150 if (parsed_command_line().HasSwitch(switches::kEnableProfiling)) { |
1151 // User wants to override default tracking status. | 1151 // User wants to override default tracking status. |
1152 std::string flag = | 1152 std::string flag = |
1153 parsed_command_line().GetSwitchValueASCII(switches::kEnableProfiling); | 1153 parsed_command_line().GetSwitchValueASCII(switches::kEnableProfiling); |
1154 bool enabled = flag.compare("0") != 0; | 1154 bool enabled = flag.compare("0") != 0; |
1155 tracked_objects::ThreadData::InitializeAndSetTrackingStatus(enabled); | 1155 tracked_objects::ThreadData::InitializeAndSetTrackingStatus(enabled); |
1156 } | 1156 } |
1157 | 1157 |
| 1158 if (parsed_command_line().HasSwitch(switches::kProfilingOutputFile)) { |
| 1159 tracking_objects_.set_output_file_path( |
| 1160 parsed_command_line().GetSwitchValuePath( |
| 1161 switches::kProfilingOutputFile)); |
| 1162 } |
| 1163 |
1158 // This forces the TabCloseableStateWatcher to be created and, on chromeos, | 1164 // This forces the TabCloseableStateWatcher to be created and, on chromeos, |
1159 // register for the notifications it needs to track the closeable state of | 1165 // register for the notifications it needs to track the closeable state of |
1160 // tabs. | 1166 // tabs. |
1161 browser_process_->tab_closeable_state_watcher(); | 1167 browser_process_->tab_closeable_state_watcher(); |
1162 | 1168 |
1163 local_state_ = InitializeLocalState(parsed_command_line(), | 1169 local_state_ = InitializeLocalState(parsed_command_line(), |
1164 is_first_run_); | 1170 is_first_run_); |
1165 | 1171 |
1166 // These members must be initialized before returning from this function. | 1172 // These members must be initialized before returning from this function. |
1167 master_prefs_.reset(new first_run::MasterPrefs); | 1173 master_prefs_.reset(new first_run::MasterPrefs); |
(...skipping 768 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1936 if (base::win::GetVersion() <= base::win::VERSION_XP) | 1942 if (base::win::GetVersion() <= base::win::VERSION_XP) |
1937 uma_name += "_XP"; | 1943 uma_name += "_XP"; |
1938 | 1944 |
1939 uma_name += "_PreRead"; | 1945 uma_name += "_PreRead"; |
1940 uma_name += pre_read == "1" ? "Enabled" : "Disabled"; | 1946 uma_name += pre_read == "1" ? "Enabled" : "Disabled"; |
1941 AddPreReadHistogramTime(uma_name.c_str(), time); | 1947 AddPreReadHistogramTime(uma_name.c_str(), time); |
1942 } | 1948 } |
1943 #endif | 1949 #endif |
1944 #endif | 1950 #endif |
1945 } | 1951 } |
OLD | NEW |