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/common/chrome_content_client.h" | 5 #include "chrome/common/chrome_content_client.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
10 #include "base/process_util.h" | 10 #include "base/process_util.h" |
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
209 switches::kPpapiFlashPath); | 209 switches::kPpapiFlashPath); |
210 if (!flash_path.empty()) { | 210 if (!flash_path.empty()) { |
211 plugin.path = FilePath(flash_path); | 211 plugin.path = FilePath(flash_path); |
212 | 212 |
213 // Also get the version from the command-line. | 213 // Also get the version from the command-line. |
214 flash_version = CommandLine::ForCurrentProcess()->GetSwitchValueASCII( | 214 flash_version = CommandLine::ForCurrentProcess()->GetSwitchValueASCII( |
215 switches::kPpapiFlashVersion); | 215 switches::kPpapiFlashVersion); |
216 } else { | 216 } else { |
217 // Use the bundled Pepper Flash if it's enabled and available. | 217 // Use the bundled Pepper Flash if it's enabled and available. |
218 // It's currently only enabled by default on Linux ia32 and x64. | 218 // It's currently only enabled by default on Linux ia32 and x64. |
219 #if defined(FLAPPER_AVAILABLE) && defined(OS_LINUX) && \ | |
220 (defined(ARCH_CPU_X86) || defined(ARCH_CPU_X86_64)) | |
221 bool bundled_flapper_enabled = true; | |
222 #else | |
223 bool bundled_flapper_enabled = CommandLine::ForCurrentProcess()->HasSwitch( | 219 bool bundled_flapper_enabled = CommandLine::ForCurrentProcess()->HasSwitch( |
224 switches::kEnableBundledPpapiFlash); | 220 switches::kEnableBundledPpapiFlash); |
225 #endif | |
226 bundled_flapper_enabled &= !CommandLine::ForCurrentProcess()->HasSwitch( | 221 bundled_flapper_enabled &= !CommandLine::ForCurrentProcess()->HasSwitch( |
227 switches::kDisableBundledPpapiFlash); | 222 switches::kDisableBundledPpapiFlash); |
228 if (!bundled_flapper_enabled) | 223 if (!bundled_flapper_enabled) |
229 return; | 224 return; |
230 | 225 |
231 #if defined(FLAPPER_AVAILABLE) | 226 #if defined(FLAPPER_AVAILABLE) |
232 if (!PathService::Get(chrome::FILE_PEPPER_FLASH_PLUGIN, &plugin.path)) | 227 if (!PathService::Get(chrome::FILE_PEPPER_FLASH_PLUGIN, &plugin.path)) |
233 return; | 228 return; |
234 flash_version = FLAPPER_VERSION_STRING; | 229 flash_version = FLAPPER_VERSION_STRING; |
235 #else | 230 #else |
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
473 DCHECK(sandbox_profile_resource_id); | 468 DCHECK(sandbox_profile_resource_id); |
474 if (sandbox_type == CHROME_SANDBOX_TYPE_NACL_LOADER) { | 469 if (sandbox_type == CHROME_SANDBOX_TYPE_NACL_LOADER) { |
475 *sandbox_profile_resource_id = IDR_NACL_SANDBOX_PROFILE; | 470 *sandbox_profile_resource_id = IDR_NACL_SANDBOX_PROFILE; |
476 return true; | 471 return true; |
477 } | 472 } |
478 return false; | 473 return false; |
479 } | 474 } |
480 #endif | 475 #endif |
481 | 476 |
482 } // namespace chrome | 477 } // namespace chrome |
OLD | NEW |