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 1199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1210 parsed_command_line().HasSwitch(switches::kImportFromFile)) { | 1210 parsed_command_line().HasSwitch(switches::kImportFromFile)) { |
1211 // We use different BrowserProcess when importing so no GoogleURLTracker is | 1211 // We use different BrowserProcess when importing so no GoogleURLTracker is |
1212 // instantiated (as it makes a net::URLRequest and we don't have an IO | 1212 // instantiated (as it makes a net::URLRequest and we don't have an IO |
1213 // thread, see bug #1292702). | 1213 // thread, see bug #1292702). |
1214 browser_process_.reset(new FirstRunBrowserProcess(parsed_command_line())); | 1214 browser_process_.reset(new FirstRunBrowserProcess(parsed_command_line())); |
1215 is_first_run = false; | 1215 is_first_run = false; |
1216 } else { | 1216 } else { |
1217 browser_process_.reset(new BrowserProcessImpl(parsed_command_line())); | 1217 browser_process_.reset(new BrowserProcessImpl(parsed_command_line())); |
1218 } | 1218 } |
1219 | 1219 |
| 1220 if (parsed_command_line().HasSwitch(switches::kEnableTracking)) { |
| 1221 std::string flag = |
| 1222 parsed_command_line().GetSwitchValueASCII(switches::kEnableTracking); |
| 1223 if (flag.compare("0") == 0) |
| 1224 tracked_objects::ThreadData::InitializeAndSetTrackingStatus(false); |
| 1225 } |
| 1226 |
1220 // This forces the TabCloseableStateWatcher to be created and, on chromeos, | 1227 // This forces the TabCloseableStateWatcher to be created and, on chromeos, |
1221 // register for the notifications it needs to track the closeable state of | 1228 // register for the notifications it needs to track the closeable state of |
1222 // tabs. | 1229 // tabs. |
1223 g_browser_process->tab_closeable_state_watcher(); | 1230 g_browser_process->tab_closeable_state_watcher(); |
1224 | 1231 |
1225 PrefService* local_state = InitializeLocalState(parsed_command_line(), | 1232 PrefService* local_state = InitializeLocalState(parsed_command_line(), |
1226 is_first_run); | 1233 is_first_run); |
1227 | 1234 |
1228 #if defined(USE_LINUX_BREAKPAD) | 1235 #if defined(USE_LINUX_BREAKPAD) |
1229 // Needs to be called after we have chrome::DIR_USER_DATA and | 1236 // Needs to be called after we have chrome::DIR_USER_DATA and |
(...skipping 884 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2114 if (env->GetVar(chrome::kPreReadEnvironmentVariable, &pre_read) && | 2121 if (env->GetVar(chrome::kPreReadEnvironmentVariable, &pre_read) && |
2115 (pre_read == "0" || pre_read == "1")) { | 2122 (pre_read == "0" || pre_read == "1")) { |
2116 std::string uma_name(name); | 2123 std::string uma_name(name); |
2117 uma_name += "_PreRead"; | 2124 uma_name += "_PreRead"; |
2118 uma_name += pre_read == "1" ? "Enabled" : "Disabled"; | 2125 uma_name += pre_read == "1" ? "Enabled" : "Disabled"; |
2119 AddPreReadHistogramTime(uma_name.c_str(), time); | 2126 AddPreReadHistogramTime(uma_name.c_str(), time); |
2120 } | 2127 } |
2121 #endif | 2128 #endif |
2122 #endif | 2129 #endif |
2123 } | 2130 } |
OLD | NEW |