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

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

Issue 14263005: Refactor our SimpleIndex file format and serialization to use Pickle instead of the previously bugg… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Philippe's comments Created 7 years, 8 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) 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_synchronous_entry.h" 5 #include "net/disk_cache/simple/simple_synchronous_entry.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cstring> 8 #include <cstring>
9 #include <limits> 9 #include <limits>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/compiler_specific.h" 12 #include "base/compiler_specific.h"
13 #include "base/file_util.h" 13 #include "base/file_util.h"
14 #include "base/hash.h" 14 #include "base/hash.h"
15 #include "base/location.h" 15 #include "base/location.h"
16 #include "base/memory/scoped_ptr.h" 16 #include "base/memory/scoped_ptr.h"
17 #include "base/message_loop_proxy.h" 17 #include "base/message_loop_proxy.h"
18 #include "base/sha1.h" 18 #include "base/sha1.h"
19 #include "base/stringprintf.h" 19 #include "base/stringprintf.h"
20 #include "base/task_runner.h" 20 #include "base/task_runner.h"
21 #include "net/base/io_buffer.h" 21 #include "net/base/io_buffer.h"
22 #include "net/base/net_errors.h" 22 #include "net/base/net_errors.h"
23 #include "net/disk_cache/simple/simple_index_util.h"
gavinp 2013/04/15 15:40:54 Really?
felipeg 2013/04/15 15:56:09 Yes because of using GetEntryHashKeyAsHexString()
23 24
24 using base::ClosePlatformFile; 25 using base::ClosePlatformFile;
25 using base::FilePath; 26 using base::FilePath;
26 using base::GetPlatformFileInfo; 27 using base::GetPlatformFileInfo;
27 using base::PlatformFileError; 28 using base::PlatformFileError;
28 using base::PlatformFileInfo; 29 using base::PlatformFileInfo;
29 using base::PLATFORM_FILE_CREATE; 30 using base::PLATFORM_FILE_CREATE;
30 using base::PLATFORM_FILE_OK; 31 using base::PLATFORM_FILE_OK;
31 using base::PLATFORM_FILE_OPEN; 32 using base::PLATFORM_FILE_OPEN;
32 using base::PLATFORM_FILE_READ; 33 using base::PLATFORM_FILE_READ;
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 // TODO(gavinp): Clean up created files. 305 // TODO(gavinp): Clean up created files.
305 DLOG(WARNING) << "Could not write keys to new cache entry."; 306 DLOG(WARNING) << "Could not write keys to new cache entry.";
306 return false; 307 return false;
307 } 308 }
308 } 309 }
309 initialized_ = true; 310 initialized_ = true;
310 return true; 311 return true;
311 } 312 }
312 313
313 } // namespace disk_cache 314 } // namespace disk_cache
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698