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

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

Issue 1412673006: Transform ImagePreReader into PreReadFile. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@a_get_module_path
Patch Set: git cl format 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
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 hard page
6 // faults 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 #include "base/basictypes.h"
grt (UTC plus 2) 2015/10/29 19:15:07 unused
fdoray 2015/10/30 21:08:54 Done.
12
13 class FilePreReader {
grt (UTC plus 2) 2015/10/29 19:15:07 make this a free function rather than a class stat
fdoray 2015/10/30 21:08:54 Done.
14 public:
15 // Reads the file passed in and touches pages to avoid hard page faults when
16 // the file is used. The step size indicates the number of bytes to skip after
17 // each touched byte.
grt (UTC plus 2) 2015/10/29 19:15:07 how should the caller pick a value for |step_size|
fdoray 2015/10/30 21:08:54 Done. Eventually, we should remove the parameter a
18 //
19 // This function checks the Windows version to determine which pre-reading
20 // mechanism to use.
21 static bool PreReadImage(const wchar_t* file_path, size_t step_size);
grt (UTC plus 2) 2015/10/29 19:15:07 why "Image" in the name when this is file_pre_read
fdoray 2015/10/30 21:08:54 Done.
22 };
23
24 #endif // CHROME_APP_FILE_PRE_READER_WIN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698