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

Side by Side Diff: net/disk_cache/simple/simple_util.h

Issue 651063002: Deflake Simple Cache backend on Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: C4800 Created 6 years, 1 month 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 #ifndef NET_DISK_CACHE_SIMPLE_SIMPLE_UTIL_H_ 5 #ifndef NET_DISK_CACHE_SIMPLE_SIMPLE_UTIL_H_
6 #define NET_DISK_CACHE_SIMPLE_SIMPLE_UTIL_H_ 6 #define NET_DISK_CACHE_SIMPLE_SIMPLE_UTIL_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 int32 data_size); 62 int32 data_size);
63 63
64 // Given the stream index, returns the number of the file the stream is stored 64 // Given the stream index, returns the number of the file the stream is stored
65 // in. 65 // in.
66 NET_EXPORT_PRIVATE int GetFileIndexFromStreamIndex(int stream_index); 66 NET_EXPORT_PRIVATE int GetFileIndexFromStreamIndex(int stream_index);
67 67
68 // Fills |out_time| with the time the file last modified time. Unlike the 68 // Fills |out_time| with the time the file last modified time. Unlike the
69 // functions in file.h, the time resolution is milliseconds. 69 // functions in file.h, the time resolution is milliseconds.
70 NET_EXPORT_PRIVATE bool GetMTime(const base::FilePath& path, 70 NET_EXPORT_PRIVATE bool GetMTime(const base::FilePath& path,
71 base::Time* out_mtime); 71 base::Time* out_mtime);
72 } // namespace simple_backend 72
73 // Deletes a file, insuring POSIX semantics. Provided that all open handles to
74 // this file were opened with File::FLAG_SHARE_DELETE, it is possible to delete
pasko 2014/10/29 13:01:01 I would say "Emulates deleting the file", but I'll
75 // an open file and continue to use that file. After deleting an open file, it
76 // is possible to immediately create a new file with the same name.
77 NET_EXPORT_PRIVATE bool SimpleCacheDeleteFile(const base::FilePath& path);
78
79 } // namespace simple_util
73 80
74 } // namespace disk_cache 81 } // namespace disk_cache
75 82
76 #endif // NET_DISK_CACHE_SIMPLE_SIMPLE_UTIL_H_ 83 #endif // NET_DISK_CACHE_SIMPLE_SIMPLE_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698