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

Unified Diff: content/shell/shell_content_browser_client.cc

Issue 10949027: Close leaking FDs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed last comments and synced. Created 8 years, 3 months 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
« no previous file with comments | « content/shell/shell_content_browser_client.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/shell/shell_content_browser_client.cc
diff --git a/content/shell/shell_content_browser_client.cc b/content/shell/shell_content_browser_client.cc
index c2fd53ccde9613cca3926d6c0bd4685d95fe5799..e07287ae7625573e2ce001fb9b701f777c39b67f 100644
--- a/content/shell/shell_content_browser_client.cc
+++ b/content/shell/shell_content_browser_client.cc
@@ -76,7 +76,7 @@ WebContentsViewDelegate* ShellContentBrowserClient::GetWebContentsViewDelegate(
#if defined(OS_ANDROID)
void ShellContentBrowserClient::GetAdditionalMappedFilesForChildProcess(
const CommandLine& command_line,
- base::GlobalDescriptors::Mapping* mappings) {
+ std::vector<content::FileDescriptorInfo>* mappings) {
int flags = base::PLATFORM_FILE_OPEN | base::PLATFORM_FILE_READ;
FilePath pak_file;
DCHECK(PathService::Get(base::DIR_ANDROID_APP_DATA, &pak_file));
@@ -89,8 +89,9 @@ void ShellContentBrowserClient::GetAdditionalMappedFilesForChildProcess(
NOTREACHED() << "Failed to open file when creating renderer process: "
<< "content_shell.pak";
}
- mappings->push_back(std::pair<base::GlobalDescriptors::Key, int>(
- kShellPakDescriptor, f));
+ mappings->push_back(
+ content::FileDescriptorInfo(kShellPakDescriptor,
+ base::FileDescriptor(f, true)));
}
#endif
« no previous file with comments | « content/shell/shell_content_browser_client.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698