aea4c1cea20dda7ae7e85fc8924a2d784f70d806 |
|
20-Aug-2015 |
Alex Deymo <deymo@google.com> |
Re-license update_engine to Apache2 This patch automatically replaced the license on all text files from Chromium OS (BSD style) to AOSP (Apache2), keeping the original year as a reference. The license header was added to .gyp and .gypi files, the NOTICE was replaced with a copy of the Apache2 license and MODULE_LICENSE_* file was updated. BUG=b/23084294 TEST=grep 'Chromium OS Authors' doesn't find anything. Change-Id: Ie5083750755f5180a8a785b24fe67dbf9195cd10
/system/update_engine/update_manager/chromeos_policy.h
|
610277efc6f7e5239158dfa4bb3b1021804326e0 |
|
12-Nov-2014 |
Alex Deymo <deymo@chromium.org> |
update_engine: Add override when possible. Google Style Guide requires to include the "override" keyword when overriding a method on a derived class, so the compiler will catch errors if the method is not overriding a member of the base class. This patch introduces the "override" keyword when possible. BUG=None TEST=FEATURES=test emerge-link update_engine Change-Id: Ie83d115c5730f3b35b3d95859a54bc1a48e0be7b Reviewed-on: https://chromium-review.googlesource.com/228928 Tested-by: Alex Deymo <deymo@chromium.org> Reviewed-by: Alex Vakulenko <avakulenko@chromium.org> Commit-Queue: Alex Deymo <deymo@chromium.org>
/system/update_engine/update_manager/chromeos_policy.h
|
78ecbfc254c574e52cfe63310a801381a0035c43 |
|
22-Oct-2014 |
Gilad Arnold <garnold@chromium.org> |
update_engine: UM: Separate global P2P usage from payload-specific attributes. This change is needed for two reasons: (a) The decision regarding the global P2P enabled state and those pertaining to whether individual payloads may be downloaded and/or shared via P2P have distinct and not necessarily nested lifespans. (b) Some parts of the update engine are concerned with the former and some with the latter, and so we need separate entry points in the Update Manager to accommodate that. This also introduces two Omaha-derived values, denoting whether P2P downloading and/or sharing should be disabled for the current payload, into the UpdateCanStart policy. BUG=chromium:425233 TEST=Unit tests. Change-Id: I0ba0090bd4c5ceb0c812ea218b070945083abd95 Reviewed-on: https://chromium-review.googlesource.com/225150 Tested-by: Gilad Arnold <garnold@chromium.org> Reviewed-by: Alex Deymo <deymo@chromium.org> Commit-Queue: Gilad Arnold <garnold@chromium.org>
/system/update_engine/update_manager/chromeos_policy.h
|
b2f9919a0e4a77dd885625cb52ff7322974bd338 |
|
07-Oct-2014 |
Gilad Arnold <garnold@chromium.org> |
update_engine: UM: Policy to distinguish between P2P downloading and sharing. Previously, the UpdateCanStart policy returned a single Boolean, indicating whether "P2P is allowed". However, the policy has been incorrectly reproducing decisions made by current code, whereas P2P sharing is always allowed (if P2P is enabled) but P2P downloading has additional limitations. This CL introduces distinct flags for both downloading and sharing, and reasons about them specifically. This also adds a constraints whereas P2P downloading is allowed for non-interactive updates only. BUG=chromium:420732 TEST=Unit tests. Change-Id: Ife4b6b2830c999745a0d4239089034c863de6388 Reviewed-on: https://chromium-review.googlesource.com/222262 Tested-by: Gilad Arnold <garnold@chromium.org> Reviewed-by: Alex Deymo <deymo@chromium.org> Commit-Queue: Gilad Arnold <garnold@chromium.org>
/system/update_engine/update_manager/chromeos_policy.h
|
349ac835564382091a80be19f0b9929ead5c55e0 |
|
06-Oct-2014 |
Gilad Arnold <garnold@chromium.org> |
update_engine: UM: Add P2P download limits to UpdateCanStart. This adds two factors that are currently used for blocking P2P into the Chrome OS policy implementation: a maximum number of P2P download attempts and a maximum time period since the first attempt. BUG=chromium:420732 TEST=Unit tests. Change-Id: I430dec50cf07f37a0c3f14de3410d3c6bfb8ac78 Reviewed-on: https://chromium-review.googlesource.com/221735 Reviewed-by: David Zeuthen <zeuthen@chromium.org> Reviewed-by: Alex Deymo <deymo@chromium.org> Tested-by: Gilad Arnold <garnold@chromium.org> Commit-Queue: Gilad Arnold <garnold@chromium.org>
/system/update_engine/update_manager/chromeos_policy.h
|
d78caf9baf2026a356130f4754af2c504f423945 |
|
24-Sep-2014 |
Gilad Arnold <garnold@chromium.org> |
update_engine: UM: Change policy argument from const ref to value. It turns out that passing an argument by reference to UpdateCanStart via UpdateManager::AsyncPolicyRequest is a pain. Furthermore, given that the policy is async by definition, it makes little sense to hand it a const reference argument. This changes the said argument to be passed by value. BUG=chromium:396148 TEST=Unit tests. Change-Id: I45a8141b389c173347f3a6b7dc03ffe46cb32228 Reviewed-on: https://chromium-review.googlesource.com/219694 Reviewed-by: Alex Vakulenko <avakulenko@chromium.org> Tested-by: Gilad Arnold <garnold@chromium.org> Reviewed-by: Alex Deymo <deymo@chromium.org> Commit-Queue: Gilad Arnold <garnold@chromium.org>
/system/update_engine/update_manager/chromeos_policy.h
|
dc4bb268eb6e6ddcd087d5eccfd88c8e92252920 |
|
23-Jul-2014 |
Gilad Arnold <garnold@chromium.org> |
update_engine: UM: Incorporate backoff logic in UpdateCanStart. This change adds backoff computation logic to UpdateCanStart. For the most part, it is extending a private policy call (UpdateDownloadUrl) to account for previously enacted backoff periods and to compute new ones when an update failure is identified (accordingly, it is now called UpdateBackoffAndDownloadUrl). To conform with the pure nature of policy implementations, yet minimizing the amount of "state" that needs to be managed and persisted by the updater, we now consider download errors in bulks defined by the most recent update failure (namely, the point in time when all URLs where tried and failed). The updater is expected to keep track of the update failure count, setting it to zero when a new update is seen, and incrementing it (and recording the time it was incremented) when told to do so by the policy. We therefore make some adjustments to the policy API and its usage semantics. BUG=chromium:396148 TEST=Unit tests. Change-Id: If8787b8c41055779945f9b41368ec08ac5e6fcca Reviewed-on: https://chromium-review.googlesource.com/210702 Reviewed-by: Alex Vakulenko <avakulenko@chromium.org> Tested-by: Gilad Arnold <garnold@chromium.org> Reviewed-by: Alex Deymo <deymo@chromium.org> Commit-Queue: Gilad Arnold <garnold@chromium.org>
/system/update_engine/update_manager/chromeos_policy.h
|
a2e8eaa743e04f9168aa7c64e88c2182d2ac4048 |
|
24-Sep-2014 |
Gilad Arnold <garnold@chromium.org> |
update_engine: UM: Move static member initialization to .cc file. Using default initializers for these members in header files results in multiple instantiations in different translation units and leads to link errors when compiled (for example) with clang. BUG=None TEST=Builds fine w/ clang, passes unit tests. Change-Id: I60926b7dde0a663736294b3252114979b4e56c66 Reviewed-on: https://chromium-review.googlesource.com/219811 Reviewed-by: Gilad Arnold <garnold@chromium.org> Commit-Queue: Gilad Arnold <garnold@chromium.org> Tested-by: Gilad Arnold <garnold@chromium.org>
/system/update_engine/update_manager/chromeos_policy.h
|
157fe307f162d13f53e7f98f6e2da7c60c0ff001 |
|
12-Aug-2014 |
Alex Vakulenko <avakulenko@chromium.org> |
platform2: sweep the lint errors identified by the updated linter cpplint.py has been updated and identified new issues in existing code. Stuff like overridden functions that specify 'override' should not be marked as 'virtual', and constructors with no parameters should not be marked as 'explicit'. BUG=None TEST=cpplint.py `find ./platform2 -name *.cc -or -name *.h` Change-Id: Ibb9de43286d874d076ffd5ebb1b13c36ec794f01 Reviewed-on: https://chromium-review.googlesource.com/211950 Reviewed-by: Alex Vakulenko <avakulenko@chromium.org> Commit-Queue: Alex Vakulenko <avakulenko@chromium.org> Tested-by: Alex Vakulenko <avakulenko@chromium.org>
/system/update_engine/update_manager/chromeos_policy.h
|
a65fced5f4c2b551616b26ee90a800b44090735f |
|
23-Jul-2014 |
Gilad Arnold <garnold@chromium.org> |
update_engine: UM: Add check for monotonic time elapsed. This forks the former EvaluationStatus::IsTimeGreaterThan() into two separate variants, checking either the wallclock or monotonic current time against a corresponding timestamp. This is needed for policies that require resilience against wallclock time volatility. BUG=chromium:394778 TEST=Unit tests. Change-Id: I9ecd20cc87a3a520e119f157e55ae4f54104a506 Reviewed-on: https://chromium-review.googlesource.com/209487 Commit-Queue: Gilad Arnold <garnold@chromium.org> Tested-by: Gilad Arnold <garnold@chromium.org> Reviewed-by: Gilad Arnold <garnold@chromium.org>
/system/update_engine/update_manager/chromeos_policy.h
|
072359ca138504065e1e0c1189eb38c09576d324 |
|
18-Jul-2014 |
Alex Vakulenko <avakulenko@chromium.org> |
update_engine: fixed remaining linter and some spelling errors Fixed remaining errors from cpplint as well as some spelling errors mostly in comments. BUG=None TEST=FEATURES=test emerge-link update_engine Change-Id: I484988ab846ac5a3c68c016ddccfb247f225ec27 Reviewed-on: https://chromium-review.googlesource.com/208897 Reviewed-by: Alex Vakulenko <avakulenko@chromium.org> Commit-Queue: Alex Vakulenko <avakulenko@chromium.org> Tested-by: Alex Vakulenko <avakulenko@chromium.org>
/system/update_engine/update_manager/chromeos_policy.h
|
a0258a557d36ff78eacdacd39bdc88c5e6c1056e |
|
11-Jul-2014 |
Gilad Arnold <garnold@chromium.org> |
UpdateManager: Obey server-dictated poll interval when scheduling checks. This abides by the current logic, as found in UpdateCheckScheduler::ComputeNextIntervalAndFuzz(). New unit tests added to verify this behavior, as well as the addition of a new UpdaterProvider variable to pull this value from the UpdateAttempter. BUG=chromium:358269 TEST=Unit tests. Change-Id: I0ac67dea5a622823a9c4713ec7165a55bc0a5c92 Reviewed-on: https://chromium-review.googlesource.com/207471 Tested-by: Gilad Arnold <garnold@chromium.org> Reviewed-by: Alex Vakulenko <avakulenko@chromium.org> Reviewed-by: Alex Deymo <deymo@chromium.org> Commit-Queue: Gilad Arnold <garnold@chromium.org>
/system/update_engine/update_manager/chromeos_policy.h
|
a1eabcdc93d118146639139257c2f5ccc3ffb061 |
|
10-Jul-2014 |
Gilad Arnold <garnold@chromium.org> |
UpdateManager: Do not schedule update checks if OOBE did not complete. This abides by the current logic, as found in UpdateCheckScheduler::StaticCheck(). New unit test added to verify this behavior. BUG=chromium:358269 TEST=Unit tests. Change-Id: I747e8a59408d6b93ceea62ef741b36e09f937a08 Reviewed-on: https://chromium-review.googlesource.com/207241 Reviewed-by: Alex Deymo <deymo@chromium.org> Tested-by: Gilad Arnold <garnold@chromium.org> Commit-Queue: Gilad Arnold <garnold@chromium.org>
/system/update_engine/update_manager/chromeos_policy.h
|
38b1402462bd15025a53bea993ca3d93cdf0d8de |
|
09-Jul-2014 |
Gilad Arnold <garnold@chromium.org> |
UpdateManager: Fix update scheduling interval/fuzz inference. This addresses two differences wrt current logic: * In the case of recurring periodic check, we should use kTimeoutPeriodicInterval as the base check interval (and not kTimeoutInitialInterval). * When doing exponential backoff, we should be using the interval / 2 as the fuzz factor (and not the fixed kTimeoutRegularFuzz). Added two new tests (RecurringCheckBaseIntervalAndFuzz and RecurringCheckBackoffIntervalAndFuzz) to ensure the correct values are used. Also fixed existing unit tests to properly distinguish a first update check from recurring ones (FirstCheckIsAtMostInitialIntervalAfterStart) and to properly verify that deferred update check times are within the expected buzz boundaries (FirstCheckIsAtMostInitialIntervalAfterStart and ExponentialBackoffIsCapped). BUG=chromium:392582 TEST=Unit tests. Change-Id: I3085502c57616cba2eff4cb0372ca5699427ae20 Reviewed-on: https://chromium-review.googlesource.com/207192 Tested-by: Gilad Arnold <garnold@chromium.org> Reviewed-by: Alex Vakulenko <avakulenko@chromium.org> Commit-Queue: Gilad Arnold <garnold@chromium.org>
/system/update_engine/update_manager/chromeos_policy.h
|
42f253b5318dbe6d0ecf48f7f9a639363fa253e2 |
|
25-Jun-2014 |
Gilad Arnold <garnold@chromium.org> |
UpdateManager: Move logic from UpdateCanStart to UpdateCheckAllowed. The following should be part of the policy that is consulted before performing an update check: 1) Whether updates are disabled by device policy. 2) Whether a specific target channel is dictated by the device policy. This CL moves it from UpdateCanStart into UpdateCheckAllowed. Another change is renaming the output construct of UpdateCanStart into 'UpdateDownloadParams'; this is in line with the naming of the output struct of UpdateCheckAllowed, and reflects the fact that it contains information regarding the download of an update, to be used by the caller. BUG=chromium:388386 TEST=Unit tests. Change-Id: I0631a4464800db77807d7da9a2a2c256b519c5c3 Reviewed-on: https://chromium-review.googlesource.com/205728 Reviewed-by: Gilad Arnold <garnold@chromium.org> Commit-Queue: Gilad Arnold <garnold@chromium.org> Tested-by: Gilad Arnold <garnold@chromium.org>
/system/update_engine/update_manager/chromeos_policy.h
|
684219dc29acb0111d09aaf2d466cf837b043d9e |
|
07-Jul-2014 |
Gilad Arnold <garnold@chromium.org> |
UpdateManager: rename UpdateCurrentConnectionAllowed into UpdateDownloadAllowed. The signifies the *functional* nature of this policy request, instead of dwelling on the low-level information it is evaluating. BUG=chromium:389677 TEST=Unit tests. Change-Id: I684ea13d4e89554b6a4d596666c18e2dbd609991 Reviewed-on: https://chromium-review.googlesource.com/206903 Tested-by: Gilad Arnold <garnold@chromium.org> Reviewed-by: Alex Vakulenko <avakulenko@chromium.org> Commit-Queue: Gilad Arnold <garnold@chromium.org>
/system/update_engine/update_manager/chromeos_policy.h
|
48415f1f6c6c356bfa9ac85b76d8ebcf053f7157 |
|
27-Jun-2014 |
Gilad Arnold <garnold@chromium.org> |
UpdateManager: Adjustments for cpplint. - Rename header file guards. - Added missing #includes. Note that the linter still barks about C++11-style curly-braced member initialization; there are abundant uses of this and we should probably upstream a change to accommodate that. BUG=None TEST=Builds. Change-Id: Icccc88e6e56e56f644536147cd88ae92462a1495 Reviewed-on: https://chromium-review.googlesource.com/205894 Tested-by: Gilad Arnold <garnold@chromium.org> Reviewed-by: Alex Deymo <deymo@chromium.org> Commit-Queue: Gilad Arnold <garnold@chromium.org>
/system/update_engine/update_manager/chromeos_policy.h
|
b3b05446d3ef9620c90084e11cd1ae4eca20f4a2 |
|
30-May-2014 |
Gilad Arnold <garnold@chromium.org> |
UM: Policy for deciding download URL. This adds a new private policy (UpdateDownloadUrl) for determining which download URL should be used for obtaining the update payload. We further extend an existing public policy (UpdateCanStart) to return the download URL details, based on the current URL index and the number of failures associated with it. This renders the explicit notion of "HTTP download allowed" in the return value unnecessary: If HTTP is not allowed, then HTTP URLs will not be considered. We also implement logic for logging the start/end of a policy evaluation, so that intermediate log messages emitted during evaluation have a clear context. BUG=chromium:358329 TEST=Unit tests. Change-Id: Ib5343417480d8825082f83bed2630a6611360b61 Reviewed-on: https://chromium-review.googlesource.com/203373 Tested-by: Gilad Arnold <garnold@chromium.org> Reviewed-by: Alex Deymo <deymo@chromium.org> Commit-Queue: Gilad Arnold <garnold@chromium.org>
/system/update_engine/update_manager/chromeos_policy.h
|
63784a578dd26880454d70797519358a2326291b |
|
28-May-2014 |
Alex Deymo <deymo@chromium.org> |
Rename the PolicyManager to UpdateManager. This change renames the PolicyManager class, directory, tests, etc, to avoid confusion with libpolicy and its classes. BUG=chromium:373551 TEST=emerged on link. CQ-DEPEND=CL:I43081673c7ba409f02273197da7915537bde39c6 Change-Id: Iffa76caa3b95ecbbdba87ab01006d1d8ce35a27f Reviewed-on: https://chromium-review.googlesource.com/201876 Tested-by: Alex Deymo <deymo@chromium.org> Reviewed-by: David Zeuthen <zeuthen@chromium.org> Commit-Queue: Alex Deymo <deymo@chromium.org>
/system/update_engine/update_manager/chromeos_policy.h
|