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

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

Issue 826973002: replace COMPILE_ASSERT with static_assert in net/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: apply fixups Created 5 years, 11 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_auth.cc ('k') | net/http/http_network_transaction_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 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 couldnt_conditionalize_request_(false), 331 couldnt_conditionalize_request_(false),
332 bypass_lock_for_test_(false), 332 bypass_lock_for_test_(false),
333 io_buf_len_(0), 333 io_buf_len_(0),
334 read_offset_(0), 334 read_offset_(0),
335 effective_load_flags_(0), 335 effective_load_flags_(0),
336 write_len_(0), 336 write_len_(0),
337 transaction_pattern_(PATTERN_UNDEFINED), 337 transaction_pattern_(PATTERN_UNDEFINED),
338 total_received_bytes_(0), 338 total_received_bytes_(0),
339 websocket_handshake_stream_base_create_helper_(NULL), 339 websocket_handshake_stream_base_create_helper_(NULL),
340 weak_factory_(this) { 340 weak_factory_(this) {
341 COMPILE_ASSERT(HttpCache::Transaction::kNumValidationHeaders == 341 static_assert(HttpCache::Transaction::kNumValidationHeaders ==
342 arraysize(kValidationHeaders), 342 arraysize(kValidationHeaders),
343 Invalid_number_of_validation_headers); 343 "invalid number of validation headers");
344 344
345 io_callback_ = base::Bind(&Transaction::OnIOComplete, 345 io_callback_ = base::Bind(&Transaction::OnIOComplete,
346 weak_factory_.GetWeakPtr()); 346 weak_factory_.GetWeakPtr());
347 } 347 }
348 348
349 HttpCache::Transaction::~Transaction() { 349 HttpCache::Transaction::~Transaction() {
350 // We may have to issue another IO, but we should never invoke the callback_ 350 // We may have to issue another IO, but we should never invoke the callback_
351 // after this point. 351 // after this point.
352 callback_.Reset(); 352 callback_.Reset();
353 353
(...skipping 2800 matching lines...) Expand 10 before | Expand all | Expand 10 after
3154 3154
3155 void HttpCache::Transaction::OnIOComplete(int result) { 3155 void HttpCache::Transaction::OnIOComplete(int result) {
3156 // TODO(vadimt): Remove ScopedTracker below once crbug.com/422516 is fixed. 3156 // TODO(vadimt): Remove ScopedTracker below once crbug.com/422516 is fixed.
3157 tracked_objects::ScopedTracker tracking_profile( 3157 tracked_objects::ScopedTracker tracking_profile(
3158 FROM_HERE_WITH_EXPLICIT_FUNCTION("422516 Transaction::OnIOComplete")); 3158 FROM_HERE_WITH_EXPLICIT_FUNCTION("422516 Transaction::OnIOComplete"));
3159 3159
3160 DoLoop(result); 3160 DoLoop(result);
3161 } 3161 }
3162 3162
3163 } // namespace net 3163 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_auth.cc ('k') | net/http/http_network_transaction_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698