39910dcd1d68987ccee7c3031dc269233a8490bb |
|
10-Nov-2015 |
Alex Deymo <deymo@google.com> |
Split payload application code into a subdirectory. This patch splits from the main libupdate_engine code the part that is strictly used to download and apply a payload into a new static library, moving the code to subdirectories. The new library is divided in two subdirectories: common/ and payload_consumer/, and should not depend on other update_engine files outside those two subdirectories. The main difference between those two is that the common/ tools are more generic and not tied to the payload consumer process, but otherwise they are both compiled together. There are still dependencies from the new libpayload_consumer library into the main directory files and DBus generated files. Those will be addressed in follow up CLs. Bug: 25197634 Test: FEATURES=test emerge-link update_engine; `mm` on Brillo. Change-Id: Id8d0204ea573627e6e26ca9ea17b9592ca95bc23
/system/update_engine/connection_manager_unittest.cc
|
3f39d5cc753905874d8d93bef94f857b8808f19e |
|
13-Oct-2015 |
Alex Vakulenko <avakulenko@google.com> |
update_engine: Rename "chromeos" -> "brillo" in include paths and namespaces libchromeos is transitioning to libbrillo and chromeos namespaces and include directory is changing to brillo. Bug: 24872993 Change-Id: I770659a95be380a50fe3b2ba9f91d65818f40945
/system/update_engine/connection_manager_unittest.cc
|
758dd53cf503adbcb049909f25f54603d411be09 |
|
10-Sep-2015 |
Alex Deymo <deymo@google.com> |
Skip invalid DefaultService object path values. If shill sends an invalid DefaultService object path value, we need to explicitly treat since otherwise the DBus library will abort the program when trying to send a message to the invalid object path. Bug: chromium:526446 Change-Id: Id91787916b62cd94dab38532b98be0f0a8b6d4c4 Test: Added unittests
/system/update_engine/connection_manager_unittest.cc
|
d6deb1d0357f47d5525bfaeffa6c201b19abd3e7 |
|
29-Aug-2015 |
Alex Deymo <deymo@google.com> |
Use installed DBus libraries instead of generating them. login_manager, power_manager, debugd and shill now expose a client library with the generated dbus-proxies.h file and the system_api's installed dbus-constants.h. This patch changes update_engine from generating these DBus headers to use the installed client libraries. The client libraries already include the service path string, so we don't need to include system_api dbus-constants.h in most cases, unless we actually use some parameter constants defined there. BUG=b:23084776,b:23560718 TEST=./build_packages --board=link Change-Id: Idb4501e784ebb5928c92902d114462be57d5826a
/system/update_engine/connection_manager_unittest.cc
|
b8803bbfe96abce0ae792a93bc975d478d98d16a |
|
20-Aug-2015 |
Alex Deymo <deymo@google.com> |
Split DBus client proxies into separated headers. Each daemon we talk to should expose its own DBus library. This patch splits the DBus proxies we generate from other daemon's .xml files into separated header files so we can then replace them with libraries. BUG=b:23084776 TEST=FEATURES=test emerge-link update_engine Change-Id: Idbf1671eb7fc4259d493dbe2c8bcc8dad5b8784f
/system/update_engine/connection_manager_unittest.cc
|
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/connection_manager_unittest.cc
|
305345001d85ca2282112c2a30fe75c7a4773491 |
|
21-Jul-2015 |
Alex Deymo <deymo@chromium.org> |
update_engine: Switch to chrome-dbus for client requests in update_engine update_engine daemon acts as DBus client to send DBus calls to shill, power_manager and chrome, and to listen for signals from shill, chrome and login_manager. This patch migrates these calls and signals to use chrome-dbus framework instead of dbus-glib. All references to dbus-glib code are removed. BUG=chromium:419827 TEST=Updated unittest. Deployed on a link device and tested interactions with shill and chromium. Change-Id: I31b389e0d1690cccb115ff3b6539c876ba81bd0e Reviewed-on: https://chromium-review.googlesource.com/290990 Tested-by: Alex Deymo <deymo@chromium.org> Reviewed-by: Alex Deymo <deymo@chromium.org> Commit-Queue: Alex Deymo <deymo@chromium.org> Trybot-Ready: Alex Deymo <deymo@chromium.org>
/system/update_engine/connection_manager_unittest.cc
|
75eac7e523f825afdb88508922d7dc65fa366b19 |
|
29-Jul-2015 |
Alex Deymo <deymo@chromium.org> |
update_engine: Convert NetworkConnectionType to enum class. This patch simply converts the old NetworkConnectionType enum to an enum class and updates all the callsites and formatting. BUG=None TEST=emerge-link update_engine. Change-Id: I29a281f1648e2d8ef74b1046d01a212022280461 Reviewed-on: https://chromium-review.googlesource.com/289585 Reviewed-by: Alex Vakulenko <avakulenko@chromium.org> Commit-Queue: Alex Deymo <deymo@chromium.org> Trybot-Ready: Alex Deymo <deymo@chromium.org> Tested-by: Alex Deymo <deymo@chromium.org> Trybot-Ready: Prathmesh Prabhu <pprabhu@chromium.org>
/system/update_engine/connection_manager_unittest.cc
|
02c1864e204997175302b1aebe3e0be9c6699ea5 |
|
06-Nov-2014 |
David Pursell <dpursell@chromium.org> |
update_engine: Allow `cros flash` on base images. A goal of the upcoming debugd dev tools (crbug.com/403170), is to enable a path to modify a base image such that a developer could run `cros flash` on it. Currently update_engine disallows custom omaha URLs and forces a hash check for base builds, which breaks `cros flash`. This CL relaxes the restriction slightly to allow use on a base build as long as the system is in dev mode and the debugd dev tools are also enabled (dev tools are currently enabled only in dev mode when there is no owner). The check is done in update_attempter.cc, which only allows an unofficial Omaha URL if these conditions hold true (unofficial meaning not the main AU server or the AU test server). The other main change is AreHashChecksMandatory() in omaha_response_handler_action.cc, which now allows skipping hash checks for unofficial Omaha URLs. BUG=chromium:428053 TEST=Ran unit tests, `cros flash` on base images in various states. CQ-DEPEND=CL:227431 Change-Id: I8583ce6aa70feac8fe74b7a3992e8a4e761833c3 Reviewed-on: https://chromium-review.googlesource.com/228293 Reviewed-by: Alex Deymo <deymo@chromium.org> Trybot-Ready: David Pursell <dpursell@chromium.org> Commit-Queue: David Pursell <dpursell@chromium.org> Tested-by: David Pursell <dpursell@chromium.org>
/system/update_engine/connection_manager_unittest.cc
|
10875d90cf67f883ba7c9ed13bc8d706aa8c6fbc |
|
11-Nov-2014 |
Alex Deymo <deymo@chromium.org> |
update_engine: Move test-only utils to test_utils.{h,cc}. utils.{h,cc} contains a collections of basic or small functions used in different parts of the codebase. The test_utils.{h,cc} instead contains functions only required during testing split out to a separated file to be reused in different tests. This CL moves without changes some functions defined in utils.h that were only used during unittests. Two other basic functions were replaced by the same function already present in base/ (StringHasSuffix and StringHasPrefix). The functions in test_utils.h now have their own namespace chromeos_update_engine::test_utils so is clear they come from the test_utils file, in the same way the ones from utils are in their own namespace. Some othe minor linter fixes included here. BUG=chromium:351429 TEST=Unittest still pass. Change-Id: I73ab72a14158cb21c8e1f404cbc728423bc8f34f Reviewed-on: https://chromium-review.googlesource.com/229021 Reviewed-by: Alex Deymo <deymo@chromium.org> Commit-Queue: Alex Deymo <deymo@chromium.org> Tested-by: Alex Deymo <deymo@chromium.org>
/system/update_engine/connection_manager_unittest.cc
|
8427b4a6d0e6e02beedbb53798272f8ddc39386f |
|
05-Nov-2014 |
Alex Deymo <deymo@chromium.org> |
update_engine: Standarize mock/fake filenames. Mock classes implement mostly MOCK_METHOD* methods used with gmock. Those classes should be named with the prefix "Mock" in the class name and "mock_" in the header filename. Fake classes implement a working version of the interface they provide, often with extra functionality to change their behavior. Those classes should be prefixed with "Fake" in the class name and "fake_" in the file name. Other minor include order fixes are included in this patch. BUG=None TEST=Unittest still pass. Change-Id: I23de7cb11e25182d5855afacca47d431c97b82bb Reviewed-on: https://chromium-review.googlesource.com/227779 Reviewed-by: Alex Deymo <deymo@chromium.org> Commit-Queue: Alex Deymo <deymo@chromium.org> Tested-by: Alex Deymo <deymo@chromium.org>
/system/update_engine/connection_manager_unittest.cc
|
f329b933db41d26644a97afef928eb1b319d6d99 |
|
30-Oct-2014 |
Alex Deymo <deymo@chromium.org> |
update_engine: Fix all the "using" declaration usage. This patch removes unused "using" declarations, that is, declarations included in a .cc file at a global scope such that "using foo::bar" that later don't use the identifier "bar" at all. This also unifies the usage of these identifiers in the .cc files in favor of using the short name defined by the using declaration. For example, in several cases the .h refer to a type like "std::string" because using declarations are forbidden in header files while the .cc includes "using std::string;" with the purpose of just writting "string" in the .cc file. Very rarely, the full identifier is used when a local name ocludes it, for example, StringVectorToGStrv() and StringVectorToString() in utils.cc named its argument just "vector" need to refer to std::vector with the full name. This patch renames those arguments instead. Finally, it also sorts a few lists of using declarations that weren't in order. BUG=None TEST=FEATURES=test emerge-link update_engine Change-Id: I30f6b9510ecb7e03640f1951c48d5bb106309840 Reviewed-on: https://chromium-review.googlesource.com/226423 Reviewed-by: Alex Vakulenko <avakulenko@chromium.org> Commit-Queue: Alex Deymo <deymo@chromium.org> Tested-by: Alex Deymo <deymo@chromium.org>
/system/update_engine/connection_manager_unittest.cc
|
88b591f24cb3f94f982d7024c2e8ed25c2cc26a2 |
|
29-Aug-2014 |
Alex Vakulenko <avakulenko@chromium.org> |
update_engine: Replace NULL with nullptr Replaced the usage of NULL with nullptr. This also makes it possible to use standard gtest macros to compare pointers in Update Manager's unit tests. So, there is no need in custom UMTEST_... macros which are replaced with the gtest macros (see change in update_engine/update_manager/umtest_utils.h): UMTEST_ASSERT_NULL(p) => ASSERT_EQ(nullptr, p) UMTEST_ASSERT_NOT_NULL(p) => ASSERT_NE(nullptr, p) UMTEST_EXPECT_NULL(p) => EXPECT_EQ(nullptr, p) UMTEST_EXPECT_NOT_NULL(p) => EXPECT_NE(nullptr, p) BUG=None TEST=FEATURES=test emerge-link update_engine USE="clang asan" FEATURES=test emerge-link update_engine Change-Id: I77a42a1e9ce992bb2f9f263db5cf75fe6110a4ec Reviewed-on: https://chromium-review.googlesource.com/215136 Tested-by: Alex Vakulenko <avakulenko@chromium.org> Reviewed-by: Alex Deymo <deymo@chromium.org> Commit-Queue: Alex Vakulenko <avakulenko@chromium.org>
/system/update_engine/connection_manager_unittest.cc
|
d2779df63aaad8b65fc5d4badee7dbc9bed7f2b6 |
|
16-Jun-2014 |
Alex Vakulenko <avakulenko@chromium.org> |
update_engine: fixed warnings from cpplint Fixed all the cpplint warnings in update engine. BUG=None TEST=Unit tests still pass. Change-Id: I285ae858eec8abe0b26ff203b99a42a200ceb71c Reviewed-on: https://chromium-review.googlesource.com/204027 Reviewed-by: Alex Vakulenko <avakulenko@chromium.org> Tested-by: Alex Vakulenko <avakulenko@chromium.org> Commit-Queue: Alex Vakulenko <avakulenko@chromium.org>
/system/update_engine/connection_manager_unittest.cc
|
5665d0ced6812771559ca7bf938fa48f2b93ae48 |
|
29-May-2014 |
Alex Deymo <deymo@chromium.org> |
Fix memory leak on ConnectionManagerTest. ConnectionManagerTest::SetServiceReply had a memory leak only present on unittest code. This patch uses g_new0() and g_free() to manage the memory of GValue objects on GValueNewString and GValueFree, which allows to use GValueFree to remove any GValue object. It also replaces the GArray* by a GPtrArray which is what dbus-glib uses and what is being passed as the GType, as defined on the DBusWrapperInterface. BUG=chromium:378548 TEST=`FEATURES="test" USE="clang asan" emerge-link update_engine` doesn't show ConnectionManager failures TEST=tested on link the update_engine detects the current connection from shill. Change-Id: I328ba79e2d609ab1cfe3df8b99b82fa24262de08 Reviewed-on: https://chromium-review.googlesource.com/202060 Reviewed-by: Alex Deymo <deymo@chromium.org> Commit-Queue: Alex Deymo <deymo@chromium.org> Tested-by: Alex Deymo <deymo@chromium.org>
/system/update_engine/connection_manager_unittest.cc
|
5bb4c90b8bdf931426d1926b21b0316a86b4b4e4 |
|
10-Apr-2014 |
Gilad Arnold <garnold@chromium.org> |
Rename MockSystemState into FakeSystemState. This class is no longer a mock. The change also includes renaming the appropriate files and the instances of this class. BUG=chromium:358278 TEST=Unit tests. Change-Id: Ifc20ead0d624eddf8827a6e6f39cd9b9207dcabf Reviewed-on: https://chromium-review.googlesource.com/194088 Reviewed-by: Gilad Arnold <garnold@chromium.org> Tested-by: Gilad Arnold <garnold@chromium.org> Commit-Queue: David Zeuthen <zeuthen@chromium.org>
/system/update_engine/connection_manager_unittest.cc
|
1f84723f499b3b309efac11324ed4e6c937341b6 |
|
07-Apr-2014 |
Gilad Arnold <garnold@chromium.org> |
Revise the SystemState hierarchy. * Removed all #includes from SystemState; added includes in .cc files that use the various objects (MetricsLibrary, DevicePolicy, etc). * MockSystemState: - Regulated the set of getters/setters: foo() returns the current Foo object interface; this object can be overridden by set_foo(); mock_foo() or fake_foo() returns the default (internal) mock/fake equivalent, and fails if it is different from foo() (safety). - Make member declaration order consistent with that of API. - Removed MOCK_METHOD declarations for two methods and replaced them with fake getter/setter. This means that MockSystemState is now reduced to a fake, and can be renamed (separate CL). This also means that a few tests have a slightly different semantics now. * All virtual overrides are qualified as such. However, removed the 'const' method qualified from all getters: it made little sense, especially when considering that getters are handing addresses of internal mock members. * Made the UpdateAttempter a contained member of both {Real,Mock}SystemState, resolving initialization dependencies. In general, the invariant is that all members of the SystemState that rely on it being fully populated by the time of their initialization, need to export a separate Init() method, that will be called (by the SystemState implementation constructor or Init() method) only after all members are set. * Made the mock GPIO handler and connection manager contained members of MockSystemState; the destructor could safely be moved. * Cleanup in UpdateAttempter (part of resolving dependencies): - Ordinary member initialization done via default initializers (constants) or initializer list in the constructor (parameters). - Init() method only does work that cannot be done during construction, with appropriate comment documenting the need for it. - Better reuse via constructor delegation. BUG=chromium:358278 TEST=Unit tests. Change-Id: I96ff6fc7e7400b0a9feb6cc8d4ffe97a51000f91 Reviewed-on: https://chromium-review.googlesource.com/193587 Reviewed-by: Gilad Arnold <garnold@chromium.org> Tested-by: Gilad Arnold <garnold@chromium.org> Commit-Queue: David Zeuthen <zeuthen@chromium.org>
/system/update_engine/connection_manager_unittest.cc
|
6ae9120dc76ce9a3c8d05f71c05f23e3f4bdc6bd |
|
11-Mar-2014 |
Alex Deymo <deymo@chromium.org> |
Treat confirmed Tethered networks as Cellular networks. The updates are allowed based on the type of connection used to download it from. For example, by default, no update is made over Cellular networks even if the device is connected to a VPN over a Cellular network to prevent huge charges on those connections. Nevertheless, when the device is connected to a tethered network such as an Android or iPhone sharing its Cellular connection over Wifi, the connection type the device sees is a Wifi and thus will allow the updates by default. To prevent updates over tethered networks, this patch uses the Tethering property expossed by shill to avoid those situations. If the device is connected to a network that shill confirms to be a tethered network, it will be treated as if the device is connected to a Cellular network. This means that the updates will be allowed based on the same settings that govern if the updates are allowed over Cellular networks. BUG=chromium:323010 TEST=Unit tests added to verify policy and property parsing. Change-Id: I3a31c804465c9ed5c76b5d6156adda8e5e4e8a6d Reviewed-on: https://chromium-review.googlesource.com/189524 Tested-by: Alex Deymo <deymo@chromium.org> Reviewed-by: Chris Sosa <sosa@chromium.org> Commit-Queue: Alex Deymo <deymo@chromium.org>
/system/update_engine/connection_manager_unittest.cc
|
1b9d6ae00b3c3badf9785584c2c867710f214a62 |
|
03-Mar-2014 |
Gilad Arnold <garnold@chromium.org> |
Further cleanup around DBus interface classes. * Removed the "Glib" part from the various DbusGlib class name and added "Wrapper" instead: only part of the methods here declared have anything to do with Glib; in essence, this is an interface containing wrappers for various DBus functions. * Changed "Dbus" to "DBus", to comply with the rest of the world. * Renamed the actual implementation "RealDBusWrapper" (instead of "Concrete"). * Separated out RealDBusWrapper into its own header file. Client code, which often only cares about the abstract class, does not need to pull it unless specifically requiring it. * Cleaned up the includes in these headers. Aside from all that, also renamed system_state.cc into real_system_state.cc, as this is what this file contains. BUG=None TEST=Unit tests. Change-Id: I015c407cbc159aba8b5925eb0e916ba604c829cd Reviewed-on: https://chromium-review.googlesource.com/189373 Reviewed-by: Gilad Arnold <garnold@chromium.org> Tested-by: Gilad Arnold <garnold@chromium.org> Commit-Queue: Gilad Arnold <garnold@chromium.org>
/system/update_engine/connection_manager_unittest.cc
|
b752fb342f2d8f9766f13764e4747a50a1195308 |
|
03-Mar-2014 |
Gilad Arnold <garnold@chromium.org> |
Cleanup DBus interface. Prior to importing the DBus interface into the Policy Manager, this removes some clutter and fixes some behaviors. * Switch from using dbus_g_proxy_new_for_name_owner() to using dbus_g_proxy_new_for_name() instead. This has been advised in the past (see chromium:209102) as the _owner version is mostly used for binding to interfaces that do not retain the well-known name. It is not appropriate for our use cases, where the provider inhibits the well-known location constantly, nor is it a good thing given that providers (e.g. Chrome) could get recycled. * More consistent abstraction for variadic DBus functions: (a) We now distinguish between different numbers of input/output arguments by appending these numbers to the names of interface functions (e.g. ProxyCall_3_0 delegates 3 input arguments and zero outputs); (b) We drop G_TYPE arguments and embed them as constants in the delegating code. This makes more sense because these types are constants and depend on the actual values, which are bound to predetermined C/C++ types anyway; (c) It is still possible to override such functions by variating the types of actual arguments (currently not exercised). * The above also shortens the argument list for several DBus interface functions, saving us from needing to prune them to fit in mock methods with a maximum of 10 arguments (as was previously necessary). * Removed an unnecessary #include; better comments; more descriptive argument names. Other notable changes in client code: * Some cleaup in chrome_browser_proxy_resolver.cc, removing unnecessary functions and reverting the proxy reacquisition logic introduced in CL:15693, which is now redundant. BUG=None TEST=Unit tests. Change-Id: I8063bb3e35c34212a8be1ae507834c931ee5a0b0 Reviewed-on: https://chromium-review.googlesource.com/188560 Tested-by: Gilad Arnold <garnold@chromium.org> Reviewed-by: David Zeuthen <zeuthen@chromium.org> Reviewed-by: Alex Deymo <deymo@chromium.org> Commit-Queue: Gilad Arnold <garnold@chromium.org>
/system/update_engine/connection_manager_unittest.cc
|
c6007e4fbd9a58ca467fa59feef4a46b8075d434 |
|
20-Sep-2013 |
Ben Chan <benchan@chromium.org> |
Replace flimflam namespace with shill namespace. BUG=chromium:295425 CQ-DEPEND=CL:170123 TEST=Build and run unit tests. Change-Id: Id8ec51b6ff7f2802285706203bc831d3f2277ac7 Reviewed-on: https://chromium-review.googlesource.com/170124 Reviewed-by: Paul Stewart <pstew@chromium.org> Reviewed-by: Chris Sosa <sosa@chromium.org> Tested-by: Ben Chan <benchan@chromium.org> Commit-Queue: Ben Chan <benchan@chromium.org>
/system/update_engine/connection_manager_unittest.cc
|
1c4e6382a74db329a3cfad10e68dd077cb75e5c4 |
|
15-Jul-2013 |
Alex Deymo <deymo@chromium.org> |
Use the PhysicalTechnology for VPN connections. When a VPN connection is used to download an update, the Type property is decoded as kNetUnknown, allowing by default the update over that connection. If the VPN connection runs over a Cellular connection, the device policy or user setting should be checked. This patch retrieves the PhysicalTechnology property, when present, for VPN connections instead of the Type property, effectively using the real connection type instead of the unknown VPN type. BUG=chromium:210775 TEST=sudo ./update_engine_unittests Change-Id: I39506724ca24bf14360fe00129be1eb9ff2c460c Reviewed-on: https://gerrit.chromium.org/gerrit/61926 Reviewed-by: Paul Stewart <pstew@chromium.org> Reviewed-by: Chris Sosa <sosa@chromium.org> Commit-Queue: Alex Deymo <deymo@chromium.org> Tested-by: Alex Deymo <deymo@chromium.org>
/system/update_engine/connection_manager_unittest.cc
|
efb7c4c605440fdc6297deed8fa9d1aecb77235e |
|
09-Jul-2013 |
Alex Deymo <deymo@chromium.org> |
Prefs: Implement and use Prefs::GetBoolean/SetBoolean. Adds a pair of functions GetBoolean/SetBoolean to the list Prefs class to read and write persisted boolean values. The stored values are not compatible with the SetInt64 and will return false when attempting to get or set a value of the other type. These functions are now used to store the update over cellular user setting. BUG=chromium:213401 TEST=sudo ./update_engine_unittests Change-Id: I44107e33f8e81ae900671d9ba6a4f5779c2353db Reviewed-on: https://gerrit.chromium.org/gerrit/61352 Reviewed-by: Joy Chen <joychen@chromium.org> Tested-by: Alex Deymo <deymo@chromium.org> Reviewed-by: mukesh agrawal <quiche@chromium.org> Commit-Queue: Alex Deymo <deymo@chromium.org>
/system/update_engine/connection_manager_unittest.cc
|
f4867c4dab4d1ca566f1aa3f585bd16d87b911dd |
|
28-Jun-2013 |
Alex Deymo <deymo@chromium.org> |
Add DBus methods to allow/disallow updates over 3G This fix adds a new DBus pair of methods to allow/disallow the updates over cellular networks and get the current state of this setting. The setting is overridden by the device policy and the SetUpdateOverCellularPermission() method fails if called on an enrolled device that has the autoupdate settings in the device policy. BUG=chromium:213401 TEST=unittests for connection_manager changes. Manual test for the DBus service, see below. Manual test procedure. ====================== Run on a shell: 1. Test for the default setting. $ update_engine_client -show_update_over_cellular [0701/183633:INFO:update_engine_client.cc(371)] Current update over cellular network setting: DISABLED [0701/183633:INFO:update_engine_client.cc(443)] Done. 2. Test that enable works. $ update_engine_client -update_over_cellular=yes -show_update_over_cellular [0701/183655:INFO:update_engine_client.cc(371)] Current update over cellular network setting: ENABLED [0701/183655:INFO:update_engine_client.cc(443)] Done. 3. Test that disable works. $ update_engine_client -update_over_cellular=no -show_update_over_cellular [0701/183659:INFO:update_engine_client.cc(371)] Current update over cellular network setting: DISABLED [0701/183659:INFO:update_engine_client.cc(443)] Done. 4. Enable again the update over cellular, connect the chromebook to a 3G and perform an update check. Change-Id: Ic234a3ef8898b1e60e26277208276a958b7e0d94 Reviewed-on: https://gerrit.chromium.org/gerrit/60716 Reviewed-by: Chris Sosa <sosa@chromium.org> Commit-Queue: Alex Deymo <deymo@chromium.org> Tested-by: Alex Deymo <deymo@chromium.org>
/system/update_engine/connection_manager_unittest.cc
|
6f6ea00aa8c4cf54b6842be32ca1226854c24f78 |
|
14-Dec-2012 |
Jay Srinivasan <jaysri@chromium.org> |
Support for processing multiple URLs in update_engine. Main changes: 1. Added a new PayloadState class which encapsulates all the persisted state we use for multiple URLs, back-off (TBD), etc. 2. Added support for handling multiple URLs stored in the OmahaResponse in OmahaRequestAction and OmahaResponseHandlerAction code. 3. Added support for picking the right URL in OmahaResponseHandlerAction and putting it in the install_plan. This way, the rest of the code that uses the install_plan is oblivious to the presence of multiple URLs :-) 4. Added support for advancing to next URL when an update fails. The full error classification is a new work item (chromium-os:37206). Right now, it's a basic round-robin on every error. 5. Updated the conditions for determining when hash checks are mandatory. Previously since there was only one URL, if it was HTTPS, the checks were waived. Now, even if there's one HTTP URL, we make hash checks mandatory even if other HTTPS URLs are present. 6. Added new unit tests for PayloadState and the new logic added to other places. Noisy changes: 1. Instead of passing PrefsInterface to OmahaRequestAction and OmahaResponseHandlerAction, we're now passing SystemState which will now contain PrefsInterface and the newly added PayloadState object that these actions need to do their work. 2. Renamed a bunch of setters/getters to set_x() and x() instead of SetX() and GetX() methods - this was pending from Gilad's old CR. As I'm adding new methods in the correct style, I went ahead and fixed it to avoid the confusing styles. 3. Updated all existing unit tests to reflect these changes. BUG=chromium-os:36807 TEST=All Single/Multiple URL scenarios work fine on my ZGB as expected. TEST=Old and new unit tests run fine. Change-Id: Id31f9ccb220471f3ec3a475f624dc03c16119144 Reviewed-on: https://gerrit.chromium.org/gerrit/39638 Commit-Ready: Jay Srinivasan <jaysri@chromium.org> Reviewed-by: Jay Srinivasan <jaysri@chromium.org> Tested-by: Jay Srinivasan <jaysri@chromium.org>
/system/update_engine/connection_manager_unittest.cc
|
4348879380222dc8c74b0976e527bf3da66ba08f |
|
19-Jun-2012 |
Jay Srinivasan <jaysri@chromium.org> |
UpdateEngine-side changes to allow updates over 3G based on device policy. Some enterprise chromebooks have only 3G and hence they need the ability to update over 3G if the enterprise policy allows that. This CL adds the support in update_engine to enable that. BUG=chromium-os:31099 TEST=Tested E2E on 3G, added unit tests and did regression testing. CQ-DEPEND=I1a55a392f3dc0f12d917eb45dcf0456b57735514 Change-Id: I121bda35e54fa6c35e002a76db198d13b72b650e Reviewed-on: https://gerrit.chromium.org/gerrit/25470 Commit-Ready: Jay Srinivasan <jaysri@chromium.org> Reviewed-by: Jay Srinivasan <jaysri@chromium.org> Tested-by: Jay Srinivasan <jaysri@chromium.org>
/system/update_engine/connection_manager_unittest.cc
|