| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "headless/lib/browser/headless_content_browser_client.h" | 5 #include "headless/lib/browser/headless_content_browser_client.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <unordered_set> | 8 #include <unordered_set> |
| 9 | 9 |
| 10 #include "base/base_switches.h" | 10 #include "base/base_switches.h" |
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 content::StoragePartition* partition, | 183 content::StoragePartition* partition, |
| 184 storage::OptionalQuotaSettingsCallback callback) { | 184 storage::OptionalQuotaSettingsCallback callback) { |
| 185 storage::GetNominalDynamicSettings( | 185 storage::GetNominalDynamicSettings( |
| 186 partition->GetPath(), context->IsOffTheRecord(), std::move(callback)); | 186 partition->GetPath(), context->IsOffTheRecord(), std::move(callback)); |
| 187 } | 187 } |
| 188 | 188 |
| 189 #if defined(OS_POSIX) && !defined(OS_MACOSX) | 189 #if defined(OS_POSIX) && !defined(OS_MACOSX) |
| 190 void HeadlessContentBrowserClient::GetAdditionalMappedFilesForChildProcess( | 190 void HeadlessContentBrowserClient::GetAdditionalMappedFilesForChildProcess( |
| 191 const base::CommandLine& command_line, | 191 const base::CommandLine& command_line, |
| 192 int child_process_id, | 192 int child_process_id, |
| 193 content::FileDescriptorInfo* mappings) { | 193 content::PosixFileDescriptorInfo* mappings) { |
| 194 #if defined(HEADLESS_USE_BREAKPAD) | 194 #if defined(HEADLESS_USE_BREAKPAD) |
| 195 int crash_signal_fd = GetCrashSignalFD(command_line, *browser_->options()); | 195 int crash_signal_fd = GetCrashSignalFD(command_line, *browser_->options()); |
| 196 if (crash_signal_fd >= 0) | 196 if (crash_signal_fd >= 0) |
| 197 mappings->Share(kCrashDumpSignal, crash_signal_fd); | 197 mappings->Share(kCrashDumpSignal, crash_signal_fd); |
| 198 #endif // defined(HEADLESS_USE_BREAKPAD) | 198 #endif // defined(HEADLESS_USE_BREAKPAD) |
| 199 } | 199 } |
| 200 #endif // defined(OS_POSIX) && !defined(OS_MACOSX) | 200 #endif // defined(OS_POSIX) && !defined(OS_MACOSX) |
| 201 | 201 |
| 202 void HeadlessContentBrowserClient::AppendExtraCommandLineSwitches( | 202 void HeadlessContentBrowserClient::AppendExtraCommandLineSwitches( |
| 203 base::CommandLine* command_line, | 203 base::CommandLine* command_line, |
| (...skipping 29 matching lines...) Expand all Loading... |
| 233 } | 233 } |
| 234 | 234 |
| 235 void HeadlessContentBrowserClient::ResourceDispatcherHostCreated() { | 235 void HeadlessContentBrowserClient::ResourceDispatcherHostCreated() { |
| 236 resource_dispatcher_host_delegate_.reset( | 236 resource_dispatcher_host_delegate_.reset( |
| 237 new HeadlessResourceDispatcherHostDelegate); | 237 new HeadlessResourceDispatcherHostDelegate); |
| 238 content::ResourceDispatcherHost::Get()->SetDelegate( | 238 content::ResourceDispatcherHost::Get()->SetDelegate( |
| 239 resource_dispatcher_host_delegate_.get()); | 239 resource_dispatcher_host_delegate_.get()); |
| 240 } | 240 } |
| 241 | 241 |
| 242 } // namespace headless | 242 } // namespace headless |
| OLD | NEW |