History log of /system/update_engine/proxy_resolver.h
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/proxy_resolver.h
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/proxy_resolver.h
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/proxy_resolver.h
60ca1a7bca7cc804ec80b510483081ef894de4cd 19-Jun-2015 Alex Deymo <deymo@chromium.org> update_engine: Migrate time-based glib main loop calls to MessageLoop.

This patch replaces most calls to g_idle_add* and g_timeout_add* with
the equivalent MessageLoop::Post*Task(). To maintain compatibility with
unittests running the main loop and doing I/O we instantiate a
GlibMessageLoop for those tests.

BUG=chromium:499886
TEST=unittests still pass.

Change-Id: Ic87ba69bc47391ac3c36d1bfc3ca28d069666af1
Reviewed-on: https://chromium-review.googlesource.com/281197
Reviewed-by: Alex Vakulenko <avakulenko@chromium.org>
Tested-by: Alex Deymo <deymo@chromium.org>
Commit-Queue: Alex Deymo <deymo@chromium.org>
Trybot-Ready: Alex Deymo <deymo@chromium.org>
/system/update_engine/proxy_resolver.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/proxy_resolver.h
4906c1c6dac2ef7916bfa7193cc9324e99b4d223 21-Aug-2014 Alex Vakulenko <avakulenko@chromium.org> update_engine: Replace googe::protobuf::Closure with base::Closure

In order to clean up libchromeos, remove chromeos/callback.h and
switch update_engine from using
googe::protobuf::Closure/NewPermanentCallback to base::Closure/Bind

BUG=chromium:406060
TEST=FEATURES=test emerge-link update_engine

Change-Id: I02d222c3f6c9a5bf5177d58e3a25a596348619bf
Reviewed-on: https://chromium-review.googlesource.com/213675
Tested-by: Alex Vakulenko <avakulenko@chromium.org>
Reviewed-by: David Zeuthen <zeuthen@chromium.org>
Reviewed-by: Alex Deymo <deymo@chromium.org>
Commit-Queue: Alex Vakulenko <avakulenko@chromium.org>
/system/update_engine/proxy_resolver.h
cf175a098081f3f0e9ca52d997a7ce1585c14c2d 11-Jul-2014 Gilad Arnold <garnold@chromium.org> Fix cpplint errors.

The only non-obvious change here is the switch from dynamic_cast to
static_cast in three cases of down-casting in UpdateAttempter.
dynamic_cast is banned by style, nor does it add any safety in this
particular case (subsequent code dereferences the result right away
without checking whether it's null).

BUG=None
TEST=None

Change-Id: I9d49b46362feaf9c6fa13b2715ebe9fe50308a9a
Reviewed-on: https://chromium-review.googlesource.com/207470
Tested-by: Gilad Arnold <garnold@chromium.org>
Reviewed-by: Alex Vakulenko <avakulenko@chromium.org>
Commit-Queue: Gilad Arnold <garnold@chromium.org>
/system/update_engine/proxy_resolver.h
759c275760b51defcfe5545abb887ad2616335f4 18-Mar-2014 Alex Deymo <deymo@chromium.org> Fix header guards to comply with Google Coding Style.

The Google Style Guide says that every header file should have a
define guard and the format of the symbol name should be
<PROJECT>_<PATH>_<FILE>_H_

This patch does all the minor fixes to comply with this and includes
a header guard for the bzip.h file, which didn't have it.

Also, the Copyright notice is adjusted to the Chromium OS code,
replacing "Chromium Authors" by "Chromium OS Authors".

BUG=None
TEST=build passes.

Change-Id: I6575cc307c464d60a5cb2b132cf1e46acb6500b5
Reviewed-on: https://chromium-review.googlesource.com/190445
Tested-by: Alex Deymo <deymo@chromium.org>
Reviewed-by: Don Garrett <dgarrett@chromium.org>
Commit-Queue: Alex Deymo <deymo@chromium.org>
/system/update_engine/proxy_resolver.h
9bedeb51f80c9547269eef6c2ec09596033bb818 18-Nov-2011 Gilad Arnold <garnold@chromium.org> Fetcher tries all proxies when a secondary chunk download error occurs.

This is a fix to issue 18143:

* New test cases for asserting the desired behavior: if a transfer of
a secondary chunk within a multi-chunk fetch fails, then the fetcher
needs to retry with other available proxies; it will only fail when no
additional proxies are available. The tests ensure both success (one
of the proxies eventually succeeds) and failure (all proxies fail)
cases.

* Small fix to LibcurlHttpFetcher to retry with other proxies upon
failure (error value) of a secondary chunk.

Other changes applied in the course of this fix:

* Massive refactoring of http_fetcher_unittest: substituted template
specialization in typed test setup with proper subclassing, resulting
in a safer and more maintainable infrastructure; extended URLs to
include all (most) parameters pertaining to test workload, such as
download size, flakiness, etc.

* Respective changes to test_http_server: it is now much more
independent of particular kind of tests, and more easily
parametrizable. Also, generalized several internal methods for better
readability and extensibility, such as writing of arbitrary payloads,
parsing headers,

* Migrated common definitions into http_common.{h,cc} (universal
HTTP-related stuff) and http_fetcher_unittest.h (shared definitions
pertaining to unit tests).

* Extended direct proxy resolver to generate a list of (non-) proxies,
so we can unit test proxy failure. Also, better logging to improve
testability.

* Some renaming of classes for better consistency.

BUG=chromium-os:18143
TEST=unit tests

Change-Id: Ib90b53394d7e47184d9953df8fc80348921e8af0
Reviewed-on: https://gerrit.chromium.org/gerrit/12092
Commit-Ready: Gilad Arnold <garnold@chromium.org>
Reviewed-by: Gilad Arnold <garnold@chromium.org>
Tested-by: Gilad Arnold <garnold@chromium.org>
/system/update_engine/proxy_resolver.h
f3ed8e7d4ad456a3c841d8a530f308b6fcb2a4cc 16-Feb-2011 Andrew de los Reyes <adlr@chromium.org> AU: Make proxy resolution asynchronous.

This doesn't change proxy resolution overall (we still use settings
stored in the session manager), but it changes the implementation in
the updater to be asynchronous. The clients of the proxy resolver now
give a callback to be called when the proxies are known.

