History log of /system/update_engine/connection_manager.cc
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
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.cc
1fbaac8c911ee484de521e8302d28543ad33cfe1 04-Nov-2015 Alex Deymo <deymo@google.com> Handle not connected message from shill.

When shill is not connected it exposes the service path / as the default
service path. Nevertheless, this service path doesn't implement the
org.chromium.flimflam.Service interface, so we can't call any method
there. This patch handles this situation removing the misleading
error messages from the logs.

Bug: None
Change-Id: Id936584235d25914d5a2d44e88aeb54703dc376b
Test: Applied a payload, no more GetProperties() errors when not connected.
/system/update_engine/connection_manager.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.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.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.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.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.cc
0b3db6b6040f53eb9859e614f7fe4c681213d33a 11-Aug-2015 Alex Deymo <deymo@chromium.org> update_engine: Remove all references to glib.

The message loop in production code switched from
chromeos::GlibMessageLoop to chromeos::BaseMessageLoop used in
chromeos::Dameon. This patch moves all the unittests also to use
chromeos::BaseMessageLoop or chromeos::FakeMessageLoop when I/O is not
required.

This patch removes all (now unused) references to glib.

BUG=chromium:499886
TEST=`grep glib[^c] . -R` return no results. Also, unittests work.

Change-Id: Iddfb17def501829d932ed1f70faad3e00268898e
Reviewed-on: https://chromium-review.googlesource.com/292157
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.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.cc
f6ee0163504eaf1a7cc136ba2c075d77ae2b4dd5 31-Jul-2015 Alex Deymo <deymo@chromium.org> update_engine: Move ConnectionManager to an abstract Interface.

MockConnectionManager required to use one of ConnectionManager
constructors passing pointers that won't be use by the mock. This
patch moves the interface to its own ConnectionManagerInterface class.

BUG=None
TEST=unittests still pass.

Change-Id: I9ed09daf8e4256304be7dab30cfbe751901dc24b
Reviewed-on: https://chromium-review.googlesource.com/290120
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>
/system/update_engine/connection_manager.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.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.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.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.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.cc
9a423ff19e3a7503cd8128998b3a10d65c499fdc 27-Mar-2014 Gilad Arnold <garnold@chromium.org> Removed redundant clause in conditional.

BUG=None
TEST=None

Change-Id: I9f61e480c09b10e7ff4c7bf5d0f3630e91b678ec
Reviewed-on: https://chromium-review.googlesource.com/192011
Tested-by: Gilad Arnold <garnold@chromium.org>
Reviewed-by: Alex Deymo <deymo@chromium.org>
Commit-Queue: Gilad Arnold <garnold@chromium.org>
/system/update_engine/connection_manager.cc
75039d7397f03dff77bdf4e26398049ff88edc4c 25-Mar-2014 Alex Vakulenko <avakulenko@chromium.org> update_engine: update to libbase 242728

Made update_engine link with libchrome-242728 and fixed compile
issues due to changes in namespaces and include file layout.

Also removed some of suppressed compiler warnings and fixed the
issues masked by them (e.g. mismatched printf-like specifiers).

Added -Wextra compiler option to enable additional useful warnings
to ensure more strict checking... Had to disable "unused-parameter"
though since we have a lot of functions (mainly in fakes) that do
not use all of their parameters.

BUG=chromium:351593
TEST=Unit tests passed.
CQ-DEPEND=CL:191721

Change-Id: I1aa63a48d5f1f4ea75ba6b00aec7aa5f3bad15c4
Reviewed-on: https://chromium-review.googlesource.com/191510
Reviewed-by: Alex Vakulenko <avakulenko@chromium.org>
Commit-Queue: Alex Vakulenko <avakulenko@chromium.org>
Tested-by: Alex Vakulenko <avakulenko@chromium.org>
/system/update_engine/connection_manager.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.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.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.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.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.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.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.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.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.cc