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