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

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

Issue 5124001: Http cache: Remove code used to track a crash. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 years, 1 month 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 | « no previous file | no next file » | 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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.h" 5 #include "net/http/http_cache.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 10
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after
398 } 398 }
399 399
400 void HttpCache::Suspend(bool suspend) { 400 void HttpCache::Suspend(bool suspend) {
401 network_layer_->Suspend(suspend); 401 network_layer_->Suspend(suspend);
402 } 402 }
403 403
404 // static 404 // static
405 bool HttpCache::ParseResponseInfo(const char* data, int len, 405 bool HttpCache::ParseResponseInfo(const char* data, int len,
406 HttpResponseInfo* response_info, 406 HttpResponseInfo* response_info,
407 bool* response_truncated) { 407 bool* response_truncated) {
408 // This block is here just to debug a Linux-only crash (bug 56449).
409 // TODO(rvargas): Remove this.
410 if (len < 4)
411 return false;
412 int payload_size = *reinterpret_cast<const int*>(data);
413 if (payload_size < 4)
414 return false;
415
416 Pickle pickle(data, len); 408 Pickle pickle(data, len);
417 return response_info->InitFromPickle(pickle, response_truncated); 409 return response_info->InitFromPickle(pickle, response_truncated);
418 } 410 }
419 411
420 void HttpCache::WriteMetadata(const GURL& url, 412 void HttpCache::WriteMetadata(const GURL& url,
421 base::Time expected_response_time, IOBuffer* buf, 413 base::Time expected_response_time, IOBuffer* buf,
422 int buf_len) { 414 int buf_len) {
423 if (!buf_len) 415 if (!buf_len)
424 return; 416 return;
425 417
(...skipping 670 matching lines...) Expand 10 before | Expand all | Expand 10 after
1096 building_backend_ = false; 1088 building_backend_ = false;
1097 DeletePendingOp(pending_op); 1089 DeletePendingOp(pending_op);
1098 } 1090 }
1099 1091
1100 // The cache may be gone when we return from the callback. 1092 // The cache may be gone when we return from the callback.
1101 if (!item->DoCallback(result, backend)) 1093 if (!item->DoCallback(result, backend))
1102 item->NotifyTransaction(result, NULL); 1094 item->NotifyTransaction(result, NULL);
1103 } 1095 }
1104 1096
1105 } // namespace net 1097 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698