Index: content/shell/browser/shell_content_browser_client.cc |
diff --git a/content/shell/browser/shell_content_browser_client.cc b/content/shell/browser/shell_content_browser_client.cc |
index 84c2c976170f3822258e0e97c1d7057b32e2c26b..2aeba64f7ae42da1c6365b180ce0f13bdd1d1f07 100644 |
--- a/content/shell/browser/shell_content_browser_client.cc |
+++ b/content/shell/browser/shell_content_browser_client.cc |
@@ -7,6 +7,7 @@ |
#include "base/base_switches.h" |
#include "base/command_line.h" |
#include "base/file_util.h" |
+#include "base/files/file.h" |
#include "base/path_service.h" |
#include "content/public/browser/render_process_host.h" |
#include "content/public/browser/resource_dispatcher_host.h" |
@@ -286,25 +287,25 @@ void ShellContentBrowserClient::GetAdditionalMappedFilesForChildProcess( |
pak_file = pak_file.Append(FILE_PATH_LITERAL("paks")); |
pak_file = pak_file.Append(FILE_PATH_LITERAL("content_shell.pak")); |
- base::PlatformFile f = |
- base::CreatePlatformFile(pak_file, flags, NULL, NULL); |
- if (f == base::kInvalidPlatformFileValue) { |
+ base::File f(pak_file, flags); |
+ if (!f.IsValid()) { |
NOTREACHED() << "Failed to open file when creating renderer process: " |
<< "content_shell.pak"; |
} |
mappings->push_back( |
content::FileDescriptorInfo(kShellPakDescriptor, |
- base::FileDescriptor(f, true))); |
+ base::FileDescriptor(f.Pass()))); |
if (breakpad::IsCrashReporterEnabled()) { |
f = breakpad::CrashDumpManager::GetInstance()->CreateMinidumpFile( |
child_process_id); |
- if (f == base::kInvalidPlatformFileValue) { |
+ if (!f.IsValid()) { |
LOG(ERROR) << "Failed to create file for minidump, crash reporting will " |
<< "be disabled for this process."; |
} else { |
- mappings->push_back(FileDescriptorInfo(kAndroidMinidumpDescriptor, |
- base::FileDescriptor(f, true))); |
+ mappings->push_back( |
+ FileDescriptorInfo(kAndroidMinidumpDescriptor, |
+ base::FileDescriptor(f.Pass()))); |
} |
} |
#else // !defined(OS_ANDROID) |