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

Side by Side Diff: common/stats_uploader.h

Issue 624713003: Keep only base/extractor.[cc|h]. (Closed) Base URL: https://chromium.googlesource.com/external/omaha.git@master
Patch Set: Created 6 years, 2 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 | « common/scheduled_task_utils_unittest.cc ('k') | common/stats_uploader.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2008-2010 Google Inc.
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 // ========================================================================
15
16 // Constants for the statsreport library.
17
18 #ifndef OMAHA_COMMON_STATS_UPLOADER_H__
19 #define OMAHA_COMMON_STATS_UPLOADER_H__
20
21 #include <windows.h>
22 #include <tchar.h>
23
24 namespace omaha {
25
26 // The product name is chosen so that the stats are persisted under
27 // the Google Update registry key for the machine or user, respectively.
28 const TCHAR* const kMetricsProductName = _T("Update");
29
30 const TCHAR* const kMetricsServerParamSourceId = _T("sourceid");
31 const TCHAR* const kMetricsServerParamVersion = _T("v");
32 const TCHAR* const kMetricsServerParamIsMachine = _T("ismachine");
33 const TCHAR* const kMetricsServerTestSource = _T("testsource");
34 const TCHAR* const kMetricsServerUserId = _T("ui");
35
36 // Metrics are uploaded every 25 hours.
37 const int kMetricsUploadIntervalSec = 25 * 60 * 60;
38
39 // Deletes existing metrics and initializes 'LastTransmission' to current time.
40 HRESULT ResetMetrics(bool is_machine);
41
42 // Aggregates metrics by saving them in registry.
43 HRESULT AggregateMetrics(bool is_machine);
44
45 // Aggregates and reports the metrics if needed, as defined by the metrics
46 // upload interval. The interval is ignored when 'force_report' is true.
47 HRESULT AggregateAndReportMetrics(bool is_machine, bool force_report);
48
49 } // namespace omaha
50
51 #endif // OMAHA_COMMON_STATS_UPLOADER_H__
52
OLDNEW
« no previous file with comments | « common/scheduled_task_utils_unittest.cc ('k') | common/stats_uploader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698