| 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 #include "chrome/browser/google/google_url_tracker.h" | 42 #include "chrome/browser/google/google_url_tracker.h" |
| 43 #include "chrome/browser/google/google_util.h" | 43 #include "chrome/browser/google/google_util.h" |
| 44 #include "chrome/browser/instant/instant_field_trial.h" | 44 #include "chrome/browser/instant/instant_field_trial.h" |
| 45 #include "chrome/browser/jankometer.h" | 45 #include "chrome/browser/jankometer.h" |
| 46 #include "chrome/browser/language_usage_metrics.h" | 46 #include "chrome/browser/language_usage_metrics.h" |
| 47 #include "chrome/browser/metrics/field_trial_synchronizer.h" | 47 #include "chrome/browser/metrics/field_trial_synchronizer.h" |
| 48 #include "chrome/browser/metrics/histogram_synchronizer.h" | 48 #include "chrome/browser/metrics/histogram_synchronizer.h" |
| 49 #include "chrome/browser/metrics/metrics_log.h" | 49 #include "chrome/browser/metrics/metrics_log.h" |
| 50 #include "chrome/browser/metrics/metrics_service.h" | 50 #include "chrome/browser/metrics/metrics_service.h" |
| 51 #include "chrome/browser/metrics/thread_watcher.h" | 51 #include "chrome/browser/metrics/thread_watcher.h" |
| 52 #include "chrome/browser/metrics/tracking_synchronizer.h" |
| 52 #include "chrome/browser/net/chrome_dns_cert_provenance_checker.h" | 53 #include "chrome/browser/net/chrome_dns_cert_provenance_checker.h" |
| 53 #include "chrome/browser/net/chrome_dns_cert_provenance_checker_factory.h" | 54 #include "chrome/browser/net/chrome_dns_cert_provenance_checker_factory.h" |
| 54 #include "chrome/browser/net/chrome_net_log.h" | 55 #include "chrome/browser/net/chrome_net_log.h" |
| 55 #include "chrome/browser/net/predictor.h" | 56 #include "chrome/browser/net/predictor.h" |
| 56 #include "chrome/browser/plugin_prefs.h" | 57 #include "chrome/browser/plugin_prefs.h" |
| 57 #include "chrome/browser/policy/browser_policy_connector.h" | 58 #include "chrome/browser/policy/browser_policy_connector.h" |
| 58 #include "chrome/browser/prefs/pref_service.h" | 59 #include "chrome/browser/prefs/pref_service.h" |
| 59 #include "chrome/browser/prefs/pref_value_store.h" | 60 #include "chrome/browser/prefs/pref_value_store.h" |
| 60 #include "chrome/browser/prerender/prerender_field_trial.h" | 61 #include "chrome/browser/prerender/prerender_field_trial.h" |
| 61 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service.h" | 62 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service.h" |
| (...skipping 1328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1390 child_process_logging::SetCommandLine(CommandLine::ForCurrentProcess()); | 1391 child_process_logging::SetCommandLine(CommandLine::ForCurrentProcess()); |
| 1391 | 1392 |
| 1392 InitializeNetworkOptions(parsed_command_line()); | 1393 InitializeNetworkOptions(parsed_command_line()); |
| 1393 InitializeURLRequestThrottlerManager(browser_process_->net_log()); | 1394 InitializeURLRequestThrottlerManager(browser_process_->net_log()); |
| 1394 | 1395 |
| 1395 // Initialize histogram synchronizer system. This is a singleton and is used | 1396 // Initialize histogram synchronizer system. This is a singleton and is used |
| 1396 // for posting tasks via NewRunnableMethod. Its deleted when it goes out of | 1397 // for posting tasks via NewRunnableMethod. Its deleted when it goes out of |
| 1397 // scope. Even though NewRunnableMethod does AddRef and Release, the object | 1398 // scope. Even though NewRunnableMethod does AddRef and Release, the object |
| 1398 // will not be deleted after the Task is executed. | 1399 // will not be deleted after the Task is executed. |
| 1399 histogram_synchronizer_ = new HistogramSynchronizer(); | 1400 histogram_synchronizer_ = new HistogramSynchronizer(); |
| 1401 tracking_synchronizer_ = new chrome_browser_metrics::TrackingSynchronizer(); |
| 1400 | 1402 |
| 1401 // Now the command line has been mutated based on about:flags, we can | 1403 // Now the command line has been mutated based on about:flags, we can |
| 1402 // set up metrics and initialize field trials. | 1404 // set up metrics and initialize field trials. |
| 1403 MetricsService* metrics = SetupMetricsAndFieldTrials(local_state); | 1405 MetricsService* metrics = SetupMetricsAndFieldTrials(local_state); |
| 1404 | 1406 |
| 1405 #if defined(USE_WEBKIT_COMPOSITOR) | 1407 #if defined(USE_WEBKIT_COMPOSITOR) |
| 1406 // We need to ensure WebKit has been initialized before we start the WebKit | 1408 // We need to ensure WebKit has been initialized before we start the WebKit |
| 1407 // compositor. This is done by the ResourceDispatcherHost on creation. | 1409 // compositor. This is done by the ResourceDispatcherHost on creation. |
| 1408 g_browser_process->resource_dispatcher_host(); | 1410 g_browser_process->resource_dispatcher_host(); |
| 1409 #endif | 1411 #endif |
| (...skipping 725 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2135 if (env->GetVar(chrome::kPreReadEnvironmentVariable, &pre_read) && | 2137 if (env->GetVar(chrome::kPreReadEnvironmentVariable, &pre_read) && |
| 2136 (pre_read == "0" || pre_read == "1")) { | 2138 (pre_read == "0" || pre_read == "1")) { |
| 2137 std::string uma_name(name); | 2139 std::string uma_name(name); |
| 2138 uma_name += "_PreRead"; | 2140 uma_name += "_PreRead"; |
| 2139 uma_name += pre_read == "1" ? "Enabled" : "Disabled"; | 2141 uma_name += pre_read == "1" ? "Enabled" : "Disabled"; |
| 2140 AddPreReadHistogramTime(uma_name.c_str(), time); | 2142 AddPreReadHistogramTime(uma_name.c_str(), time); |
| 2141 } | 2143 } |
| 2142 #endif | 2144 #endif |
| 2143 #endif | 2145 #endif |
| 2144 } | 2146 } |
| OLD | NEW |