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 1211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1222 } else { | 1222 } else { |
1223 browser_process_.reset(new BrowserProcessImpl(parsed_command_line())); | 1223 browser_process_.reset(new BrowserProcessImpl(parsed_command_line())); |
1224 } | 1224 } |
1225 | 1225 |
1226 if (parsed_command_line().HasSwitch(switches::kEnableProfiling)) { | 1226 if (parsed_command_line().HasSwitch(switches::kEnableProfiling)) { |
1227 // User wants to override default tracking status. | 1227 // User wants to override default tracking status. |
1228 std::string flag = | 1228 std::string flag = |
1229 parsed_command_line().GetSwitchValueASCII(switches::kEnableProfiling); | 1229 parsed_command_line().GetSwitchValueASCII(switches::kEnableProfiling); |
1230 bool enabled = flag.compare("0") != 0; | 1230 bool enabled = flag.compare("0") != 0; |
1231 tracked_objects::ThreadData::InitializeAndSetTrackingStatus(enabled); | 1231 tracked_objects::ThreadData::InitializeAndSetTrackingStatus(enabled); |
1232 } else { | |
1233 #if defined(OS_WIN) | |
1234 // TODO(jar) 103209: Temporarilly default to disable for XP. | |
1235 if (base::win::GetVersion() <= base::win::VERSION_XP) | |
1236 tracked_objects::ThreadData::InitializeAndSetTrackingStatus(false); | |
1237 #endif // OS_WIN | |
1238 } | 1232 } |
1239 | 1233 |
1240 // This forces the TabCloseableStateWatcher to be created and, on chromeos, | 1234 // This forces the TabCloseableStateWatcher to be created and, on chromeos, |
1241 // register for the notifications it needs to track the closeable state of | 1235 // register for the notifications it needs to track the closeable state of |
1242 // tabs. | 1236 // tabs. |
1243 g_browser_process->tab_closeable_state_watcher(); | 1237 g_browser_process->tab_closeable_state_watcher(); |
1244 | 1238 |
1245 local_state_ = InitializeLocalState(parsed_command_line(), | 1239 local_state_ = InitializeLocalState(parsed_command_line(), |
1246 is_first_run_); | 1240 is_first_run_); |
1247 | 1241 |
(...skipping 887 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2135 if (env->GetVar(chrome::kPreReadEnvironmentVariable, &pre_read) && | 2129 if (env->GetVar(chrome::kPreReadEnvironmentVariable, &pre_read) && |
2136 (pre_read == "0" || pre_read == "1")) { | 2130 (pre_read == "0" || pre_read == "1")) { |
2137 std::string uma_name(name); | 2131 std::string uma_name(name); |
2138 uma_name += "_PreRead"; | 2132 uma_name += "_PreRead"; |
2139 uma_name += pre_read == "1" ? "Enabled" : "Disabled"; | 2133 uma_name += pre_read == "1" ? "Enabled" : "Disabled"; |
2140 AddPreReadHistogramTime(uma_name.c_str(), time); | 2134 AddPreReadHistogramTime(uma_name.c_str(), time); |
2141 } | 2135 } |
2142 #endif | 2136 #endif |
2143 #endif | 2137 #endif |
2144 } | 2138 } |
OLD | NEW |