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 | |
1227 // This forces the TabCloseableStateWatcher to be created and, on chromeos, | 1220 // This forces the TabCloseableStateWatcher to be created and, on chromeos, |
1228 // register for the notifications it needs to track the closeable state of | 1221 // register for the notifications it needs to track the closeable state of |
1229 // tabs. | 1222 // tabs. |
1230 g_browser_process->tab_closeable_state_watcher(); | 1223 g_browser_process->tab_closeable_state_watcher(); |
1231 | 1224 |
1232 PrefService* local_state = InitializeLocalState(parsed_command_line(), | 1225 PrefService* local_state = InitializeLocalState(parsed_command_line(), |
1233 is_first_run); | 1226 is_first_run); |
1234 | 1227 |
1235 #if defined(USE_LINUX_BREAKPAD) | 1228 #if defined(USE_LINUX_BREAKPAD) |
1236 // Needs to be called after we have chrome::DIR_USER_DATA and | 1229 // Needs to be called after we have chrome::DIR_USER_DATA and |
(...skipping 889 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2126 if (env->GetVar(chrome::kPreReadEnvironmentVariable, &pre_read) && | 2119 if (env->GetVar(chrome::kPreReadEnvironmentVariable, &pre_read) && |
2127 (pre_read == "0" || pre_read == "1")) { | 2120 (pre_read == "0" || pre_read == "1")) { |
2128 std::string uma_name(name); | 2121 std::string uma_name(name); |
2129 uma_name += "_PreRead"; | 2122 uma_name += "_PreRead"; |
2130 uma_name += pre_read == "1" ? "Enabled" : "Disabled"; | 2123 uma_name += pre_read == "1" ? "Enabled" : "Disabled"; |
2131 AddPreReadHistogramTime(uma_name.c_str(), time); | 2124 AddPreReadHistogramTime(uma_name.c_str(), time); |
2132 } | 2125 } |
2133 #endif | 2126 #endif |
2134 #endif | 2127 #endif |
2135 } | 2128 } |
OLD | NEW |