Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/chrome_content_browser_client.h" | 5 #include "chrome/browser/chrome_content_browser_client.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 #include <utility> | 8 #include <utility> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 1649 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1660 return CommandLine::ForCurrentProcess()->HasSwitch( | 1660 return CommandLine::ForCurrentProcess()->HasSwitch( |
| 1661 switches::kPpapiFlashInProcess); | 1661 switches::kPpapiFlashInProcess); |
| 1662 } | 1662 } |
| 1663 | 1663 |
| 1664 #if defined(OS_POSIX) && !defined(OS_MACOSX) | 1664 #if defined(OS_POSIX) && !defined(OS_MACOSX) |
| 1665 void ChromeContentBrowserClient::GetAdditionalMappedFilesForChildProcess( | 1665 void ChromeContentBrowserClient::GetAdditionalMappedFilesForChildProcess( |
| 1666 const CommandLine& command_line, | 1666 const CommandLine& command_line, |
| 1667 base::GlobalDescriptors::Mapping* mappings) { | 1667 base::GlobalDescriptors::Mapping* mappings) { |
| 1668 int crash_signal_fd = GetCrashSignalFD(command_line); | 1668 int crash_signal_fd = GetCrashSignalFD(command_line); |
| 1669 if (crash_signal_fd >= 0) { | 1669 if (crash_signal_fd >= 0) { |
| 1670 // The caller becomes the owner of the passed FD, so we dup it as we need to | |
| 1671 // keep ours alive. | |
| 1670 mappings->push_back(std::pair<base::GlobalDescriptors::Key, int>( | 1672 mappings->push_back(std::pair<base::GlobalDescriptors::Key, int>( |
| 1671 kCrashDumpSignal, crash_signal_fd)); | 1673 kCrashDumpSignal, dup(crash_signal_fd))); |
|
piman
2012/09/20 07:03:03
I don't get it. You're changing the semantics to a
| |
| 1672 } | 1674 } |
| 1673 } | 1675 } |
| 1674 #endif // defined(OS_POSIX) && !defined(OS_MACOSX) | 1676 #endif // defined(OS_POSIX) && !defined(OS_MACOSX) |
| 1675 | 1677 |
| 1676 #if defined(OS_WIN) | 1678 #if defined(OS_WIN) |
| 1677 const wchar_t* ChromeContentBrowserClient::GetResourceDllName() { | 1679 const wchar_t* ChromeContentBrowserClient::GetResourceDllName() { |
| 1678 return chrome::kBrowserResourcesDll; | 1680 return chrome::kBrowserResourcesDll; |
| 1679 } | 1681 } |
| 1680 #endif | 1682 #endif |
| 1681 | 1683 |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1726 partition_id = extension->id(); | 1728 partition_id = extension->id(); |
| 1727 } | 1729 } |
| 1728 | 1730 |
| 1729 // Enforce that IsValidStoragePartitionId() implementation stays in sync. | 1731 // Enforce that IsValidStoragePartitionId() implementation stays in sync. |
| 1730 DCHECK(IsValidStoragePartitionId(browser_context, partition_id)); | 1732 DCHECK(IsValidStoragePartitionId(browser_context, partition_id)); |
| 1731 return partition_id; | 1733 return partition_id; |
| 1732 } | 1734 } |
| 1733 | 1735 |
| 1734 | 1736 |
| 1735 } // namespace chrome | 1737 } // namespace chrome |
| OLD | NEW |