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

Side by Side Diff: storage/browser/fileapi/file_system_url_request_job.cc

Issue 2822593003: Remove URLRequestJob::GetResponseCode implementations (Closed)
Patch Set: Fix Created 3 years, 8 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
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 "storage/browser/fileapi/file_system_url_request_job.h" 5 #include "storage/browser/fileapi/file_system_url_request_job.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <vector> 9 #include <vector>
10 10
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 } 136 }
137 } 137 }
138 } 138 }
139 } 139 }
140 140
141 void FileSystemURLRequestJob::GetResponseInfo(net::HttpResponseInfo* info) { 141 void FileSystemURLRequestJob::GetResponseInfo(net::HttpResponseInfo* info) {
142 if (response_info_) 142 if (response_info_)
143 *info = *response_info_; 143 *info = *response_info_;
144 } 144 }
145 145
146 int FileSystemURLRequestJob::GetResponseCode() const {
147 if (response_info_)
148 return 200;
149 return URLRequestJob::GetResponseCode();
150 }
151
152 void FileSystemURLRequestJob::StartAsync() { 146 void FileSystemURLRequestJob::StartAsync() {
153 if (!request_) 147 if (!request_)
154 return; 148 return;
155 DCHECK(!reader_.get()); 149 DCHECK(!reader_.get());
156 url_ = file_system_context_->CrackURL(request_->url()); 150 url_ = file_system_context_->CrackURL(request_->url());
157 if (!url_.is_valid()) { 151 if (!url_.is_valid()) {
158 file_system_context_->AttemptAutoMountForURLRequest( 152 file_system_context_->AttemptAutoMountForURLRequest(
159 request_, 153 request_,
160 storage_domain_, 154 storage_domain_,
161 base::Bind(&FileSystemURLRequestJob::DidAttemptAutoMount, 155 base::Bind(&FileSystemURLRequestJob::DidAttemptAutoMount,
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 replacements.SetPathStr(new_path); 244 replacements.SetPathStr(new_path);
251 *location = request_->url().ReplaceComponents(replacements); 245 *location = request_->url().ReplaceComponents(replacements);
252 *http_status_code = 301; // simulate a permanent redirect 246 *http_status_code = 301; // simulate a permanent redirect
253 return true; 247 return true;
254 } 248 }
255 249
256 return false; 250 return false;
257 } 251 }
258 252
259 } // namespace storage 253 } // namespace storage
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698