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

Side by Side Diff: content/browser/service_worker/service_worker_url_request_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: Add a TODO Created 6 years, 5 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/service_worker/service_worker_url_request_job.h" 5 #include "content/browser/service_worker/service_worker_url_request_job.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/strings/stringprintf.h" 8 #include "base/strings/stringprintf.h"
9 #include "content/browser/service_worker/service_worker_fetch_dispatcher.h" 9 #include "content/browser/service_worker/service_worker_fetch_dispatcher.h"
10 #include "content/browser/service_worker/service_worker_provider_host.h" 10 #include "content/browser/service_worker/service_worker_provider_host.h"
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 } 106 }
107 107
108 blob_request_->Read(buf, buf_size, bytes_read); 108 blob_request_->Read(buf, buf_size, bytes_read);
109 net::URLRequestStatus status = blob_request_->status(); 109 net::URLRequestStatus status = blob_request_->status();
110 SetStatus(status); 110 SetStatus(status);
111 if (status.is_io_pending()) 111 if (status.is_io_pending())
112 return false; 112 return false;
113 return status.is_success(); 113 return status.is_success();
114 } 114 }
115 115
116 void ServiceWorkerURLRequestJob::OnReceivedRedirect(net::URLRequest* request, 116 void ServiceWorkerURLRequestJob::OnReceivedRedirect(
117 const GURL& new_url, 117 net::URLRequest* request,
118 bool* defer_redirect) { 118 const net::RedirectInfo& redirect_info,
119 bool* defer_redirect) {
119 NOTREACHED(); 120 NOTREACHED();
120 } 121 }
121 122
122 void ServiceWorkerURLRequestJob::OnAuthRequired( 123 void ServiceWorkerURLRequestJob::OnAuthRequired(
123 net::URLRequest* request, 124 net::URLRequest* request,
124 net::AuthChallengeInfo* auth_info) { 125 net::AuthChallengeInfo* auth_info) {
125 NOTREACHED(); 126 NOTREACHED();
126 } 127 }
127 128
128 void ServiceWorkerURLRequestJob::OnCertificateRequested( 129 void ServiceWorkerURLRequestJob::OnCertificateRequested(
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 void ServiceWorkerURLRequestJob::DeliverErrorResponse() { 300 void ServiceWorkerURLRequestJob::DeliverErrorResponse() {
300 // TODO(falken): Print an error to the console of the ServiceWorker and of 301 // TODO(falken): Print an error to the console of the ServiceWorker and of
301 // the requesting page. 302 // the requesting page.
302 CreateResponseHeader(500, 303 CreateResponseHeader(500,
303 "Service Worker Response Error", 304 "Service Worker Response Error",
304 std::map<std::string, std::string>()); 305 std::map<std::string, std::string>());
305 CommitResponseHeader(); 306 CommitResponseHeader();
306 } 307 }
307 308
308 } // namespace content 309 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698