Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(223)

Side by Side Diff: chrome/browser/chrome_browser_main.cc

Issue 8429009: Enable tracking of objects by default (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/chrome_browser_main.h ('k') | chrome/common/chrome_switches.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1205 matching lines...) Expand 10 before | Expand all | Expand 10 after
1216 parsed_command_line().HasSwitch(switches::kImportFromFile)) { 1216 parsed_command_line().HasSwitch(switches::kImportFromFile)) {
1217 // We use different BrowserProcess when importing so no GoogleURLTracker is 1217 // We use different BrowserProcess when importing so no GoogleURLTracker is
1218 // instantiated (as it makes a net::URLRequest and we don't have an IO 1218 // instantiated (as it makes a net::URLRequest and we don't have an IO
1219 // thread, see bug #1292702). 1219 // thread, see bug #1292702).
1220 browser_process_.reset(new FirstRunBrowserProcess(parsed_command_line())); 1220 browser_process_.reset(new FirstRunBrowserProcess(parsed_command_line()));
1221 is_first_run = false; 1221 is_first_run = false;
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::kEnableTracking)) {
1227 // User wants to override default tracking status.
1228 std::string flag =
1229 parsed_command_line().GetSwitchValueASCII(switches::kEnableTracking);
1230 bool enabled = flag.compare("0") != 0;
1231 tracked_objects::ThreadData::InitializeAndSetTrackingStatus(enabled);
1232 }
1233
1226 // This forces the TabCloseableStateWatcher to be created and, on chromeos, 1234 // This forces the TabCloseableStateWatcher to be created and, on chromeos,
1227 // 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
1228 // tabs. 1236 // tabs.
1229 g_browser_process->tab_closeable_state_watcher(); 1237 g_browser_process->tab_closeable_state_watcher();
1230 1238
1231 PrefService* local_state = InitializeLocalState(parsed_command_line(), 1239 PrefService* local_state = InitializeLocalState(parsed_command_line(),
1232 is_first_run); 1240 is_first_run);
1233 1241
1234 #if defined(USE_LINUX_BREAKPAD) 1242 #if defined(USE_LINUX_BREAKPAD)
1235 // Needs to be called after we have chrome::DIR_USER_DATA and 1243 // Needs to be called after we have chrome::DIR_USER_DATA and
(...skipping 889 matching lines...) Expand 10 before | Expand all | Expand 10 after
2125 if (env->GetVar(chrome::kPreReadEnvironmentVariable, &pre_read) && 2133 if (env->GetVar(chrome::kPreReadEnvironmentVariable, &pre_read) &&
2126 (pre_read == "0" || pre_read == "1")) { 2134 (pre_read == "0" || pre_read == "1")) {
2127 std::string uma_name(name); 2135 std::string uma_name(name);
2128 uma_name += "_PreRead"; 2136 uma_name += "_PreRead";
2129 uma_name += pre_read == "1" ? "Enabled" : "Disabled"; 2137 uma_name += pre_read == "1" ? "Enabled" : "Disabled";
2130 AddPreReadHistogramTime(uma_name.c_str(), time); 2138 AddPreReadHistogramTime(uma_name.c_str(), time);
2131 } 2139 }
2132 #endif 2140 #endif
2133 #endif 2141 #endif
2134 } 2142 }
OLDNEW
« no previous file with comments | « chrome/browser/chrome_browser_main.h ('k') | chrome/common/chrome_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698