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

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 "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 974 matching lines...) Expand 10 before | Expand all | Expand 10 after
1103 1104
1104 int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { 1105 int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
1105 TRACE_EVENT0("startup", "ChromeBrowserMainParts::PreMainMessageLoopRunImpl"); 1106 TRACE_EVENT0("startup", "ChromeBrowserMainParts::PreMainMessageLoopRunImpl");
1106 // Android updates the metrics service dynamically depending on whether the 1107 // Android updates the metrics service dynamically depending on whether the
1107 // application is in the foreground or not. Do not start here. 1108 // application is in the foreground or not. Do not start here.
1108 #if !defined(OS_ANDROID) 1109 #if !defined(OS_ANDROID)
1109 // Now that the file thread has been started, start recording. 1110 // Now that the file thread has been started, start recording.
1110 StartMetricsRecording(); 1111 StartMetricsRecording();
1111 #endif 1112 #endif
1112 1113
1114 browser_process_->rappor_service()->Start(
1115 browser_process_->local_state(),
1116 browser_process_->system_request_context());
1117
1113 // Create watchdog thread after creating all other threads because it will 1118 // Create watchdog thread after creating all other threads because it will
1114 // watch the other threads and they must be running. 1119 // watch the other threads and they must be running.
1115 browser_process_->watchdog_thread(); 1120 browser_process_->watchdog_thread();
1116 1121
1117 // Do any initializating in the browser process that requires all threads 1122 // Do any initializating in the browser process that requires all threads
1118 // running. 1123 // running.
1119 browser_process_->PreMainMessageLoopRun(); 1124 browser_process_->PreMainMessageLoopRun();
1120 1125
1121 // Record last shutdown time into a histogram. 1126 // Record last shutdown time into a histogram.
1122 browser_shutdown::ReadLastShutdownInfo(); 1127 browser_shutdown::ReadLastShutdownInfo();
(...skipping 574 matching lines...) Expand 10 before | Expand all | Expand 10 after
1697 chromeos::CrosSettings::Shutdown(); 1702 chromeos::CrosSettings::Shutdown();
1698 #endif 1703 #endif
1699 #endif 1704 #endif
1700 } 1705 }
1701 1706
1702 // Public members: 1707 // Public members:
1703 1708
1704 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { 1709 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) {
1705 chrome_extra_parts_.push_back(parts); 1710 chrome_extra_parts_.push_back(parts);
1706 } 1711 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698