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

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

Issue 11570009: Split PrefService into PrefService, PrefServiceSimple and PrefServiceSyncable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address review comments. Created 8 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) 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 // This file defines a set of user experience metrics data recorded by 5 // This file defines a set of user experience metrics data recorded by
6 // the MetricsService. This is the unit of data that is sent to the server. 6 // the MetricsService. This is the unit of data that is sent to the server.
7 7
8 #ifndef CHROME_BROWSER_METRICS_METRICS_LOG_H_ 8 #ifndef CHROME_BROWSER_METRICS_METRICS_LOG_H_
9 #define CHROME_BROWSER_METRICS_METRICS_LOG_H_ 9 #define CHROME_BROWSER_METRICS_METRICS_LOG_H_
10 10
11 #include <string> 11 #include <string>
12 #include <vector> 12 #include <vector>
13 13
14 #include "base/basictypes.h" 14 #include "base/basictypes.h"
15 #include "chrome/common/metrics/metrics_log_base.h" 15 #include "chrome/common/metrics/metrics_log_base.h"
16 #include "chrome/installer/util/google_update_settings.h" 16 #include "chrome/installer/util/google_update_settings.h"
17 #include "content/public/common/process_type.h" 17 #include "content/public/common/process_type.h"
18 #include "ui/gfx/size.h" 18 #include "ui/gfx/size.h"
19 19
20 struct AutocompleteLog; 20 struct AutocompleteLog;
21 class PrefService; 21 class PrefService;
22 class PrefServiceSimple;
22 23
23 namespace base { 24 namespace base {
24 class DictionaryValue; 25 class DictionaryValue;
25 } 26 }
26 27
27 namespace tracked_objects { 28 namespace tracked_objects {
28 struct ProcessDataSnapshot; 29 struct ProcessDataSnapshot;
29 } 30 }
30 31
31 namespace chrome_variations { 32 namespace chrome_variations {
(...skipping 24 matching lines...) Expand all
56 }; 57 };
57 58
58 class MetricsLog : public MetricsLogBase { 59 class MetricsLog : public MetricsLogBase {
59 public: 60 public:
60 // Creates a new metrics log 61 // Creates a new metrics log
61 // client_id is the identifier for this profile on this installation 62 // client_id is the identifier for this profile on this installation
62 // session_id is an integer that's incremented on each application launch 63 // session_id is an integer that's incremented on each application launch
63 MetricsLog(const std::string& client_id, int session_id); 64 MetricsLog(const std::string& client_id, int session_id);
64 virtual ~MetricsLog(); 65 virtual ~MetricsLog();
65 66
66 static void RegisterPrefs(PrefService* prefs); 67 static void RegisterPrefs(PrefServiceSimple* prefs);
67 68
68 // Get the amount of uptime in seconds since this function was last called. 69 // Get the amount of uptime in seconds since this function was last called.
69 // This updates the cumulative uptime metric for uninstall as a side effect. 70 // This updates the cumulative uptime metric for uninstall as a side effect.
70 static int64 GetIncrementalUptime(PrefService* pref); 71 static int64 GetIncrementalUptime(PrefService* pref);
71 72
72 // Get the current version of the application as a string. 73 // Get the current version of the application as a string.
73 static std::string GetVersionString(); 74 static std::string GetVersionString();
74 75
75 // Use |extension| in all uploaded appversions in addition to the standard 76 // Use |extension| in all uploaded appversions in addition to the standard
76 // version string. 77 // version string.
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 const base::DictionaryValue& profile_metrics); 181 const base::DictionaryValue& profile_metrics);
181 182
182 // Writes info about the Google Update install that is managing this client. 183 // Writes info about the Google Update install that is managing this client.
183 // This is a no-op if called on a non-Windows platform. 184 // This is a no-op if called on a non-Windows platform.
184 void WriteGoogleUpdateProto(const GoogleUpdateMetrics& google_update_metrics); 185 void WriteGoogleUpdateProto(const GoogleUpdateMetrics& google_update_metrics);
185 186
186 DISALLOW_COPY_AND_ASSIGN(MetricsLog); 187 DISALLOW_COPY_AND_ASSIGN(MetricsLog);
187 }; 188 };
188 189
189 #endif // CHROME_BROWSER_METRICS_METRICS_LOG_H_ 190 #endif // CHROME_BROWSER_METRICS_METRICS_LOG_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698