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

Side by Side Diff: chrome/app/file_pre_reader_win.h

Issue 1411683010: Revert of Transform ImagePreReader into PreReadFile. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@a_get_module_path
Patch Set: Created 5 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
« no previous file with comments | « chrome/BUILD.gn ('k') | chrome/app/file_pre_reader_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 // This file defines a function to pre-read a file in order to avoid touching
6 // the disk when it is subsequently used.
7
8 #ifndef CHROME_APP_FILE_PRE_READER_WIN_H_
9 #define CHROME_APP_FILE_PRE_READER_WIN_H_
10
11 namespace base {
12 class FilePath;
13 }
14
15 // Reads |file_path| to avoid touching the disk when the file is actually used.
16 // The function checks the Windows version to determine which pre-reading
17 // mechanism to use. On Vista+, chunks of |step_size| bytes are read into a
18 // buffer. The bigger |step_size| is, the faster the file is pre-read (up to
19 // about 4MB according to local tests), but also the more memory is allocated
20 // for the buffer.
21 bool PreReadFile(const base::FilePath& file_path, int step_size);
22
23 #endif // CHROME_APP_FILE_PRE_READER_WIN_H_
OLDNEW
« no previous file with comments | « chrome/BUILD.gn ('k') | chrome/app/file_pre_reader_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698