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

Side by Side Diff: net/http/http_cache_transaction.cc

Issue 935333002: Update from https://crrev.com/316786 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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
« no previous file with comments | « net/http/http_cache_transaction.h ('k') | net/http/http_cache_unittest.cc » ('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) 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 "net/http/http_cache_transaction.h" 5 #include "net/http/http_cache_transaction.h"
6 6
7 #include "build/build_config.h" 7 #include "build/build_config.h"
8 8
9 #if defined(OS_POSIX) 9 #if defined(OS_POSIX)
10 #include <unistd.h> 10 #include <unistd.h>
(...skipping 2867 matching lines...) Expand 10 before | Expand all | Expand 10 after
2878 else if (mode_ & READ && entry_) 2878 else if (mode_ & READ && entry_)
2879 cache_->DoneReadingFromEntry(entry_, this); 2879 cache_->DoneReadingFromEntry(entry_, this);
2880 2880
2881 partial_.reset(NULL); 2881 partial_.reset(NULL);
2882 entry_ = NULL; 2882 entry_ = NULL;
2883 mode_ = NONE; 2883 mode_ = NONE;
2884 } 2884 }
2885 2885
2886 void HttpCache::Transaction::FixHeadersForHead() { 2886 void HttpCache::Transaction::FixHeadersForHead() {
2887 if (response_.headers->response_code() == 206) { 2887 if (response_.headers->response_code() == 206) {
2888 response_.headers->RemoveHeader("Content-Length");
2889 response_.headers->RemoveHeader("Content-Range"); 2888 response_.headers->RemoveHeader("Content-Range");
2890 response_.headers->ReplaceStatusLine("HTTP/1.1 200 OK"); 2889 response_.headers->ReplaceStatusLine("HTTP/1.1 200 OK");
2891 } 2890 }
2892 } 2891 }
2893 2892
2894 void HttpCache::Transaction::TriggerAsyncValidation() { 2893 void HttpCache::Transaction::TriggerAsyncValidation() {
2895 DCHECK(!request_->upload_data_stream); 2894 DCHECK(!request_->upload_data_stream);
2896 BoundNetLog async_revalidation_net_log( 2895 BoundNetLog async_revalidation_net_log(
2897 BoundNetLog::Make(net_log_.net_log(), NetLog::SOURCE_ASYNC_REVALIDATION)); 2896 BoundNetLog::Make(net_log_.net_log(), NetLog::SOURCE_ASYNC_REVALIDATION));
2898 net_log_.AddEvent( 2897 net_log_.AddEvent(
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after
3271 3270
3272 void HttpCache::Transaction::OnIOComplete(int result) { 3271 void HttpCache::Transaction::OnIOComplete(int result) {
3273 // TODO(vadimt): Remove ScopedTracker below once crbug.com/422516 is fixed. 3272 // TODO(vadimt): Remove ScopedTracker below once crbug.com/422516 is fixed.
3274 tracked_objects::ScopedTracker tracking_profile( 3273 tracked_objects::ScopedTracker tracking_profile(
3275 FROM_HERE_WITH_EXPLICIT_FUNCTION("422516 Transaction::OnIOComplete")); 3274 FROM_HERE_WITH_EXPLICIT_FUNCTION("422516 Transaction::OnIOComplete"));
3276 3275
3277 DoLoop(result); 3276 DoLoop(result);
3278 } 3277 }
3279 3278
3280 } // namespace net 3279 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_cache_transaction.h ('k') | net/http/http_cache_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698