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

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

Issue 7980011: Convert the PluginService interface to be an async wrapper around PluginList. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: New interface as discussed Created 9 years, 3 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 | 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 // This file defines a service that collects information about the user 5 // This file defines a service that collects information about the user
6 // experience in order to help improve future versions of the app. 6 // experience in order to help improve future versions of the app.
7 7
8 #ifndef CHROME_BROWSER_METRICS_METRICS_SERVICE_H_ 8 #ifndef CHROME_BROWSER_METRICS_METRICS_SERVICE_H_
9 #define CHROME_BROWSER_METRICS_METRICS_SERVICE_H_ 9 #define CHROME_BROWSER_METRICS_METRICS_SERVICE_H_
10 #pragma once 10 #pragma once
(...skipping 20 matching lines...) Expand all
31 class HistogramSynchronizer; 31 class HistogramSynchronizer;
32 class MetricsLogBase; 32 class MetricsLogBase;
33 class MetricsReportingScheduler; 33 class MetricsReportingScheduler;
34 class PrefService; 34 class PrefService;
35 class Profile; 35 class Profile;
36 class TemplateURLService; 36 class TemplateURLService;
37 37
38 namespace base { 38 namespace base {
39 class DictionaryValue; 39 class DictionaryValue;
40 class ListValue; 40 class ListValue;
41 class MessageLoopProxy;
41 } 42 }
42 43
43 namespace prerender { 44 namespace prerender {
44 bool IsOmniboxEnabled(Profile* profile); 45 bool IsOmniboxEnabled(Profile* profile);
45 } 46 }
46 47
47 namespace webkit { 48 namespace webkit {
48 struct WebPluginInfo; 49 struct WebPluginInfo;
49 } 50 }
50 51
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 SEND_OLD_INITIAL_LOGS, // Sending unsent logs from previous session. 159 SEND_OLD_INITIAL_LOGS, // Sending unsent logs from previous session.
159 SENDING_OLD_LOGS, // Sending unsent logs from previous session. 160 SENDING_OLD_LOGS, // Sending unsent logs from previous session.
160 SENDING_CURRENT_LOGS, // Sending standard current logs as they acrue. 161 SENDING_CURRENT_LOGS, // Sending standard current logs as they acrue.
161 }; 162 };
162 163
163 enum ShutdownCleanliness { 164 enum ShutdownCleanliness {
164 CLEANLY_SHUTDOWN = 0xdeadbeef, 165 CLEANLY_SHUTDOWN = 0xdeadbeef,
165 NEED_TO_SHUTDOWN = ~CLEANLY_SHUTDOWN 166 NEED_TO_SHUTDOWN = ~CLEANLY_SHUTDOWN
166 }; 167 };
167 168
168 class InitTask; 169 // First part of the init task. Called on the FILE thread to load hardware
169 class InitTaskComplete; 170 // class information.
171 void InitTaskGetHardwareClass(base::MessageLoopProxy* target_loop);
170 172
171 // Callback to let us know that the init task is done. 173 // Callback from InitTaskGetHardwareClass() that continues the init task by
172 void OnInitTaskComplete( 174 // loading plugin information.
173 const std::string& hardware_class, 175 void OnInitTaskGotHardwareClass(const std::string& hardware_class);
174 const std::vector<webkit::WebPluginInfo>& plugins); 176
177 // Callback from PluginService::GetPlugins() that moves the state to
178 // INIT_TASK_DONE.
179 void OnInitTaskPluginsLoaded();
175 180
176 // When we start a new version of Chromium (different from our last run), we 181 // When we start a new version of Chromium (different from our last run), we
177 // need to discard the old crash stats so that we don't attribute crashes etc. 182 // need to discard the old crash stats so that we don't attribute crashes etc.
178 // in the old version to the current version (via current logs). 183 // in the old version to the current version (via current logs).
179 // Without this, a common reason to finally start a new version is to crash 184 // Without this, a common reason to finally start a new version is to crash
180 // the old version (after an autoupdate has arrived), and so we'd bias 185 // the old version (after an autoupdate has arrived), and so we'd bias
181 // initial results towards showing crashes :-(. 186 // initial results towards showing crashes :-(.
182 static void DiscardOldStabilityStats(PrefService* local_state); 187 static void DiscardOldStabilityStats(PrefService* local_state);
183 188
184 // Sets and gets whether metrics recording is active. 189 // Sets and gets whether metrics recording is active.
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
464 friend class InstantFieldTrial; 469 friend class InstantFieldTrial;
465 friend bool prerender::IsOmniboxEnabled(Profile* profile); 470 friend bool prerender::IsOmniboxEnabled(Profile* profile);
466 471
467 // Returns true if prefs::kMetricsReportingEnabled is set. 472 // Returns true if prefs::kMetricsReportingEnabled is set.
468 static bool IsMetricsReportingEnabled(); 473 static bool IsMetricsReportingEnabled();
469 474
470 DISALLOW_IMPLICIT_CONSTRUCTORS(MetricsServiceHelper); 475 DISALLOW_IMPLICIT_CONSTRUCTORS(MetricsServiceHelper);
471 }; 476 };
472 477
473 #endif // CHROME_BROWSER_METRICS_METRICS_SERVICE_H_ 478 #endif // CHROME_BROWSER_METRICS_METRICS_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698