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

Unified Diff: chrome/browser/chrome_content_browser_client.cc

Issue 10949027: Close leaking FDs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed Yaron's comments 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
Index: chrome/browser/chrome_content_browser_client.cc
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc
index 0ee484c8bba3d5f73d2596c45efa6fb3f3816859..945b9d9ebb5cec36d5b85db61a7dd1e85cbe5679 100644
--- a/chrome/browser/chrome_content_browser_client.cc
+++ b/chrome/browser/chrome_content_browser_client.cc
@@ -136,10 +136,12 @@
#include "chrome/browser/ui/crypto_module_password_dialog.h"
#endif
+using base::FileDescriptor;
using content::AccessTokenStore;
using content::BrowserThread;
using content::BrowserURLHandler;
using content::ChildProcessSecurityPolicy;
+using content::FileDescriptorInfo;
using content::QuotaPermissionContext;
using content::RenderViewHost;
using content::SiteInstance;
@@ -1664,11 +1666,12 @@ bool ChromeContentBrowserClient::AllowPepperPrivateFileAPI() {
#if defined(OS_POSIX) && !defined(OS_MACOSX)
void ChromeContentBrowserClient::GetAdditionalMappedFilesForChildProcess(
const CommandLine& command_line,
- base::GlobalDescriptors::Mapping* mappings) {
+ std::vector<FileDescriptorInfo>* mappings) {
int crash_signal_fd = GetCrashSignalFD(command_line);
if (crash_signal_fd >= 0) {
- mappings->push_back(std::pair<base::GlobalDescriptors::Key, int>(
- kCrashDumpSignal, crash_signal_fd));
+ mappings->push_back(FileDescriptorInfo(kCrashDumpSignal,
+ FileDescriptor(crash_signal_fd,
+ false)));
}
}
#endif // defined(OS_POSIX) && !defined(OS_MACOSX)

Powered by Google App Engine
This is Rietveld 408576698