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 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
207 CommandLine::ForCurrentProcess()->GetSwitchValueNative( | 207 CommandLine::ForCurrentProcess()->GetSwitchValueNative( |
208 switches::kPpapiFlashPath); | 208 switches::kPpapiFlashPath); |
209 if (!flash_path.empty()) { | 209 if (!flash_path.empty()) { |
210 plugin.path = FilePath(flash_path); | 210 plugin.path = FilePath(flash_path); |
211 | 211 |
212 // Also get the version from the command-line. | 212 // Also get the version from the command-line. |
213 flash_version = CommandLine::ForCurrentProcess()->GetSwitchValueASCII( | 213 flash_version = CommandLine::ForCurrentProcess()->GetSwitchValueASCII( |
214 switches::kPpapiFlashVersion); | 214 switches::kPpapiFlashVersion); |
215 } else { | 215 } else { |
216 // Use the bundled Pepper Flash if it's enabled and available. | 216 // Use the bundled Pepper Flash if it's enabled and available. |
217 // It's currently only enabled by default on Linux x64. | 217 // It's currently only enabled by default on Linux ia32 and x64. |
218 #if defined(FLAPPER_AVAILABLE) && defined(OS_LINUX) && defined(ARCH_CPU_X86_64) | 218 #if defined(FLAPPER_AVAILABLE) && defined(OS_LINUX) && \ |
| 219 (defined(ARCH_CPU_X86) || defined(ARCH_CPU_X86_64)) |
219 bool bundled_flapper_enabled = true; | 220 bool bundled_flapper_enabled = true; |
220 #else | 221 #else |
221 bool bundled_flapper_enabled = CommandLine::ForCurrentProcess()->HasSwitch( | 222 bool bundled_flapper_enabled = CommandLine::ForCurrentProcess()->HasSwitch( |
222 switches::kEnableBundledPpapiFlash); | 223 switches::kEnableBundledPpapiFlash); |
223 #endif | 224 #endif |
224 bundled_flapper_enabled &= !CommandLine::ForCurrentProcess()->HasSwitch( | 225 bundled_flapper_enabled &= !CommandLine::ForCurrentProcess()->HasSwitch( |
225 switches::kDisableBundledPpapiFlash); | 226 switches::kDisableBundledPpapiFlash); |
226 if (!bundled_flapper_enabled) | 227 if (!bundled_flapper_enabled) |
227 return; | 228 return; |
228 | 229 |
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
469 DCHECK(sandbox_profile_resource_id); | 470 DCHECK(sandbox_profile_resource_id); |
470 if (sandbox_type == CHROME_SANDBOX_TYPE_NACL_LOADER) { | 471 if (sandbox_type == CHROME_SANDBOX_TYPE_NACL_LOADER) { |
471 *sandbox_profile_resource_id = IDR_NACL_SANDBOX_PROFILE; | 472 *sandbox_profile_resource_id = IDR_NACL_SANDBOX_PROFILE; |
472 return true; | 473 return true; |
473 } | 474 } |
474 return false; | 475 return false; |
475 } | 476 } |
476 #endif | 477 #endif |
477 | 478 |
478 } // namespace chrome | 479 } // namespace chrome |
OLD | NEW |