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

Issue 222009: Replace some net::ERR_FAILED generic error codes with more specific codes.... (Closed)

Created:
11 years, 3 months ago by eroman
Modified:
9 years, 6 months ago
CC:
chromium-reviews_googlegroups.com, darin (slow to review), brettw
Visibility:
Public.

Description

Replace some net::ERR_FAILED generic error codes with more specific codes. The goal is to end up with more meaningful errors if a page fails to load. BUG=22623 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=27038

Patch Set 1 #

Total comments: 5

Patch Set 2 : Change API of CreateTransaction #

Total comments: 8

Patch Set 3 : Address wtc's comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+134 lines, -93 lines) Patch
M net/base/net_error_list.h View 1 2 1 chunk +8 lines, -3 lines 0 comments Download
M net/http/http_cache.h View 1 chunk +1 line, -1 line 0 comments Download
M net/http/http_cache.cc View 3 chunks +8 lines, -6 lines 0 comments Download
M net/http/http_cache_unittest.cc View 18 chunks +76 lines, -58 lines 0 comments Download
M net/http/http_network_layer.h View 1 chunk +1 line, -1 line 0 comments Download
M net/http/http_network_layer.cc View 2 1 chunk +4 lines, -3 lines 0 comments Download
M net/http/http_network_layer_unittest.cc View 2 4 chunks +17 lines, -6 lines 0 comments Download
M net/http/http_transaction_factory.h View 1 2 chunks +5 lines, -2 lines 0 comments Download
M net/http/http_transaction_unittest.h View 2 chunks +6 lines, -3 lines 0 comments Download
M net/tools/fetch/fetch_client.cc View 1 chunk +2 lines, -1 line 0 comments Download
M net/url_request/url_request_http_job.cc View 1 1 chunk +4 lines, -7 lines 0 comments Download
M net/url_request/url_request_job.cc View 1 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
eroman
11 years, 3 months ago (2009-09-23 20:29:38 UTC) #1
wtc
LGTM. Thanks! Please improve the error code names and descriptions. The other comments are just ...
11 years, 3 months ago (2009-09-23 21:07:39 UTC) #2
eroman
Please review the new patchset (adds a bunch more files). http://codereview.chromium.org/222009/diff/1/3 File net/base/net_error_list.h (right): http://codereview.chromium.org/222009/diff/1/3#newcode276 ...
11 years, 3 months ago (2009-09-23 22:13:47 UTC) #3
wtc
LGTM. Too bad we need to change so many files. Please see my comments below ...
11 years, 3 months ago (2009-09-23 23:13:00 UTC) #4
eroman
http://codereview.chromium.org/222009/diff/10/4003 File net/base/net_error_list.h (left): http://codereview.chromium.org/222009/diff/10/4003#oldcode269 Line 269: // The network transaction factory of the cache ...
11 years, 3 months ago (2009-09-24 00:10:44 UTC) #5
rvargas (doing something else)
> > > > Do you think the Suspend method is useful for other > ...
11 years, 3 months ago (2009-09-24 01:14:53 UTC) #6
wtc
Eric, Ricardo, It's unfortunate that we had to change the prototype of CreateTransaction to return ...
11 years, 3 months ago (2009-09-24 17:06:45 UTC) #7
eroman
sounds fine. in addition to Start(), this should probably also apply for redirects too (which ...
11 years, 3 months ago (2009-09-24 20:14:28 UTC) #8
rvargas (doing something else)
11 years, 3 months ago (2009-09-24 23:27:25 UTC) #9
We can do that. However, I would prefer something like the first version of this
CL, returning CANNOT_CREATE_NETWORK_TRANSACTION at the two places where we check
that the transaction was actually created. I know it's not the cleanest solution
but I think it's the simplest one.

It looks like there is no undesirable side effect to create the transaction when
the system is going to sleep, but doing nothing seems better.

On 2009/09/24 20:14:28, eroman wrote:
> sounds fine.
> 
> in addition to Start(), this should probably also apply for redirects
> too (which create a job, which may create a transaction).
> 
> On Thu, Sep 24, 2009 at 10:06 AM,  <mailto:wtc@chromium.org> wrote:
> > Eric, Ricardo,
> >
> > It's unfortunate that we had to change the prototype of
> > CreateTransaction to return an error code. =A0Now
> > CreateTransaction looks different from all the other
> > factory methods in our source tree.
> >
> > I have a better idea now. =A0Let's restore the original
> > prototype of CreateTransaction but change the way we
> > suspend network IO. =A0Rather than suppressing the
> > creation of network transactions, we can suppress the
> > Start method instead. =A0In other words, we still create
> > a network transaction, but its Start method returns
> > ERR_NETWORK_IO_SUSPENDED if the suspended_ state is
> > true.
> >
> > This will require some changes to allow a network
> > transaction to access the suspended_ state variable,
> > but I think it's more in keeping with the design of
> > our HttpTransaction interface.
> >
> > What do you think?
> >
> > http://codereview.chromium.org/222009
> >

Powered by Google App Engine
This is Rietveld 408576698