| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 "webkit/appcache/appcache_response.h" | 5 #include "webkit/appcache/appcache_response.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
| 9 #include "base/pickle.h" | 9 #include "base/pickle.h" |
| 10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 service_(service) { | 56 service_(service) { |
| 57 DCHECK(http_info); | 57 DCHECK(http_info); |
| 58 DCHECK(response_id != kNoResponseId); | 58 DCHECK(response_id != kNoResponseId); |
| 59 service_->storage()->working_set()->AddResponseInfo(this); | 59 service_->storage()->working_set()->AddResponseInfo(this); |
| 60 } | 60 } |
| 61 | 61 |
| 62 AppCacheResponseInfo::~AppCacheResponseInfo() { | 62 AppCacheResponseInfo::~AppCacheResponseInfo() { |
| 63 service_->storage()->working_set()->RemoveResponseInfo(this); | 63 service_->storage()->working_set()->RemoveResponseInfo(this); |
| 64 } | 64 } |
| 65 | 65 |
| 66 // HttpResponseInfoIOBuffer ------------------------------------------ |
| 67 |
| 68 HttpResponseInfoIOBuffer::HttpResponseInfoIOBuffer() |
| 69 : response_data_size(kUnkownResponseDataSize) {} |
| 70 |
| 71 HttpResponseInfoIOBuffer::HttpResponseInfoIOBuffer(net::HttpResponseInfo* info) |
| 72 : http_info(info), response_data_size(kUnkownResponseDataSize) {} |
| 73 |
| 74 HttpResponseInfoIOBuffer::~HttpResponseInfoIOBuffer() {} |
| 66 | 75 |
| 67 // AppCacheResponseIO ---------------------------------------------- | 76 // AppCacheResponseIO ---------------------------------------------- |
| 68 | 77 |
| 69 AppCacheResponseIO::AppCacheResponseIO( | 78 AppCacheResponseIO::AppCacheResponseIO( |
| 70 int64 response_id, AppCacheDiskCache* disk_cache) | 79 int64 response_id, AppCacheDiskCache* disk_cache) |
| 71 : response_id_(response_id), disk_cache_(disk_cache), | 80 : response_id_(response_id), disk_cache_(disk_cache), |
| 72 entry_(NULL), buffer_len_(0), user_callback_(NULL), | 81 entry_(NULL), buffer_len_(0), user_callback_(NULL), |
| 73 ALLOW_THIS_IN_INITIALIZER_LIST(method_factory_(this)), | 82 ALLOW_THIS_IN_INITIALIZER_LIST(method_factory_(this)), |
| 74 ALLOW_THIS_IN_INITIALIZER_LIST(raw_callback_( | 83 ALLOW_THIS_IN_INITIALIZER_LIST(raw_callback_( |
| 75 new net::CancelableCompletionCallback<AppCacheResponseIO>( | 84 new net::CancelableCompletionCallback<AppCacheResponseIO>( |
| (...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 377 } | 386 } |
| 378 | 387 |
| 379 if (info_buffer_) | 388 if (info_buffer_) |
| 380 ContinueWriteInfo(); | 389 ContinueWriteInfo(); |
| 381 else | 390 else |
| 382 ContinueWriteData(); | 391 ContinueWriteData(); |
| 383 } | 392 } |
| 384 | 393 |
| 385 } // namespace appcache | 394 } // namespace appcache |
| 386 | 395 |
| OLD | NEW |