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

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
« no previous file with comments | « chrome/browser/browser_process_impl.cc ('k') | chrome/browser/prefs/browser_prefs.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) 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 "components/translate/core/browser/translate_download_manager.h" 121 #include "components/translate/core/browser/translate_download_manager.h"
121 #include "content/public/browser/browser_thread.h" 122 #include "content/public/browser/browser_thread.h"
122 #include "content/public/browser/notification_observer.h" 123 #include "content/public/browser/notification_observer.h"
123 #include "content/public/browser/notification_registrar.h" 124 #include "content/public/browser/notification_registrar.h"
124 #include "content/public/browser/notification_service.h" 125 #include "content/public/browser/notification_service.h"
125 #include "content/public/browser/notification_types.h" 126 #include "content/public/browser/notification_types.h"
126 #include "content/public/browser/site_instance.h" 127 #include "content/public/browser/site_instance.h"
127 #include "content/public/common/content_client.h" 128 #include "content/public/common/content_client.h"
128 #include "content/public/common/content_switches.h" 129 #include "content/public/common/content_switches.h"
(...skipping 981 matching lines...) Expand 10 before | Expand all | Expand 10 after
1110 1111
1111 int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { 1112 int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
1112 TRACE_EVENT0("startup", "ChromeBrowserMainParts::PreMainMessageLoopRunImpl"); 1113 TRACE_EVENT0("startup", "ChromeBrowserMainParts::PreMainMessageLoopRunImpl");
1113 // Android updates the metrics service dynamically depending on whether the 1114 // Android updates the metrics service dynamically depending on whether the
1114 // application is in the foreground or not. Do not start here. 1115 // application is in the foreground or not. Do not start here.
1115 #if !defined(OS_ANDROID) 1116 #if !defined(OS_ANDROID)
1116 // Now that the file thread has been started, start recording. 1117 // Now that the file thread has been started, start recording.
1117 StartMetricsRecording(); 1118 StartMetricsRecording();
1118 #endif 1119 #endif
1119 1120
1121 browser_process_->rappor_service()->Start(
1122 browser_process_->local_state(),
1123 browser_process_->system_request_context());
1124
1120 // Create watchdog thread after creating all other threads because it will 1125 // Create watchdog thread after creating all other threads because it will
1121 // watch the other threads and they must be running. 1126 // watch the other threads and they must be running.
1122 browser_process_->watchdog_thread(); 1127 browser_process_->watchdog_thread();
1123 1128
1124 // Do any initializating in the browser process that requires all threads 1129 // Do any initializating in the browser process that requires all threads
1125 // running. 1130 // running.
1126 browser_process_->PreMainMessageLoopRun(); 1131 browser_process_->PreMainMessageLoopRun();
1127 1132
1128 // Record last shutdown time into a histogram. 1133 // Record last shutdown time into a histogram.
1129 browser_shutdown::ReadLastShutdownInfo(); 1134 browser_shutdown::ReadLastShutdownInfo();
(...skipping 576 matching lines...) Expand 10 before | Expand all | Expand 10 after
1706 chromeos::CrosSettings::Shutdown(); 1711 chromeos::CrosSettings::Shutdown();
1707 #endif 1712 #endif
1708 #endif 1713 #endif
1709 } 1714 }
1710 1715
1711 // Public members: 1716 // Public members:
1712 1717
1713 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { 1718 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) {
1714 chrome_extra_parts_.push_back(parts); 1719 chrome_extra_parts_.push_back(parts);
1715 } 1720 }
OLDNEW
« no previous file with comments | « chrome/browser/browser_process_impl.cc ('k') | chrome/browser/prefs/browser_prefs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698