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

Side by Side Diff: webkit/appcache/appcache_request_handler.cc

Issue 3187017: When an individual entry is lost from the appache's diskcache, attempts to lo... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | webkit/appcache/appcache_url_request_job.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "webkit/appcache/appcache_request_handler.h" 5 #include "webkit/appcache/appcache_request_handler.h"
6 6
7 #include "net/url_request/url_request.h" 7 #include "net/url_request/url_request.h"
8 #include "net/url_request/url_request_job.h" 8 #include "net/url_request/url_request_job.h"
9 #include "webkit/appcache/appcache.h" 9 #include "webkit/appcache/appcache.h"
10 #include "webkit/appcache/appcache_url_request_job.h" 10 #include "webkit/appcache/appcache_url_request_job.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 return NULL; 46 return NULL;
47 47
48 // This method can get called multiple times over the life 48 // This method can get called multiple times over the life
49 // of a request. The case we detect here is having scheduled 49 // of a request. The case we detect here is having scheduled
50 // delivery of a "network response" using a job setup on an 50 // delivery of a "network response" using a job setup on an
51 // earlier call thru this method. To send the request thru 51 // earlier call thru this method. To send the request thru
52 // to the network involves restarting the request altogether, 52 // to the network involves restarting the request altogether,
53 // which will call thru to our interception layer again. 53 // which will call thru to our interception layer again.
54 // This time thru, we return NULL so the request hits the wire. 54 // This time thru, we return NULL so the request hits the wire.
55 if (job_) { 55 if (job_) {
56 DCHECK(job_->is_delivering_network_response()); 56 DCHECK(job_->is_delivering_network_response() ||
57 job_->cache_entry_not_found());
57 job_ = NULL; 58 job_ = NULL;
58 return NULL; 59 return NULL;
59 } 60 }
60 61
61 // Clear out our 'found' fields since we're starting a request for a 62 // Clear out our 'found' fields since we're starting a request for a
62 // new resource, any values in those fields are no longer valid. 63 // new resource, any values in those fields are no longer valid.
63 found_entry_ = AppCacheEntry(); 64 found_entry_ = AppCacheEntry();
64 found_fallback_entry_ = AppCacheEntry(); 65 found_fallback_entry_ = AppCacheEntry();
65 found_cache_id_ = kNoCacheId; 66 found_cache_id_ = kNoCacheId;
66 found_manifest_url_ = GURL(); 67 found_manifest_url_ = GURL();
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 if (!host_->associated_cache() || 312 if (!host_->associated_cache() ||
312 !host_->associated_cache()->is_complete()) { 313 !host_->associated_cache()->is_complete()) {
313 DeliverNetworkResponse(); 314 DeliverNetworkResponse();
314 return; 315 return;
315 } 316 }
316 317
317 ContinueMaybeLoadSubResource(); 318 ContinueMaybeLoadSubResource();
318 } 319 }
319 320
320 } // namespace appcache 321 } // namespace appcache
OLDNEW
« no previous file with comments | « no previous file | webkit/appcache/appcache_url_request_job.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698