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

Side by Side Diff: trunk/src/webkit/browser/appcache/appcache_update_job.cc

Issue 47563006: Revert 232802 "[Net] Assert that URLRequests with LOAD_IGNORE_LI..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 1 month 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 | « trunk/src/net/url_request/url_request_unittest.cc ('k') | no next file » | 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/browser/appcache/appcache_update_job.h" 5 #include "webkit/browser/appcache/appcache_update_job.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 retry_503_attempts_(0), 101 retry_503_attempts_(0),
102 buffer_(new net::IOBuffer(kBufferSize)), 102 buffer_(new net::IOBuffer(kBufferSize)),
103 request_(job->service_->request_context() 103 request_(job->service_->request_context()
104 ->CreateRequest(url, net::DEFAULT_PRIORITY, this)) {} 104 ->CreateRequest(url, net::DEFAULT_PRIORITY, this)) {}
105 105
106 AppCacheUpdateJob::URLFetcher::~URLFetcher() { 106 AppCacheUpdateJob::URLFetcher::~URLFetcher() {
107 } 107 }
108 108
109 void AppCacheUpdateJob::URLFetcher::Start() { 109 void AppCacheUpdateJob::URLFetcher::Start() {
110 request_->set_first_party_for_cookies(job_->manifest_url_); 110 request_->set_first_party_for_cookies(job_->manifest_url_);
111 request_->SetLoadFlags(request_->load_flags() | 111 request_->set_load_flags(request_->load_flags() |
112 net::LOAD_DISABLE_INTERCEPT); 112 net::LOAD_DISABLE_INTERCEPT);
113 if (existing_response_headers_.get()) 113 if (existing_response_headers_.get())
114 AddConditionalHeaders(existing_response_headers_.get()); 114 AddConditionalHeaders(existing_response_headers_.get());
115 request_->Start(); 115 request_->Start();
116 } 116 }
117 117
118 void AppCacheUpdateJob::URLFetcher::OnReceivedRedirect( 118 void AppCacheUpdateJob::URLFetcher::OnReceivedRedirect(
119 net::URLRequest* request, const GURL& new_url, bool* defer_redirect) { 119 net::URLRequest* request, const GURL& new_url, bool* defer_redirect) {
120 DCHECK(request_ == request); 120 DCHECK(request_ == request);
121 // Redirect is not allowed by the update process. 121 // Redirect is not allowed by the update process.
122 request->Cancel(); 122 request->Cancel();
(...skipping 1244 matching lines...) Expand 10 before | Expand all | Expand 10 after
1367 1367
1368 // Break the connection with the group so the group cannot call delete 1368 // Break the connection with the group so the group cannot call delete
1369 // on this object after we've posted a task to delete ourselves. 1369 // on this object after we've posted a task to delete ourselves.
1370 group_->SetUpdateStatus(AppCacheGroup::IDLE); 1370 group_->SetUpdateStatus(AppCacheGroup::IDLE);
1371 group_ = NULL; 1371 group_ = NULL;
1372 1372
1373 base::MessageLoop::current()->DeleteSoon(FROM_HERE, this); 1373 base::MessageLoop::current()->DeleteSoon(FROM_HERE, this);
1374 } 1374 }
1375 1375
1376 } // namespace appcache 1376 } // namespace appcache
OLDNEW
« no previous file with comments | « trunk/src/net/url_request/url_request_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698