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

Side by Side Diff: net/url_request/url_request_http_job.cc

Issue 56043: Use HTTP status return code to make SDCH handling more robust... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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 | Annotate | Revision Log
« no previous file with comments | « net/url_request/url_request_http_job.h ('k') | net/url_request/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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 "net/url_request/url_request_http_job.h" 5 #include "net/url_request/url_request_http_job.h"
6 6
7 #include "base/base_switches.h" 7 #include "base/base_switches.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 return false; 175 return false;
176 176
177 if (response_cookies_.empty()) 177 if (response_cookies_.empty())
178 FetchResponseCookies(); 178 FetchResponseCookies();
179 179
180 cookies->clear(); 180 cookies->clear();
181 cookies->swap(response_cookies_); 181 cookies->swap(response_cookies_);
182 return true; 182 return true;
183 } 183 }
184 184
185 int URLRequestHttpJob::GetResponseCode() { 185 int URLRequestHttpJob::GetResponseCode() const {
186 DCHECK(transaction_.get()); 186 DCHECK(transaction_.get());
187 187
188 if (!response_info_) 188 if (!response_info_)
189 return -1; 189 return -1;
190 190
191 return response_info_->headers->response_code(); 191 return response_info_->headers->response_code();
192 } 192 }
193 193
194 bool URLRequestHttpJob::GetContentEncodings( 194 bool URLRequestHttpJob::GetContentEncodings(
195 std::vector<Filter::FilterType>* encoding_types) { 195 std::vector<Filter::FilterType>* encoding_types) {
(...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after
606 DCHECK(response_info_); 606 DCHECK(response_info_);
607 DCHECK(response_cookies_.empty()); 607 DCHECK(response_cookies_.empty());
608 608
609 std::string name = "Set-Cookie"; 609 std::string name = "Set-Cookie";
610 std::string value; 610 std::string value;
611 611
612 void* iter = NULL; 612 void* iter = NULL;
613 while (response_info_->headers->EnumerateHeader(&iter, name, &value)) 613 while (response_info_->headers->EnumerateHeader(&iter, name, &value))
614 response_cookies_.push_back(value); 614 response_cookies_.push_back(value);
615 } 615 }
OLDNEW
« no previous file with comments | « net/url_request/url_request_http_job.h ('k') | net/url_request/url_request_job.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698