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

Side by Side Diff: net/disk_cache/blockfile/entry_impl_v3.cc

Issue 1223983002: Move WriteInto to base namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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/disk_cache/blockfile/entry_impl.cc ('k') | net/proxy/proxy_resolver_v8.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/disk_cache/blockfile/entry_impl_v3.h" 5 #include "net/disk_cache/blockfile/entry_impl_v3.h"
6 6
7 #include "base/hash.h" 7 #include "base/hash.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/strings/string_util.h" 9 #include "base/strings/string_util.h"
10 #include "net/base/io_buffer.h" 10 #include "net/base/io_buffer.h"
(...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after
491 static_assert(kNumStreams == kKeyFileIndex, "invalid key index"); 491 static_assert(kNumStreams == kKeyFileIndex, "invalid key index");
492 File* key_file = const_cast<EntryImpl*>(this)->GetBackingFile(address, 492 File* key_file = const_cast<EntryImpl*>(this)->GetBackingFile(address,
493 kKeyFileIndex); 493 kKeyFileIndex);
494 if (!key_file) 494 if (!key_file)
495 return std::string(); 495 return std::string();
496 496
497 ++key_len; // We store a trailing \0 on disk that we read back below. 497 ++key_len; // We store a trailing \0 on disk that we read back below.
498 if (!offset && key_file->GetLength() != static_cast<size_t>(key_len)) 498 if (!offset && key_file->GetLength() != static_cast<size_t>(key_len))
499 return std::string(); 499 return std::string();
500 500
501 if (!key_file->Read(WriteInto(&key_, key_len), key_len, offset)) 501 if (!key_file->Read(base::WriteInto(&key_, key_len), key_len, offset))
502 key_.clear(); 502 key_.clear();
503 return key_; 503 return key_;
504 } 504 }
505 505
506 Time EntryImplV3::GetLastUsed() const { 506 Time EntryImplV3::GetLastUsed() const {
507 CacheRankingsBlock* node = const_cast<CacheRankingsBlock*>(&node_); 507 CacheRankingsBlock* node = const_cast<CacheRankingsBlock*>(&node_);
508 return Time::FromInternalValue(node->Data()->last_used); 508 return Time::FromInternalValue(node->Data()->last_used);
509 } 509 }
510 510
511 Time EntryImplV3::GetLastModified() const { 511 Time EntryImplV3::GetLastModified() const {
(...skipping 942 matching lines...) Expand 10 before | Expand all | Expand 10 after
1454 1454
1455 int EntryImplV3::ReadyForSparseIO(const CompletionCallback& callback) { 1455 int EntryImplV3::ReadyForSparseIO(const CompletionCallback& callback) {
1456 return net::ERR_FAILED; 1456 return net::ERR_FAILED;
1457 } 1457 }
1458 1458
1459 EntryImplV3::~EntryImplV3() { 1459 EntryImplV3::~EntryImplV3() {
1460 NOTIMPLEMENTED(); 1460 NOTIMPLEMENTED();
1461 } 1461 }
1462 1462
1463 } // namespace disk_cache 1463 } // namespace disk_cache
OLDNEW
« no previous file with comments | « net/disk_cache/blockfile/entry_impl.cc ('k') | net/proxy/proxy_resolver_v8.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698