| 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 #include "chrome/browser/google/google_url_tracker.h" | 43 #include "chrome/browser/google/google_url_tracker.h" |
| 44 #include "chrome/browser/google/google_util.h" | 44 #include "chrome/browser/google/google_util.h" |
| 45 #include "chrome/browser/instant/instant_field_trial.h" | 45 #include "chrome/browser/instant/instant_field_trial.h" |
| 46 #include "chrome/browser/jankometer.h" | 46 #include "chrome/browser/jankometer.h" |
| 47 #include "chrome/browser/language_usage_metrics.h" | 47 #include "chrome/browser/language_usage_metrics.h" |
| 48 #include "chrome/browser/metrics/field_trial_synchronizer.h" | 48 #include "chrome/browser/metrics/field_trial_synchronizer.h" |
| 49 #include "chrome/browser/metrics/histogram_synchronizer.h" | 49 #include "chrome/browser/metrics/histogram_synchronizer.h" |
| 50 #include "chrome/browser/metrics/metrics_log.h" | 50 #include "chrome/browser/metrics/metrics_log.h" |
| 51 #include "chrome/browser/metrics/metrics_service.h" | 51 #include "chrome/browser/metrics/metrics_service.h" |
| 52 #include "chrome/browser/metrics/thread_watcher.h" | 52 #include "chrome/browser/metrics/thread_watcher.h" |
| 53 #include "chrome/browser/metrics/tracking_synchronizer.h" |
| 53 #include "chrome/browser/net/chrome_dns_cert_provenance_checker.h" | 54 #include "chrome/browser/net/chrome_dns_cert_provenance_checker.h" |
| 54 #include "chrome/browser/net/chrome_dns_cert_provenance_checker_factory.h" | 55 #include "chrome/browser/net/chrome_dns_cert_provenance_checker_factory.h" |
| 55 #include "chrome/browser/net/chrome_net_log.h" | 56 #include "chrome/browser/net/chrome_net_log.h" |
| 56 #include "chrome/browser/net/predictor.h" | 57 #include "chrome/browser/net/predictor.h" |
| 57 #include "chrome/browser/plugin_prefs.h" | 58 #include "chrome/browser/plugin_prefs.h" |
| 58 #include "chrome/browser/policy/browser_policy_connector.h" | 59 #include "chrome/browser/policy/browser_policy_connector.h" |
| 59 #include "chrome/browser/prefs/pref_service.h" | 60 #include "chrome/browser/prefs/pref_service.h" |
| 60 #include "chrome/browser/prefs/pref_value_store.h" | 61 #include "chrome/browser/prefs/pref_value_store.h" |
| 61 #include "chrome/browser/prerender/prerender_field_trial.h" | 62 #include "chrome/browser/prerender/prerender_field_trial.h" |
| 62 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service.h" | 63 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service.h" |
| (...skipping 1311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1374 child_process_logging::SetCommandLine(CommandLine::ForCurrentProcess()); | 1375 child_process_logging::SetCommandLine(CommandLine::ForCurrentProcess()); |
| 1375 | 1376 |
| 1376 InitializeNetworkOptions(parsed_command_line()); | 1377 InitializeNetworkOptions(parsed_command_line()); |
| 1377 InitializeURLRequestThrottlerManager(browser_process_->net_log()); | 1378 InitializeURLRequestThrottlerManager(browser_process_->net_log()); |
| 1378 | 1379 |
| 1379 // Initialize histogram synchronizer system. This is a singleton and is used | 1380 // Initialize histogram synchronizer system. This is a singleton and is used |
| 1380 // for posting tasks via NewRunnableMethod. Its deleted when it goes out of | 1381 // for posting tasks via NewRunnableMethod. Its deleted when it goes out of |
| 1381 // scope. Even though NewRunnableMethod does AddRef and Release, the object | 1382 // scope. Even though NewRunnableMethod does AddRef and Release, the object |
| 1382 // will not be deleted after the Task is executed. | 1383 // will not be deleted after the Task is executed. |
| 1383 histogram_synchronizer_ = new HistogramSynchronizer(); | 1384 histogram_synchronizer_ = new HistogramSynchronizer(); |
| 1385 tracking_synchronizer_ = new chrome_browser_metrics::TrackingSynchronizer(); |
| 1384 | 1386 |
| 1385 // Now the command line has been mutated based on about:flags, we can | 1387 // Now the command line has been mutated based on about:flags, we can |
| 1386 // set up metrics and initialize field trials. | 1388 // set up metrics and initialize field trials. |
| 1387 MetricsService* metrics = SetupMetricsAndFieldTrials(local_state); | 1389 MetricsService* metrics = SetupMetricsAndFieldTrials(local_state); |
| 1388 | 1390 |
| 1389 #if defined(USE_WEBKIT_COMPOSITOR) | 1391 #if defined(USE_WEBKIT_COMPOSITOR) |
| 1390 // We need to ensure WebKit has been initialized before we start the WebKit | 1392 // We need to ensure WebKit has been initialized before we start the WebKit |
| 1391 // compositor. This is done by the ResourceDispatcherHost on creation. | 1393 // compositor. This is done by the ResourceDispatcherHost on creation. |
| 1392 g_browser_process->resource_dispatcher_host(); | 1394 g_browser_process->resource_dispatcher_host(); |
| 1393 #endif | 1395 #endif |
| (...skipping 725 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2119 if (env->GetVar(chrome::kPreReadEnvironmentVariable, &pre_read) && | 2121 if (env->GetVar(chrome::kPreReadEnvironmentVariable, &pre_read) && |
| 2120 (pre_read == "0" || pre_read == "1")) { | 2122 (pre_read == "0" || pre_read == "1")) { |
| 2121 std::string uma_name(name); | 2123 std::string uma_name(name); |
| 2122 uma_name += "_PreRead"; | 2124 uma_name += "_PreRead"; |
| 2123 uma_name += pre_read == "1" ? "Enabled" : "Disabled"; | 2125 uma_name += pre_read == "1" ? "Enabled" : "Disabled"; |
| 2124 AddPreReadHistogramTime(uma_name.c_str(), time); | 2126 AddPreReadHistogramTime(uma_name.c_str(), time); |
| 2125 } | 2127 } |
| 2126 #endif | 2128 #endif |
| 2127 #endif | 2129 #endif |
| 2128 } | 2130 } |
| OLD | NEW |