summaryrefslogtreecommitdiffstats
path: root/content/shell
diff options
context:
space:
mode:
authorrvargas@chromium.org <rvargas@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-15 00:09:05 +0000
committerrvargas@chromium.org <rvargas@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-15 00:09:05 +0000
commit0daaebfe9826bca26d41bf979fa085f26b5ccf95 (patch)
tree1ab42ee326cf87453e3a340e83385813cdbcb50a /content/shell
parent063f03e36ef9f73e300458a2f6cf03b49161348c (diff)
downloadchromium_src-0daaebfe9826bca26d41bf979fa085f26b5ccf95.zip
chromium_src-0daaebfe9826bca26d41bf979fa085f26b5ccf95.tar.gz
chromium_src-0daaebfe9826bca26d41bf979fa085f26b5ccf95.tar.bz2
Remove CreatePlatformFile from content shell.
BUG=322664 Review URL: https://codereview.chromium.org/184003002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@257251 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/shell')
-rw-r--r--content/shell/browser/shell_content_browser_client.cc15
1 files changed, 8 insertions, 7 deletions
diff --git a/content/shell/browser/shell_content_browser_client.cc b/content/shell/browser/shell_content_browser_client.cc
index 7fa6049a..63243b4 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"
@@ -292,25 +293,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)