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

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

Issue 49753002: RAPPOR implementation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 10 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
OLDNEW
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 #if defined(TOOLKIT_GTK) 7 #if defined(TOOLKIT_GTK)
8 #include <gtk/gtk.h> 8 #include <gtk/gtk.h>
9 #endif 9 #endif
10 10
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 #include "chrome/common/env_vars.h" 109 #include "chrome/common/env_vars.h"
110 #include "chrome/common/logging_chrome.h" 110 #include "chrome/common/logging_chrome.h"
111 #include "chrome/common/net/net_resource_provider.h" 111 #include "chrome/common/net/net_resource_provider.h"
112 #include "chrome/common/pref_names.h" 112 #include "chrome/common/pref_names.h"
113 #include "chrome/common/profile_management_switches.h" 113 #include "chrome/common/profile_management_switches.h"
114 #include "chrome/common/profiling.h" 114 #include "chrome/common/profiling.h"
115 #include "chrome/installer/util/google_update_settings.h" 115 #include "chrome/installer/util/google_update_settings.h"
116 #include "components/language_usage_metrics/language_usage_metrics.h" 116 #include "components/language_usage_metrics/language_usage_metrics.h"
117 #include "components/nacl/browser/nacl_browser.h" 117 #include "components/nacl/browser/nacl_browser.h"
118 #include "components/nacl/browser/nacl_process_host.h" 118 #include "components/nacl/browser/nacl_process_host.h"
119 #include "components/rappor/rappor_service.h"
119 #include "components/startup_metric_utils/startup_metric_utils.h" 120 #include "components/startup_metric_utils/startup_metric_utils.h"
120 #include "content/public/browser/browser_thread.h" 121 #include "content/public/browser/browser_thread.h"
121 #include "content/public/browser/notification_observer.h" 122 #include "content/public/browser/notification_observer.h"
122 #include "content/public/browser/notification_registrar.h" 123 #include "content/public/browser/notification_registrar.h"
123 #include "content/public/browser/notification_service.h" 124 #include "content/public/browser/notification_service.h"
124 #include "content/public/browser/notification_types.h" 125 #include "content/public/browser/notification_types.h"
125 #include "content/public/browser/site_instance.h" 126 #include "content/public/browser/site_instance.h"
126 #include "content/public/common/content_client.h" 127 #include "content/public/common/content_client.h"
127 #include "content/public/common/content_switches.h" 128 #include "content/public/common/content_switches.h"
128 #include "content/public/common/main_function_params.h" 129 #include "content/public/common/main_function_params.h"
(...skipping 944 matching lines...) Expand 10 before | Expand all | Expand 10 after
1073 1074
1074 int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { 1075 int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
1075 TRACE_EVENT0("startup", "ChromeBrowserMainParts::PreMainMessageLoopRunImpl"); 1076 TRACE_EVENT0("startup", "ChromeBrowserMainParts::PreMainMessageLoopRunImpl");
1076 // Android updates the metrics service dynamically depending on whether the 1077 // Android updates the metrics service dynamically depending on whether the
1077 // application is in the foreground or not. Do not start here. 1078 // application is in the foreground or not. Do not start here.
1078 #if !defined(OS_ANDROID) 1079 #if !defined(OS_ANDROID)
1079 // Now that the file thread has been started, start recording. 1080 // Now that the file thread has been started, start recording.
1080 StartMetricsRecording(); 1081 StartMetricsRecording();
1081 #endif 1082 #endif
1082 1083
1084 browser_process_->rappor_service()->Start(
sky 2014/02/12 01:06:50 How will running this here effect startup?
Steven Holte 2014/02/12 04:02:55 If you mean in terms of start up time, it should b
1085 browser_process_->local_state(),
1086 browser_process_->system_request_context());
1087
1083 // Create watchdog thread after creating all other threads because it will 1088 // Create watchdog thread after creating all other threads because it will
1084 // watch the other threads and they must be running. 1089 // watch the other threads and they must be running.
1085 browser_process_->watchdog_thread(); 1090 browser_process_->watchdog_thread();
1086 1091
1087 // Do any initializating in the browser process that requires all threads 1092 // Do any initializating in the browser process that requires all threads
1088 // running. 1093 // running.
1089 browser_process_->PreMainMessageLoopRun(); 1094 browser_process_->PreMainMessageLoopRun();
1090 1095
1091 // Record last shutdown time into a histogram. 1096 // Record last shutdown time into a histogram.
1092 browser_shutdown::ReadLastShutdownInfo(); 1097 browser_shutdown::ReadLastShutdownInfo();
(...skipping 582 matching lines...) Expand 10 before | Expand all | Expand 10 after
1675 chromeos::CrosSettings::Shutdown(); 1680 chromeos::CrosSettings::Shutdown();
1676 #endif 1681 #endif
1677 #endif 1682 #endif
1678 } 1683 }
1679 1684
1680 // Public members: 1685 // Public members:
1681 1686
1682 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { 1687 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) {
1683 chrome_extra_parts_.push_back(parts); 1688 chrome_extra_parts_.push_back(parts);
1684 } 1689 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698