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

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

Issue 8960010: base::Bind: Convert NewRunnableMethod in chrome/browser. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Build fix 55. Created 8 years, 12 months 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/cancelable_request.h ('k') | chrome/browser/chromeos/boot_times_loader.cc » ('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 598 matching lines...) Expand 10 before | Expand all | Expand 10 after
609 // Initialize FieldTrialList to support FieldTrials that use one-time 609 // Initialize FieldTrialList to support FieldTrials that use one-time
610 // randomization. The client ID will be empty if the user has not opted 610 // randomization. The client ID will be empty if the user has not opted
611 // to send metrics. 611 // to send metrics.
612 field_trial_list_.reset(new base::FieldTrialList(metrics->GetClientId())); 612 field_trial_list_.reset(new base::FieldTrialList(metrics->GetClientId()));
613 613
614 SetupFieldTrials(metrics->recording_active(), 614 SetupFieldTrials(metrics->recording_active(),
615 local_state->IsManagedPreference( 615 local_state->IsManagedPreference(
616 prefs::kMaxConnectionsPerProxy)); 616 prefs::kMaxConnectionsPerProxy));
617 617
618 // Initialize FieldTrialSynchronizer system. This is a singleton and is used 618 // Initialize FieldTrialSynchronizer system. This is a singleton and is used
619 // for posting tasks via NewRunnableMethod. Its deleted when it goes out of 619 // for posting tasks via base::Bind. Its deleted when it goes out of scope.
620 // scope. Even though NewRunnableMethod does AddRef and Release, the object 620 // Even though base::Bind does AddRef and Release, the object will not be
621 // will not be deleted after the Task is executed. 621 // deleted after the Task is executed.
622 field_trial_synchronizer_ = new FieldTrialSynchronizer(); 622 field_trial_synchronizer_ = new FieldTrialSynchronizer();
623 623
624 return metrics; 624 return metrics;
625 } 625 }
626 626
627 // This is an A/B test for the maximum number of persistent connections per 627 // This is an A/B test for the maximum number of persistent connections per
628 // host. Currently Chrome, Firefox, and IE8 have this value set at 6. Safari 628 // host. Currently Chrome, Firefox, and IE8 have this value set at 6. Safari
629 // uses 4, and Fasterfox (a plugin for Firefox that supposedly configures it to 629 // uses 4, and Fasterfox (a plugin for Firefox that supposedly configures it to
630 // run faster) uses 8. We would like to see how much of an effect this value has 630 // run faster) uses 8. We would like to see how much of an effect this value has
631 // on browsing. Too large a value might cause us to run into SYN flood detection 631 // on browsing. Too large a value might cause us to run into SYN flood detection
(...skipping 640 matching lines...) Expand 10 before | Expand all | Expand 10 after
1272 CommandLine::ForCurrentProcess()); 1272 CommandLine::ForCurrentProcess());
1273 1273
1274 // Reset the command line in the crash report details, since we may have 1274 // Reset the command line in the crash report details, since we may have
1275 // just changed it to include experiments. 1275 // just changed it to include experiments.
1276 child_process_logging::SetCommandLine(CommandLine::ForCurrentProcess()); 1276 child_process_logging::SetCommandLine(CommandLine::ForCurrentProcess());
1277 1277
1278 InitializeNetworkOptions(parsed_command_line()); 1278 InitializeNetworkOptions(parsed_command_line());
1279 InitializeURLRequestThrottlerManager(browser_process_->net_log()); 1279 InitializeURLRequestThrottlerManager(browser_process_->net_log());
1280 1280
1281 // Initialize histogram synchronizer system. This is a singleton and is used 1281 // Initialize histogram synchronizer system. This is a singleton and is used
1282 // for posting tasks via NewRunnableMethod. Its deleted when it goes out of 1282 // for posting tasks via base::Bind. Its deleted when it goes out of scope.
1283 // scope. Even though NewRunnableMethod does AddRef and Release, the object 1283 // Even though base::Bind does AddRef and Release, the object will not
1284 // will not be deleted after the Task is executed. 1284 // be deleted after the Task is executed.
1285 histogram_synchronizer_ = new HistogramSynchronizer(); 1285 histogram_synchronizer_ = new HistogramSynchronizer();
1286 tracking_synchronizer_ = new chrome_browser_metrics::TrackingSynchronizer(); 1286 tracking_synchronizer_ = new chrome_browser_metrics::TrackingSynchronizer();
1287 1287
1288 // Now that all preferences have been registered, set the install date 1288 // Now that all preferences have been registered, set the install date
1289 // for the uninstall metrics if this is our first run. This only actually 1289 // for the uninstall metrics if this is our first run. This only actually
1290 // gets used if the user has metrics reporting enabled at uninstall time. 1290 // gets used if the user has metrics reporting enabled at uninstall time.
1291 int64 install_date = 1291 int64 install_date =
1292 local_state_->GetInt64(prefs::kUninstallMetricsInstallDate); 1292 local_state_->GetInt64(prefs::kUninstallMetricsInstallDate);
1293 if (install_date == 0) { 1293 if (install_date == 0) {
1294 local_state_->SetInt64(prefs::kUninstallMetricsInstallDate, 1294 local_state_->SetInt64(prefs::kUninstallMetricsInstallDate,
(...skipping 687 matching lines...) Expand 10 before | Expand all | Expand 10 after
1982 if (base::win::GetVersion() <= base::win::VERSION_XP) 1982 if (base::win::GetVersion() <= base::win::VERSION_XP)
1983 uma_name += "_XP"; 1983 uma_name += "_XP";
1984 1984
1985 uma_name += "_PreRead"; 1985 uma_name += "_PreRead";
1986 uma_name += pre_read == "1" ? "Enabled" : "Disabled"; 1986 uma_name += pre_read == "1" ? "Enabled" : "Disabled";
1987 AddPreReadHistogramTime(uma_name.c_str(), time); 1987 AddPreReadHistogramTime(uma_name.c_str(), time);
1988 } 1988 }
1989 #endif 1989 #endif
1990 #endif 1990 #endif
1991 } 1991 }
OLDNEW
« no previous file with comments | « chrome/browser/cancelable_request.h ('k') | chrome/browser/chromeos/boot_times_loader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698