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

Side by Side Diff: chrome/browser/component_updater/sw_reporter_installer_win.h

Issue 495643002: Trigger the SW reporter to run once a week for users with UMA enabled. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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) 2014 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2014 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 #ifndef CHROME_BROWSER_COMPONENT_UPDATER_SW_REPORTER_INSTALLER_WIN_H_ 5 #ifndef CHROME_BROWSER_COMPONENT_UPDATER_SW_REPORTER_INSTALLER_WIN_H_
6 #define CHROME_BROWSER_COMPONENT_UPDATER_SW_REPORTER_INSTALLER_WIN_H_ 6 #define CHROME_BROWSER_COMPONENT_UPDATER_SW_REPORTER_INSTALLER_WIN_H_
7 7
8 class PrefRegistrySimple; 8 class PrefRegistrySimple;
9 class PrefService; 9 class PrefService;
10 10
11 namespace component_updater { 11 namespace component_updater {
12 12
13 class ComponentUpdateService; 13 class ComponentUpdateService;
14 14
15 // Execute the SwReporter if one is available, otherwise 1) register with the 15 // Execute the SwReporter if one is available, otherwise 1) register with the
16 // component updater, 2) save a preference in |prefs| identifying that an 16 // component updater, 2) save a preference in |prefs| identifying that an
17 // attempt to execute the reporter tool was made, so that calls to 17 // attempt to execute the reporter tool was made, so that calls to
18 // ExecutePending below will be able to continue the work if it doesn't complete 18 // ExecutePending below will be able to continue the work if it doesn't complete
19 // before the Chrome session ends. It will also allow the component updater to 19 // before the Chrome session ends. It will also allow the component updater to
20 // know if there is a pending execution or not when an update happens. This must 20 // know if there is a pending execution or not when an update happens. This must
21 // be called from the UI thread. 21 // be called from the UI thread.
22 void ExecuteSwReporter(ComponentUpdateService* cus, PrefService* prefs); 22 void ExecuteSwReporter(ComponentUpdateService* cus, PrefService* prefs);
23 23
24 // ExecutePending will only register/execute the SwReporter if a preference is 24 // ExecuteSwReporterIfRequired will only register/execute the SwReporter if it
25 // set in |prefs|, identifying that an attempt to register/execute the 25 // has been too long since it last ran or if a preference is set in |prefs|,
26 // SwReporter has already been made by calling ExecuteSwReporter above. But only 26 // identifying that an attempt to register/execute the SwReporter has already
27 // if the max number of retries has not been reached yet. This must be called 27 // been made and not completed. This must be called
28 // from the UI thread. 28 // from the UI thread.
29 void ExecutePendingSwReporter(ComponentUpdateService* cus, PrefService* prefs); 29 void ExecuteSwReporterIfRequired(ComponentUpdateService* cus,
30 PrefService* prefs);
30 31
31 // Register user preferences related to the SwReporter. 32 // Register user preferences related to the SwReporter.
32 void RegisterPrefsForSwReporter(PrefRegistrySimple* registry); 33 void RegisterPrefsForSwReporter(PrefRegistrySimple* registry);
33 34
34 } // namespace component_updater 35 } // namespace component_updater
35 36
36 #endif // CHROME_BROWSER_COMPONENT_UPDATER_SW_REPORTER_INSTALLER_WIN_H_ 37 #endif // CHROME_BROWSER_COMPONENT_UPDATER_SW_REPORTER_INSTALLER_WIN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698