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

Unified Diff: chrome/app/main_dll_loader_win.cc

Issue 1412673006: Transform ImagePreReader into PreReadFile. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@a_get_module_path
Patch Set: Fix comments. 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 side-by-side diff with in-line comments
Download patch
Index: chrome/app/main_dll_loader_win.cc
diff --git a/chrome/app/main_dll_loader_win.cc b/chrome/app/main_dll_loader_win.cc
index 4f831ff6bb5a9dea72cca67b1024cbeef5f92deb..ba14dba3bcc3cdb209ddf0a1ee79cb5f50530abe 100644
--- a/chrome/app/main_dll_loader_win.cc
+++ b/chrome/app/main_dll_loader_win.cc
@@ -26,7 +26,7 @@
#include "chrome/app/chrome_crash_reporter_client.h"
#include "chrome/app/chrome_watcher_client_win.h"
#include "chrome/app/chrome_watcher_command_line_win.h"
-#include "chrome/app/image_pre_reader_win.h"
+#include "chrome/app/file_pre_reader_win.h"
#include "chrome/app/kasko_client.h"
#include "chrome/chrome_watcher/chrome_watcher_main_api.h"
#include "chrome/common/chrome_constants.h"
@@ -63,9 +63,7 @@ HMODULE LoadModuleWithDirectory(const base::FilePath& module, bool pre_read) {
// We pre-read the binary to warm the memory caches (fewer hard faults to
// page parts of the binary in).
const size_t kStepSize = 1024 * 1024;
- size_t percent = 100;
- ImagePreReader::PartialPreReadImage(module.value().c_str(), percent,
- kStepSize);
+ PreReadFile(module, kStepSize);
}
return ::LoadLibraryExW(module.value().c_str(), nullptr,

Powered by Google App Engine
This is Rietveld 408576698