This is anticipation of a switch to using Chrome to resolve proxies,
which will need to be asynchronous.

BUG=chromium-os:12079
TEST=unittests; tested update on device w/ and w/o proxy settings

Review URL: http://codereview.chromium.org/6516026

Change-Id: Icc5c08e3abf4381be55d8d555020d4c630a07fd6
/system/update_engine/proxy_resolver.h
4516810fe41a39c0c55d2095679898787259ae38 22-Nov-2010 Andrew de los Reyes <adlr@chromium.org> AU: Manual proxy support

Utilize the ChromeProxyResolver to resolve proxies in our network
requests. This means the following changes:

- HttpFetcher classes take a ProxyResolver* in their ctor. Also, a few
useful functions in HttpFetcher to allow subclasses to iterate
through the proxies.

- LibcurlHttpFetcher support for using the ProxyResolver. It will
attempt to use each proxy in the order specified. If any data comes
in from any proxy, it won't continue down the list and will continue
to use that proxy for its lifetime.

- UpdateAttempter can choose, for a given update session, whether or
not to use the ChromeProxyResolver or DirectProxyResolver. For now,
the logic is: for automatic checks, 80% of the time use
ChromeProxyResolver, 20% DirectProxyResolver. For manual checks, the
first 19 manual checks in a row use Chrome, then once it uses
Direct, then starts over again. The idea is that the updater doesn't
necessarily trust Chrome, so some requests should skip it. If a
manual check is performed, the user likely wants her proxy settings
honored, so use them, but don't allow frequent manual checks to
starve out usage of the DirectProxyResolver.

- Updates to tests

BUG=3167
TEST=unittests, tested on device

Review URL: http://codereview.chromium.org/5205002

Change-Id: Iee0f589e5b28d4b804afe1f5b6729ba066d48d62
/system/update_engine/proxy_resolver.h
9cd120d525cffe25fcf8af65be991bca04e3bfb1 19-Nov-2010 Andrew de los Reyes <adlr@chromium.org> AU: Proxy Resolver classes

A collection of classes (abstract ProxyResolver interface and two
concrete implementations). The abstraction is one that should suit us
moving forward: a string URL is provided and a collection of proxy
servers is returned. One implementation always returns [no
proxy]. Another returns [manual settings from chrome, if applicable,
..., no proxy].

A future concrete implementation will consult Chrome via DBus with the
URL in question, however this is delayed until Chrome exposes such an
API.

As a result of this API missing from Chrome, this CL only resolves
proxies for a URL with manually input proxy settings.

Future CLs will integrate this into the rest of the update system.

BUG=3167
TEST=unit tests, (with future CLs) working proxy support on device

Review URL: http://codereview.chromium.org/5151005

Change-Id: If9dc6d09da681bca6f6ae74c896ba946ab81cb4d
/system/update_engine/proxy_resolver.h