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

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

Issue 8499050: Change command line switch for controlling profiling (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 | « no previous file | 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 1200 matching lines...) Expand 10 before | Expand all | Expand 10 after
1211 parsed_command_line().HasSwitch(switches::kImportFromFile)) { 1211 parsed_command_line().HasSwitch(switches::kImportFromFile)) {
1212 // We use different BrowserProcess when importing so no GoogleURLTracker is 1212 // We use different BrowserProcess when importing so no GoogleURLTracker is
1213 // instantiated (as it makes a net::URLRequest and we don't have an IO 1213 // instantiated (as it makes a net::URLRequest and we don't have an IO
1214 // thread, see bug #1292702). 1214 // thread, see bug #1292702).
1215 browser_process_.reset(new FirstRunBrowserProcess(parsed_command_line())); 1215 browser_process_.reset(new FirstRunBrowserProcess(parsed_command_line()));
1216 is_first_run = false; 1216 is_first_run = false;
1217 } else { 1217 } else {
1218 browser_process_.reset(new BrowserProcessImpl(parsed_command_line())); 1218 browser_process_.reset(new BrowserProcessImpl(parsed_command_line()));
1219 } 1219 }
1220 1220
1221 if (parsed_command_line().HasSwitch(switches::kEnableTracking)) { 1221 if (parsed_command_line().HasSwitch(switches::kEnableProfiling)) {
1222 // User wants to override default tracking status. 1222 // User wants to override default tracking status.
1223 std::string flag = 1223 std::string flag =
1224 parsed_command_line().GetSwitchValueASCII(switches::kEnableTracking); 1224 parsed_command_line().GetSwitchValueASCII(switches::kEnableProfiling);
1225 bool enabled = flag.compare("0") != 0; 1225 bool enabled = flag.compare("0") != 0;
1226 tracked_objects::ThreadData::InitializeAndSetTrackingStatus(enabled); 1226 tracked_objects::ThreadData::InitializeAndSetTrackingStatus(enabled);
1227 } 1227 }
1228 1228
1229 // This forces the TabCloseableStateWatcher to be created and, on chromeos, 1229 // This forces the TabCloseableStateWatcher to be created and, on chromeos,
1230 // register for the notifications it needs to track the closeable state of 1230 // register for the notifications it needs to track the closeable state of
1231 // tabs. 1231 // tabs.
1232 g_browser_process->tab_closeable_state_watcher(); 1232 g_browser_process->tab_closeable_state_watcher();
1233 1233
1234 PrefService* local_state = InitializeLocalState(parsed_command_line(), 1234 PrefService* local_state = InitializeLocalState(parsed_command_line(),
(...skipping 849 matching lines...) Expand 10 before | Expand all | Expand 10 after
2084 if (env->GetVar(chrome::kPreReadEnvironmentVariable, &pre_read) && 2084 if (env->GetVar(chrome::kPreReadEnvironmentVariable, &pre_read) &&
2085 (pre_read == "0" || pre_read == "1")) { 2085 (pre_read == "0" || pre_read == "1")) {
2086 std::string uma_name(name); 2086 std::string uma_name(name);
2087 uma_name += "_PreRead"; 2087 uma_name += "_PreRead";
2088 uma_name += pre_read == "1" ? "Enabled" : "Disabled"; 2088 uma_name += pre_read == "1" ? "Enabled" : "Disabled";
2089 AddPreReadHistogramTime(uma_name.c_str(), time); 2089 AddPreReadHistogramTime(uma_name.c_str(), time);
2090 } 2090 }
2091 #endif 2091 #endif
2092 #endif 2092 #endif
2093 } 2093 }
OLDNEW
« no previous file with comments | « no previous file | chrome/common/chrome_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698