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

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

Issue 16434016: Rewrite scoped_ptr<T>(NULL) to use the default ctor in net/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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
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 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 HttpCache::Transaction::Transaction( 168 HttpCache::Transaction::Transaction(
169 RequestPriority priority, 169 RequestPriority priority,
170 HttpCache* cache, 170 HttpCache* cache,
171 HttpTransactionDelegate* transaction_delegate) 171 HttpTransactionDelegate* transaction_delegate)
172 : next_state_(STATE_NONE), 172 : next_state_(STATE_NONE),
173 request_(NULL), 173 request_(NULL),
174 priority_(priority), 174 priority_(priority),
175 cache_(cache->AsWeakPtr()), 175 cache_(cache->AsWeakPtr()),
176 entry_(NULL), 176 entry_(NULL),
177 new_entry_(NULL), 177 new_entry_(NULL),
178 network_trans_(NULL),
179 new_response_(NULL), 178 new_response_(NULL),
180 mode_(NONE), 179 mode_(NONE),
181 target_state_(STATE_NONE), 180 target_state_(STATE_NONE),
182 reading_(false), 181 reading_(false),
183 invalid_range_(false), 182 invalid_range_(false),
184 truncated_(false), 183 truncated_(false),
185 is_sparse_(false), 184 is_sparse_(false),
186 range_requested_(false), 185 range_requested_(false),
187 handling_206_(false), 186 handling_206_(false),
188 cache_pending_(false), 187 cache_pending_(false),
189 done_reading_(false), 188 done_reading_(false),
190 vary_mismatch_(false), 189 vary_mismatch_(false),
191 couldnt_conditionalize_request_(false), 190 couldnt_conditionalize_request_(false),
192 io_buf_len_(0), 191 io_buf_len_(0),
193 read_offset_(0), 192 read_offset_(0),
194 effective_load_flags_(0), 193 effective_load_flags_(0),
195 write_len_(0), 194 write_len_(0),
196 weak_factory_(this), 195 weak_factory_(this),
197 io_callback_(base::Bind( 196 io_callback_(base::Bind(&Transaction::OnIOComplete,
198 &Transaction::OnIOComplete, weak_factory_.GetWeakPtr())), 197 weak_factory_.GetWeakPtr())),
199 transaction_pattern_(PATTERN_UNDEFINED), 198 transaction_pattern_(PATTERN_UNDEFINED),
200 defer_cache_sensitivity_delay_(false), 199 defer_cache_sensitivity_delay_(false),
201 transaction_delegate_(transaction_delegate) { 200 transaction_delegate_(transaction_delegate) {
202 COMPILE_ASSERT(HttpCache::Transaction::kNumValidationHeaders == 201 COMPILE_ASSERT(HttpCache::Transaction::kNumValidationHeaders ==
203 arraysize(kValidationHeaders), 202 arraysize(kValidationHeaders),
204 Invalid_number_of_validation_headers); 203 Invalid_number_of_validation_headers);
205 base::StringToInt( 204 base::StringToInt(
206 base::FieldTrialList::FindFullName("CacheSensitivityAnalysis"), 205 base::FieldTrialList::FindFullName("CacheSensitivityAnalysis"),
207 &sensitivity_analysis_percent_increase_); 206 &sensitivity_analysis_percent_increase_);
208 } 207 }
(...skipping 2386 matching lines...) Expand 10 before | Expand all | Expand 10 after
2595 void HttpCache::Transaction::ResetNetworkTransaction() { 2594 void HttpCache::Transaction::ResetNetworkTransaction() {
2596 DCHECK(!old_network_trans_load_timing_); 2595 DCHECK(!old_network_trans_load_timing_);
2597 DCHECK(network_trans_); 2596 DCHECK(network_trans_);
2598 LoadTimingInfo load_timing; 2597 LoadTimingInfo load_timing;
2599 if (network_trans_->GetLoadTimingInfo(&load_timing)) 2598 if (network_trans_->GetLoadTimingInfo(&load_timing))
2600 old_network_trans_load_timing_.reset(new LoadTimingInfo(load_timing)); 2599 old_network_trans_load_timing_.reset(new LoadTimingInfo(load_timing));
2601 network_trans_.reset(); 2600 network_trans_.reset();
2602 } 2601 }
2603 2602
2604 } // namespace net 2603 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_auth_handler_negotiate.cc ('k') | net/http/http_proxy_client_socket_pool_spdy2_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698