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

Side by Side Diff: net/disk_cache/simple/simple_entry_impl.cc

Issue 2351513002: net: rename BoundNetLog to NetLogWithSource (Closed)
Patch Set: one more fix, content bound_net_log_ Created 4 years, 3 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/disk_cache/simple/simple_entry_impl.h" 5 #include "net/disk_cache/simple/simple_entry_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cstring> 8 #include <cstring>
9 #include <limits> 9 #include <limits>
10 #include <utility> 10 #include <utility>
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 path_(path), 177 path_(path),
178 entry_hash_(entry_hash), 178 entry_hash_(entry_hash),
179 use_optimistic_operations_(operations_mode == OPTIMISTIC_OPERATIONS), 179 use_optimistic_operations_(operations_mode == OPTIMISTIC_OPERATIONS),
180 last_used_(Time::Now()), 180 last_used_(Time::Now()),
181 last_modified_(last_used_), 181 last_modified_(last_used_),
182 sparse_data_size_(0), 182 sparse_data_size_(0),
183 open_count_(0), 183 open_count_(0),
184 doomed_(false), 184 doomed_(false),
185 state_(STATE_UNINITIALIZED), 185 state_(STATE_UNINITIALIZED),
186 synchronous_entry_(NULL), 186 synchronous_entry_(NULL),
187 net_log_(net::BoundNetLog::Make(net_log, 187 net_log_(
188 net::NetLogWithSource::Make(net_log,
188 net::NetLogSourceType::DISK_CACHE_ENTRY)), 189 net::NetLogSourceType::DISK_CACHE_ENTRY)),
189 stream_0_data_(new net::GrowableIOBuffer()) { 190 stream_0_data_(new net::GrowableIOBuffer()) {
190 static_assert(arraysize(data_size_) == arraysize(crc32s_end_offset_), 191 static_assert(arraysize(data_size_) == arraysize(crc32s_end_offset_),
191 "arrays should be the same size"); 192 "arrays should be the same size");
192 static_assert(arraysize(data_size_) == arraysize(crc32s_), 193 static_assert(arraysize(data_size_) == arraysize(crc32s_),
193 "arrays should be the same size"); 194 "arrays should be the same size");
194 static_assert(arraysize(data_size_) == arraysize(have_written_), 195 static_assert(arraysize(data_size_) == arraysize(have_written_),
195 "arrays should be the same size"); 196 "arrays should be the same size");
196 static_assert(arraysize(data_size_) == arraysize(crc_check_state_), 197 static_assert(arraysize(data_size_) == arraysize(crc_check_state_),
197 "arrays should be the same size"); 198 "arrays should be the same size");
(...skipping 1345 matching lines...) Expand 10 before | Expand all | Expand 10 after
1543 } 1544 }
1544 crc32s_end_offset_[stream_index] = offset + length; 1545 crc32s_end_offset_[stream_index] = offset + length;
1545 } else if (offset < crc32s_end_offset_[stream_index]) { 1546 } else if (offset < crc32s_end_offset_[stream_index]) {
1546 // If a range for which the crc32 was already computed is rewritten, the 1547 // If a range for which the crc32 was already computed is rewritten, the
1547 // computation of the crc32 need to start from 0 again. 1548 // computation of the crc32 need to start from 0 again.
1548 crc32s_end_offset_[stream_index] = 0; 1549 crc32s_end_offset_[stream_index] = 0;
1549 } 1550 }
1550 } 1551 }
1551 1552
1552 } // namespace disk_cache 1553 } // namespace disk_cache
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698