| 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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 #include "content/public/browser/render_frame_host.h" | 120 #include "content/public/browser/render_frame_host.h" |
| 121 #include "content/public/browser/render_process_host.h" | 121 #include "content/public/browser/render_process_host.h" |
| 122 #include "content/public/browser/render_view_host.h" | 122 #include "content/public/browser/render_view_host.h" |
| 123 #include "content/public/browser/resource_context.h" | 123 #include "content/public/browser/resource_context.h" |
| 124 #include "content/public/browser/site_instance.h" | 124 #include "content/public/browser/site_instance.h" |
| 125 #include "content/public/browser/web_contents.h" | 125 #include "content/public/browser/web_contents.h" |
| 126 #include "content/public/common/child_process_host.h" | 126 #include "content/public/common/child_process_host.h" |
| 127 #include "content/public/common/content_descriptors.h" | 127 #include "content/public/common/content_descriptors.h" |
| 128 #include "content/public/common/url_utils.h" | 128 #include "content/public/common/url_utils.h" |
| 129 #include "content/public/common/web_preferences.h" | 129 #include "content/public/common/web_preferences.h" |
| 130 #include "gin/public/isolate_holder.h" | 130 #include "gin/v8_startup_data.h" |
| 131 #include "net/base/mime_util.h" | 131 #include "net/base/mime_util.h" |
| 132 #include "net/cookies/canonical_cookie.h" | 132 #include "net/cookies/canonical_cookie.h" |
| 133 #include "net/cookies/cookie_options.h" | 133 #include "net/cookies/cookie_options.h" |
| 134 #include "net/ssl/ssl_cert_request_info.h" | 134 #include "net/ssl/ssl_cert_request_info.h" |
| 135 #include "ppapi/host/ppapi_host.h" | 135 #include "ppapi/host/ppapi_host.h" |
| 136 #include "storage/browser/fileapi/external_mount_points.h" | 136 #include "storage/browser/fileapi/external_mount_points.h" |
| 137 #include "ui/base/l10n/l10n_util.h" | 137 #include "ui/base/l10n/l10n_util.h" |
| 138 #include "ui/base/resource/resource_bundle.h" | 138 #include "ui/base/resource/resource_bundle.h" |
| 139 #include "ui/resources/grit/ui_resources.h" | 139 #include "ui/resources/grit/ui_resources.h" |
| 140 | 140 |
| (...skipping 2205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2346 } | 2346 } |
| 2347 | 2347 |
| 2348 #if defined(OS_POSIX) && !defined(OS_MACOSX) | 2348 #if defined(OS_POSIX) && !defined(OS_MACOSX) |
| 2349 void ChromeContentBrowserClient::GetAdditionalMappedFilesForChildProcess( | 2349 void ChromeContentBrowserClient::GetAdditionalMappedFilesForChildProcess( |
| 2350 const base::CommandLine& command_line, | 2350 const base::CommandLine& command_line, |
| 2351 int child_process_id, | 2351 int child_process_id, |
| 2352 FileDescriptorInfo* mappings) { | 2352 FileDescriptorInfo* mappings) { |
| 2353 #if defined(V8_USE_EXTERNAL_STARTUP_DATA) | 2353 #if defined(V8_USE_EXTERNAL_STARTUP_DATA) |
| 2354 if (v8_snapshot_fd_.get() == -1 && v8_natives_fd_.get() == -1) { | 2354 if (v8_snapshot_fd_.get() == -1 && v8_natives_fd_.get() == -1) { |
| 2355 base::FilePath v8_data_path; | 2355 base::FilePath v8_data_path; |
| 2356 PathService::Get(gin::IsolateHolder::kV8SnapshotBasePathKey, &v8_data_path); | 2356 PathService::Get(gin::V8StartupData::kV8SnapshotBasePathKey, &v8_data_path); |
| 2357 DCHECK(!v8_data_path.empty()); | 2357 DCHECK(!v8_data_path.empty()); |
| 2358 | 2358 |
| 2359 int file_flags = base::File::FLAG_OPEN | base::File::FLAG_READ; | 2359 int file_flags = base::File::FLAG_OPEN | base::File::FLAG_READ; |
| 2360 base::FilePath v8_natives_data_path = | 2360 base::FilePath v8_natives_data_path = |
| 2361 v8_data_path.AppendASCII(gin::IsolateHolder::kNativesFileName); | 2361 v8_data_path.AppendASCII(gin::V8StartupData::kNativesFileName); |
| 2362 base::FilePath v8_snapshot_data_path = | 2362 base::FilePath v8_snapshot_data_path = |
| 2363 v8_data_path.AppendASCII(gin::IsolateHolder::kSnapshotFileName); | 2363 v8_data_path.AppendASCII(gin::V8StartupData::kSnapshotFileName); |
| 2364 base::File v8_natives_data_file(v8_natives_data_path, file_flags); | 2364 base::File v8_natives_data_file(v8_natives_data_path, file_flags); |
| 2365 base::File v8_snapshot_data_file(v8_snapshot_data_path, file_flags); | 2365 base::File v8_snapshot_data_file(v8_snapshot_data_path, file_flags); |
| 2366 DCHECK(v8_natives_data_file.IsValid()); | 2366 DCHECK(v8_natives_data_file.IsValid()); |
| 2367 DCHECK(v8_snapshot_data_file.IsValid()); | 2367 DCHECK(v8_snapshot_data_file.IsValid()); |
| 2368 v8_natives_fd_.reset(v8_natives_data_file.TakePlatformFile()); | 2368 v8_natives_fd_.reset(v8_natives_data_file.TakePlatformFile()); |
| 2369 v8_snapshot_fd_.reset(v8_snapshot_data_file.TakePlatformFile()); | 2369 v8_snapshot_fd_.reset(v8_snapshot_data_file.TakePlatformFile()); |
| 2370 } | 2370 } |
| 2371 mappings->Share(kV8NativesDataDescriptor, v8_natives_fd_.get()); | 2371 mappings->Share(kV8NativesDataDescriptor, v8_natives_fd_.get()); |
| 2372 mappings->Share(kV8SnapshotDataDescriptor, v8_snapshot_fd_.get()); | 2372 mappings->Share(kV8SnapshotDataDescriptor, v8_snapshot_fd_.get()); |
| 2373 #endif // V8_USE_EXTERNAL_STARTUP_DATA | 2373 #endif // V8_USE_EXTERNAL_STARTUP_DATA |
| (...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2582 switches::kDisableWebRtcEncryption, | 2582 switches::kDisableWebRtcEncryption, |
| 2583 }; | 2583 }; |
| 2584 to_command_line->CopySwitchesFrom(from_command_line, | 2584 to_command_line->CopySwitchesFrom(from_command_line, |
| 2585 kWebRtcDevSwitchNames, | 2585 kWebRtcDevSwitchNames, |
| 2586 arraysize(kWebRtcDevSwitchNames)); | 2586 arraysize(kWebRtcDevSwitchNames)); |
| 2587 } | 2587 } |
| 2588 } | 2588 } |
| 2589 #endif // defined(ENABLE_WEBRTC) | 2589 #endif // defined(ENABLE_WEBRTC) |
| 2590 | 2590 |
| 2591 } // namespace chrome | 2591 } // namespace chrome |
| OLD | NEW |