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

Side by Side Diff: chrome/browser/metrics/metrics_service.cc

Issue 9006036: Create an API around PluginService and use it from Chrome. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years 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 | Annotate | Revision Log
OLDNEW
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 //------------------------------------------------------------------------------ 5 //------------------------------------------------------------------------------
6 // Description of the life cycle of a instance of MetricsService. 6 // Description of the life cycle of a instance of MetricsService.
7 // 7 //
8 // OVERVIEW 8 // OVERVIEW
9 // 9 //
10 // A MetricsService instance is typically created at application startup. It 10 // A MetricsService instance is typically created at application startup. It
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 #include "chrome/browser/search_engines/template_url_service.h" 170 #include "chrome/browser/search_engines/template_url_service.h"
171 #include "chrome/browser/ui/browser_list.h" 171 #include "chrome/browser/ui/browser_list.h"
172 #include "chrome/common/child_process_logging.h" 172 #include "chrome/common/child_process_logging.h"
173 #include "chrome/common/chrome_notification_types.h" 173 #include "chrome/common/chrome_notification_types.h"
174 #include "chrome/common/chrome_switches.h" 174 #include "chrome/common/chrome_switches.h"
175 #include "chrome/common/guid.h" 175 #include "chrome/common/guid.h"
176 #include "chrome/common/metrics_log_manager.h" 176 #include "chrome/common/metrics_log_manager.h"
177 #include "chrome/common/pref_names.h" 177 #include "chrome/common/pref_names.h"
178 #include "chrome/common/render_messages.h" 178 #include "chrome/common/render_messages.h"
179 #include "content/browser/load_notification_details.h" 179 #include "content/browser/load_notification_details.h"
180 #include "content/browser/plugin_service.h"
181 #include "content/public/browser/notification_service.h" 180 #include "content/public/browser/notification_service.h"
181 #include "content/public/browser/plugin_service.h"
182 #include "content/public/browser/render_process_host.h" 182 #include "content/public/browser/render_process_host.h"
183 #include "content/public/common/url_fetcher.h" 183 #include "content/public/common/url_fetcher.h"
184 #include "webkit/plugins/webplugininfo.h" 184 #include "webkit/plugins/webplugininfo.h"
185 185
186 // TODO(port): port browser_distribution.h. 186 // TODO(port): port browser_distribution.h.
187 #if !defined(OS_POSIX) 187 #if !defined(OS_POSIX)
188 #include "chrome/installer/util/browser_distribution.h" 188 #include "chrome/installer/util/browser_distribution.h"
189 #endif 189 #endif
190 190
191 #if defined(OS_CHROMEOS) 191 #if defined(OS_CHROMEOS)
192 #include "chrome/browser/chromeos/cros/cros_library.h" 192 #include "chrome/browser/chromeos/cros/cros_library.h"
193 #include "chrome/browser/chromeos/external_metrics.h" 193 #include "chrome/browser/chromeos/external_metrics.h"
194 #include "chrome/browser/chromeos/system/statistics_provider.h" 194 #include "chrome/browser/chromeos/system/statistics_provider.h"
195 #endif 195 #endif
196 196
197 using base::Time; 197 using base::Time;
198 using content::BrowserThread; 198 using content::BrowserThread;
199 using content::PluginService;
199 200
200 // Check to see that we're being called on only one thread. 201 // Check to see that we're being called on only one thread.
201 static bool IsSingleThreaded(); 202 static bool IsSingleThreaded();
202 203
203 static const char kMetricsType[] = "application/vnd.mozilla.metrics.bz2"; 204 static const char kMetricsType[] = "application/vnd.mozilla.metrics.bz2";
204 205
205 // The delay, in seconds, after starting recording before doing expensive 206 // The delay, in seconds, after starting recording before doing expensive
206 // initialization work. 207 // initialization work.
207 static const int kInitializationDelaySeconds = 30; 208 static const int kInitializationDelaySeconds = 30;
208 209
(...skipping 1344 matching lines...) Expand 10 before | Expand all | Expand 10 after
1553 if (local_state) { 1554 if (local_state) {
1554 const PrefService::Preference* uma_pref = 1555 const PrefService::Preference* uma_pref =
1555 local_state->FindPreference(prefs::kMetricsReportingEnabled); 1556 local_state->FindPreference(prefs::kMetricsReportingEnabled);
1556 if (uma_pref) { 1557 if (uma_pref) {
1557 bool success = uma_pref->GetValue()->GetAsBoolean(&result); 1558 bool success = uma_pref->GetValue()->GetAsBoolean(&result);
1558 DCHECK(success); 1559 DCHECK(success);
1559 } 1560 }
1560 } 1561 }
1561 return result; 1562 return result;
1562 } 1563 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/file_manager_util.cc ('k') | chrome/browser/plugin_data_remover_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698