| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 #include "chrome/browser/search_engines/template_url.h" | 74 #include "chrome/browser/search_engines/template_url.h" |
| 75 #include "chrome/browser/search_engines/template_url_prepopulate_data.h" | 75 #include "chrome/browser/search_engines/template_url_prepopulate_data.h" |
| 76 #include "chrome/browser/search_engines/template_url_service.h" | 76 #include "chrome/browser/search_engines/template_url_service.h" |
| 77 #include "chrome/browser/search_engines/template_url_service_factory.h" | 77 #include "chrome/browser/search_engines/template_url_service_factory.h" |
| 78 #include "chrome/browser/service/service_process_control.h" | 78 #include "chrome/browser/service/service_process_control.h" |
| 79 #include "chrome/browser/shell_integration.h" | 79 #include "chrome/browser/shell_integration.h" |
| 80 #include "chrome/browser/translate/translate_manager.h" | 80 #include "chrome/browser/translate/translate_manager.h" |
| 81 #include "chrome/browser/ui/browser.h" | 81 #include "chrome/browser/ui/browser.h" |
| 82 #include "chrome/browser/ui/browser_init.h" | 82 #include "chrome/browser/ui/browser_init.h" |
| 83 #include "chrome/browser/ui/webui/chrome_url_data_manager_backend.h" | 83 #include "chrome/browser/ui/webui/chrome_url_data_manager_backend.h" |
| 84 #include "chrome/browser/ui/webui/ntp/new_tab_ui.h" | |
| 85 #include "chrome/common/child_process_logging.h" | 84 #include "chrome/common/child_process_logging.h" |
| 86 #include "chrome/common/chrome_constants.h" | 85 #include "chrome/common/chrome_constants.h" |
| 87 #include "chrome/common/chrome_paths.h" | 86 #include "chrome/common/chrome_paths.h" |
| 88 #include "chrome/common/chrome_result_codes.h" | 87 #include "chrome/common/chrome_result_codes.h" |
| 89 #include "chrome/common/chrome_switches.h" | 88 #include "chrome/common/chrome_switches.h" |
| 90 #include "chrome/common/chrome_version_info.h" | 89 #include "chrome/common/chrome_version_info.h" |
| 91 #include "chrome/common/env_vars.h" | 90 #include "chrome/common/env_vars.h" |
| 92 #include "chrome/common/json_pref_store.h" | 91 #include "chrome/common/json_pref_store.h" |
| 93 #include "chrome/common/jstemplate_builder.h" | 92 #include "chrome/common/jstemplate_builder.h" |
| 94 #include "chrome/common/logging_chrome.h" | 93 #include "chrome/common/logging_chrome.h" |
| (...skipping 1011 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1106 InstantFieldTrial::Activate(); | 1105 InstantFieldTrial::Activate(); |
| 1107 SpdyFieldTrial(); | 1106 SpdyFieldTrial(); |
| 1108 ConnectBackupJobsFieldTrial(); | 1107 ConnectBackupJobsFieldTrial(); |
| 1109 WarmConnectionFieldTrial(); | 1108 WarmConnectionFieldTrial(); |
| 1110 PredictorFieldTrial(); | 1109 PredictorFieldTrial(); |
| 1111 DefaultAppsFieldTrial(); | 1110 DefaultAppsFieldTrial(); |
| 1112 AutoLaunchChromeFieldTrial(); | 1111 AutoLaunchChromeFieldTrial(); |
| 1113 DomainBoundCertsFieldTrial(); | 1112 DomainBoundCertsFieldTrial(); |
| 1114 SetupUniformityFieldTrials(); | 1113 SetupUniformityFieldTrials(); |
| 1115 AutocompleteFieldTrial::Activate(); | 1114 AutocompleteFieldTrial::Activate(); |
| 1116 NewTabUI::SetupFieldTrials(); | |
| 1117 } | 1115 } |
| 1118 | 1116 |
| 1119 void ChromeBrowserMainParts::StartMetricsRecording() { | 1117 void ChromeBrowserMainParts::StartMetricsRecording() { |
| 1120 MetricsService* metrics = g_browser_process->metrics_service(); | 1118 MetricsService* metrics = g_browser_process->metrics_service(); |
| 1121 if (parsed_command_line_.HasSwitch(switches::kMetricsRecordingOnly) || | 1119 if (parsed_command_line_.HasSwitch(switches::kMetricsRecordingOnly) || |
| 1122 parsed_command_line_.HasSwitch(switches::kEnableBenchmarking)) { | 1120 parsed_command_line_.HasSwitch(switches::kEnableBenchmarking)) { |
| 1123 // If we're testing then we don't care what the user preference is, we turn | 1121 // If we're testing then we don't care what the user preference is, we turn |
| 1124 // on recording, but not reporting, otherwise tests fail. | 1122 // on recording, but not reporting, otherwise tests fail. |
| 1125 metrics->StartRecordingOnly(); | 1123 metrics->StartRecordingOnly(); |
| 1126 return; | 1124 return; |
| (...skipping 882 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2009 if (base::win::GetVersion() <= base::win::VERSION_XP) | 2007 if (base::win::GetVersion() <= base::win::VERSION_XP) |
| 2010 uma_name += "_XP"; | 2008 uma_name += "_XP"; |
| 2011 | 2009 |
| 2012 uma_name += "_PreRead_"; | 2010 uma_name += "_PreRead_"; |
| 2013 uma_name += pre_read_percentage; | 2011 uma_name += pre_read_percentage; |
| 2014 AddPreReadHistogramTime(uma_name.c_str(), time); | 2012 AddPreReadHistogramTime(uma_name.c_str(), time); |
| 2015 } | 2013 } |
| 2016 #endif | 2014 #endif |
| 2017 #endif | 2015 #endif |
| 2018 } | 2016 } |
| OLD | NEW |