| 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 1247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1258 } else { | 1258 } else { |
| 1259 browser_process_.reset(new BrowserProcessImpl(parsed_command_line())); | 1259 browser_process_.reset(new BrowserProcessImpl(parsed_command_line())); |
| 1260 } | 1260 } |
| 1261 | 1261 |
| 1262 if (parsed_command_line().HasSwitch(switches::kEnableProfiling)) { | 1262 if (parsed_command_line().HasSwitch(switches::kEnableProfiling)) { |
| 1263 // User wants to override default tracking status. | 1263 // User wants to override default tracking status. |
| 1264 std::string flag = | 1264 std::string flag = |
| 1265 parsed_command_line().GetSwitchValueASCII(switches::kEnableProfiling); | 1265 parsed_command_line().GetSwitchValueASCII(switches::kEnableProfiling); |
| 1266 bool enabled = flag.compare("0") != 0; | 1266 bool enabled = flag.compare("0") != 0; |
| 1267 tracked_objects::ThreadData::InitializeAndSetTrackingStatus(enabled); | 1267 tracked_objects::ThreadData::InitializeAndSetTrackingStatus(enabled); |
| 1268 } else { | |
| 1269 #if defined(OS_WIN) | |
| 1270 // TODO(jar) 103209: Temporarilly default to disable for XP. | |
| 1271 if (base::win::GetVersion() <= base::win::VERSION_XP) | |
| 1272 tracked_objects::ThreadData::InitializeAndSetTrackingStatus(false); | |
| 1273 #endif // OS_WIN | |
| 1274 } | 1268 } |
| 1275 | 1269 |
| 1276 // This forces the TabCloseableStateWatcher to be created and, on chromeos, | 1270 // This forces the TabCloseableStateWatcher to be created and, on chromeos, |
| 1277 // register for the notifications it needs to track the closeable state of | 1271 // register for the notifications it needs to track the closeable state of |
| 1278 // tabs. | 1272 // tabs. |
| 1279 g_browser_process->tab_closeable_state_watcher(); | 1273 g_browser_process->tab_closeable_state_watcher(); |
| 1280 | 1274 |
| 1281 local_state_ = InitializeLocalState(parsed_command_line(), | 1275 local_state_ = InitializeLocalState(parsed_command_line(), |
| 1282 is_first_run_); | 1276 is_first_run_); |
| 1283 | 1277 |
| (...skipping 856 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2140 if (env->GetVar(chrome::kPreReadEnvironmentVariable, &pre_read) && | 2134 if (env->GetVar(chrome::kPreReadEnvironmentVariable, &pre_read) && |
| 2141 (pre_read == "0" || pre_read == "1")) { | 2135 (pre_read == "0" || pre_read == "1")) { |
| 2142 std::string uma_name(name); | 2136 std::string uma_name(name); |
| 2143 uma_name += "_PreRead"; | 2137 uma_name += "_PreRead"; |
| 2144 uma_name += pre_read == "1" ? "Enabled" : "Disabled"; | 2138 uma_name += pre_read == "1" ? "Enabled" : "Disabled"; |
| 2145 AddPreReadHistogramTime(uma_name.c_str(), time); | 2139 AddPreReadHistogramTime(uma_name.c_str(), time); |
| 2146 } | 2140 } |
| 2147 #endif | 2141 #endif |
| 2148 #endif | 2142 #endif |
| 2149 } | 2143 } |
| OLD | NEW |