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

Side by Side Diff: content/browser/appcache/appcache_update_job.cc

Issue 398903002: Plumb redirect info out of net, through content, and into child processes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: darin comments Created 6 years, 4 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
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 "content/browser/appcache/appcache_update_job.h" 5 #include "content/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 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 void AppCacheUpdateJob::URLFetcher::Start() { 133 void AppCacheUpdateJob::URLFetcher::Start() {
134 request_->set_first_party_for_cookies(job_->manifest_url_); 134 request_->set_first_party_for_cookies(job_->manifest_url_);
135 request_->SetLoadFlags(request_->load_flags() | 135 request_->SetLoadFlags(request_->load_flags() |
136 net::LOAD_DISABLE_INTERCEPT); 136 net::LOAD_DISABLE_INTERCEPT);
137 if (existing_response_headers_.get()) 137 if (existing_response_headers_.get())
138 AddConditionalHeaders(existing_response_headers_.get()); 138 AddConditionalHeaders(existing_response_headers_.get());
139 request_->Start(); 139 request_->Start();
140 } 140 }
141 141
142 void AppCacheUpdateJob::URLFetcher::OnReceivedRedirect( 142 void AppCacheUpdateJob::URLFetcher::OnReceivedRedirect(
143 net::URLRequest* request, const GURL& new_url, bool* defer_redirect) { 143 net::URLRequest* request,
144 const net::RedirectInfo& redirect_info,
145 bool* defer_redirect) {
144 DCHECK(request_ == request); 146 DCHECK(request_ == request);
145 // Redirect is not allowed by the update process. 147 // Redirect is not allowed by the update process.
146 job_->MadeProgress(); 148 job_->MadeProgress();
147 redirect_response_code_ = request->GetResponseCode(); 149 redirect_response_code_ = request->GetResponseCode();
148 request->Cancel(); 150 request->Cancel();
149 result_ = REDIRECT_ERROR; 151 result_ = REDIRECT_ERROR;
150 OnResponseCompleted(); 152 OnResponseCompleted();
151 } 153 }
152 154
153 void AppCacheUpdateJob::URLFetcher::OnResponseStarted( 155 void AppCacheUpdateJob::URLFetcher::OnResponseStarted(
(...skipping 1448 matching lines...) Expand 10 before | Expand all | Expand 10 after
1602 1604
1603 // Break the connection with the group so the group cannot call delete 1605 // Break the connection with the group so the group cannot call delete
1604 // on this object after we've posted a task to delete ourselves. 1606 // on this object after we've posted a task to delete ourselves.
1605 group_->SetUpdateAppCacheStatus(AppCacheGroup::IDLE); 1607 group_->SetUpdateAppCacheStatus(AppCacheGroup::IDLE);
1606 group_ = NULL; 1608 group_ = NULL;
1607 1609
1608 base::MessageLoop::current()->DeleteSoon(FROM_HERE, this); 1610 base::MessageLoop::current()->DeleteSoon(FROM_HERE, this);
1609 } 1611 }
1610 1612
1611 } // namespace content 1613 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/appcache/appcache_update_job.h ('k') | content/browser/download/download_resource_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698