| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 1234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1245 } else { | 1245 } else { |
| 1246 browser_process_.reset(new BrowserProcessImpl(parsed_command_line())); | 1246 browser_process_.reset(new BrowserProcessImpl(parsed_command_line())); |
| 1247 } | 1247 } |
| 1248 | 1248 |
| 1249 if (parsed_command_line().HasSwitch(switches::kEnableProfiling)) { | 1249 if (parsed_command_line().HasSwitch(switches::kEnableProfiling)) { |
| 1250 // User wants to override default tracking status. | 1250 // User wants to override default tracking status. |
| 1251 std::string flag = | 1251 std::string flag = |
| 1252 parsed_command_line().GetSwitchValueASCII(switches::kEnableProfiling); | 1252 parsed_command_line().GetSwitchValueASCII(switches::kEnableProfiling); |
| 1253 bool enabled = flag.compare("0") != 0; | 1253 bool enabled = flag.compare("0") != 0; |
| 1254 tracked_objects::ThreadData::InitializeAndSetTrackingStatus(enabled); | 1254 tracked_objects::ThreadData::InitializeAndSetTrackingStatus(enabled); |
| 1255 } else { |
| 1256 #if defined(OS_WIN) |
| 1257 // TODO(jar) 103209: Temporarilly default to disable for XP. |
| 1258 if (base::win::GetVersion() <= base::win::VERSION_XP) |
| 1259 tracked_objects::ThreadData::InitializeAndSetTrackingStatus(false); |
| 1260 #endif // OS_WIN |
| 1255 } | 1261 } |
| 1256 | 1262 |
| 1257 // This forces the TabCloseableStateWatcher to be created and, on chromeos, | 1263 // This forces the TabCloseableStateWatcher to be created and, on chromeos, |
| 1258 // register for the notifications it needs to track the closeable state of | 1264 // register for the notifications it needs to track the closeable state of |
| 1259 // tabs. | 1265 // tabs. |
| 1260 g_browser_process->tab_closeable_state_watcher(); | 1266 g_browser_process->tab_closeable_state_watcher(); |
| 1261 | 1267 |
| 1262 local_state_ = InitializeLocalState(parsed_command_line(), | 1268 local_state_ = InitializeLocalState(parsed_command_line(), |
| 1263 is_first_run_); | 1269 is_first_run_); |
| 1264 | 1270 |
| (...skipping 892 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2157 if (env->GetVar(chrome::kPreReadEnvironmentVariable, &pre_read) && | 2163 if (env->GetVar(chrome::kPreReadEnvironmentVariable, &pre_read) && |
| 2158 (pre_read == "0" || pre_read == "1")) { | 2164 (pre_read == "0" || pre_read == "1")) { |
| 2159 std::string uma_name(name); | 2165 std::string uma_name(name); |
| 2160 uma_name += "_PreRead"; | 2166 uma_name += "_PreRead"; |
| 2161 uma_name += pre_read == "1" ? "Enabled" : "Disabled"; | 2167 uma_name += pre_read == "1" ? "Enabled" : "Disabled"; |
| 2162 AddPreReadHistogramTime(uma_name.c_str(), time); | 2168 AddPreReadHistogramTime(uma_name.c_str(), time); |
| 2163 } | 2169 } |
| 2164 #endif | 2170 #endif |
| 2165 #endif | 2171 #endif |
| 2166 } | 2172 } |
| OLD | NEW |