Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(119)

Issue 5835004: AU: MultiHttpFetcher cleanup/rewrite (Closed)

Created:
10 years ago by adlr
Modified:
9 years ago
Reviewers:
petkov
CC:
chromium-os-reviews_chromium.org, petkov, adlr
Visibility:
Public.

Description

AU: MultiHttpFetcher cleanup/rewrite This is the first of many CLs to cleanup/refactor/unfork the HttpFetcher classes. This CL changes MultiHttpFetcher to MultiRangeHTTPFetcher, makes it work with a single base fetcher, and un-templatizes it. Also, fix a (new?) bug in SConstruct w/ setting CCFLAGS. TEST=unittests, tested an interrupted/resumed update on device. BUG=10395 Committed: http://chrome-svn/viewvc/chromeos?view=rev&revision=819fef2

Patch Set 1 #

Total comments: 50

Patch Set 2 : fix review comments #

Total comments: 12

Patch Set 3 : fixes for review/merge latest trunk #

Unified diffs Side-by-side diffs Delta from patch set Stats (+332 lines, -282 lines) Patch
M SConstruct View 1 2 3 chunks +3 lines, -2 lines 0 comments Download
M http_fetcher.h View 1 2 chunks +10 lines, -6 lines 0 comments Download
M http_fetcher_unittest.cc View 1 10 chunks +25 lines, -18 lines 0 comments Download
M libcurl_http_fetcher.cc View 1 chunk +1 line, -0 lines 0 comments Download
D multi_http_fetcher.h View 1 chunk +0 lines, -245 lines 0 comments Download
A multi_range_http_fetcher.h View 1 2 1 chunk +126 lines, -0 lines 0 comments Download
A multi_range_http_fetcher.cc View 1 2 1 chunk +158 lines, -0 lines 0 comments Download
M update_attempter.cc View 1 4 chunks +9 lines, -11 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
adlr
10 years ago (2010-12-16 05:50:31 UTC) #1
petkov
This looks better, I think -- thanks for cleaning up. Some comments below. http://codereview.chromium.org/5835004/diff/1/http_fetcher.h File ...
10 years ago (2010-12-16 18:30:56 UTC) #2
adlr
Addressed your comments. Please have another look. Thanks, http://codereview.chromium.org/5835004/diff/1/http_fetcher.h File http_fetcher.h (right): http://codereview.chromium.org/5835004/diff/1/http_fetcher.h#newcode91 http_fetcher.h:91: virtual ...
10 years ago (2010-12-17 01:03:51 UTC) #3
petkov
LGTM w/ some nits mostly about comments. http://codereview.chromium.org/5835004/diff/7001/multi_range_http_fetcher.cc File multi_range_http_fetcher.cc (right): http://codereview.chromium.org/5835004/diff/7001/multi_range_http_fetcher.cc#newcode84 multi_range_http_fetcher.cc:84: // Terminates ...
10 years ago (2010-12-17 13:37:25 UTC) #4
petkov
http://codereview.chromium.org/5835004/diff/7001/multi_range_http_fetcher.cc File multi_range_http_fetcher.cc (right): http://codereview.chromium.org/5835004/diff/7001/multi_range_http_fetcher.cc#newcode97 multi_range_http_fetcher.cc:97: CHECK(base_fetcher_active_) << "Transfer ended unexpectedly."; Btw, you could also ...
10 years ago (2010-12-17 18:50:23 UTC) #5
adlr
10 years ago (2010-12-17 19:34:15 UTC) #6
thanks. fixed and pushed

http://codereview.chromium.org/5835004/diff/7001/multi_range_http_fetcher.cc
File multi_range_http_fetcher.cc (right):

http://codereview.chromium.org/5835004/diff/7001/multi_range_http_fetcher.cc#...
multi_range_http_fetcher.cc:84: // Terminates the current fetcher. Waits for its
TransferTerminated
On 2010/12/17 13:37:25, petkov wrote:
> this comment needs to be updated to reflect the fact that we're reusing the
same
> base fetcher.

Done.

http://codereview.chromium.org/5835004/diff/7001/multi_range_http_fetcher.cc#...
multi_range_http_fetcher.cc:97: CHECK(base_fetcher_active_) << "Transfer ended
unexpectedly.";
On 2010/12/17 18:50:24, petkov wrote:
> Btw, you could also CHECK here that fetcher == base_fetcher_

Done.

http://codereview.chromium.org/5835004/diff/7001/multi_range_http_fetcher.cc#...
multi_range_http_fetcher.cc:127: LOG(INFO) << "Starting next transfer.";
On 2010/12/17 13:37:25, petkov wrote:
> maybe include the index in the log...

Done.

http://codereview.chromium.org/5835004/diff/7001/multi_range_http_fetcher.cc#...
multi_range_http_fetcher.cc:145: void
MultiRangeHTTPFetcher::TransferTerminated(HttpFetcher* fetcher) {
On 2010/12/17 13:37:25, petkov wrote:
> add a blank line

Done.

http://codereview.chromium.org/5835004/diff/7001/multi_range_http_fetcher.h
File multi_range_http_fetcher.h (right):

http://codereview.chromium.org/5835004/diff/7001/multi_range_http_fetcher.h#n...
multi_range_http_fetcher.h:16: // This class is a simple wrapper around an
HttpFetcher. The client
On 2010/12/17 13:37:25, petkov wrote:
> maybe we should document here that the same base http fetcher is reused for
all
> ranges so it should support starting/terminating transfers through the same
> class instance. or maybe that should be documented as a requirement in the
> HttpFetcher.

Done.

http://codereview.chromium.org/5835004/diff/7001/multi_range_http_fetcher.h#n...
multi_range_http_fetcher.h:113: typedef std::vector<std::pair<off_t, off_t> >
RangesVect;
On 2010/12/17 13:37:25, petkov wrote:
> per style, the typedef should be right after private:, I think

Done.

Powered by Google App Engine
This is Rietveld 408576698