Chromium Code Reviews| Index: chrome/browser/component_updater/sw_reporter_component_installer_win.h |
| diff --git a/chrome/browser/component_updater/sw_reporter_component_installer_win.h b/chrome/browser/component_updater/sw_reporter_component_installer_win.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..aa46eda4d2b4af56a79ec9e3f873da8a3340b932 |
| --- /dev/null |
| +++ b/chrome/browser/component_updater/sw_reporter_component_installer_win.h |
| @@ -0,0 +1,37 @@ |
| +// Copyright (c) 2014 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CHROME_BROWSER_COMPONENT_UPDATER_SW_REPORTER_COMPONENT_INSTALLER_WIN_H_ |
| +#define CHROME_BROWSER_COMPONENT_UPDATER_SW_REPORTER_COMPONENT_INSTALLER_WIN_H_ |
| + |
| +class PrefRegistrySimple; |
| +class PrefService; |
| + |
| +namespace component_updater { |
|
Sorin Jianu
2014/06/19 19:08:48
The logic implemented by the Execute public member
|
| + |
| +class ComponentUpdateService; |
| + |
| +// Execute will execute the SwReporter if one is available, otherwise 1) |
| +// register with the component updater, 2) save a preference in |prefs| |
| +// identifying that an attempt to execute the reporter tool was made, so that |
| +// calls to ExecutePending below will be able to continue the work if it doesn't |
| +// complete before the Chrome session ends. It will also allow the component |
| +// updater to know if there is a pending execution or not when an update |
| +// happens. |
| +void ExecuteSwReporterComponent(ComponentUpdateService* cus, |
|
Sorin Jianu
2014/06/19 19:08:48
In the spirit of reducing clutter, since we live i
|
| + PrefService* prefs); |
| + |
| +// ExecutePending will only register/execute the SwReporter component if a |
| +// preference is set in |prefs|, identifying that an attempt to register/execute |
| +// the SwReporter has already been made by calling ExecuteSwReporterComponent |
| +// above. But only if the max number of retries has not been reached yet. |
| +void ExecutePendingSwReporterComponent(ComponentUpdateService* cus, |
| + PrefService* prefs); |
| + |
| +// Register user preferences related to the SwReporter component. |
| +void RegisterPrefsForSwReporterComponent(PrefRegistrySimple* registry); |
| + |
| +} // namespace component_updater |
| + |
| +#endif // CHROME_BROWSER_COMPONENT_UPDATER_SW_REPORTER_COMPONENT_INSTALLER_WIN_H_ |