OLD | NEW |
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/mapped_file.h" | 5 #include "net/disk_cache/v2/mapped_file.h" |
6 | 6 |
7 #include <stdlib.h> | 7 #include <stdlib.h> |
8 | 8 |
9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
11 | 11 |
12 namespace disk_cache { | 12 namespace disk_cache { |
13 | 13 |
14 void* MappedFile::Init(const base::FilePath& name, size_t size) { | 14 void* MappedFile::Init(const base::FilePath& name, size_t size) { |
15 DCHECK(!init_); | 15 DCHECK(!init_); |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 return; | 54 return; |
55 | 55 |
56 if (buffer_ && snapshot_) { | 56 if (buffer_ && snapshot_) { |
57 Flush(); | 57 Flush(); |
58 } | 58 } |
59 free(buffer_); | 59 free(buffer_); |
60 free(snapshot_); | 60 free(snapshot_); |
61 } | 61 } |
62 | 62 |
63 } // namespace disk_cache | 63 } // namespace disk_cache |
OLD | NEW |