| 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/cpu.h" | 8 #include "base/cpu.h" |
| 9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
| 10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
| (...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 458 return ResourceBundle::GetSharedInstance().GetNativeImageNamed(resource_id); | 458 return ResourceBundle::GetSharedInstance().GetNativeImageNamed(resource_id); |
| 459 } | 459 } |
| 460 | 460 |
| 461 #if defined(OS_WIN) | 461 #if defined(OS_WIN) |
| 462 bool ChromeContentClient::SandboxPlugin(CommandLine* command_line, | 462 bool ChromeContentClient::SandboxPlugin(CommandLine* command_line, |
| 463 sandbox::TargetPolicy* policy) { | 463 sandbox::TargetPolicy* policy) { |
| 464 std::wstring plugin_dll = command_line-> | 464 std::wstring plugin_dll = command_line-> |
| 465 GetSwitchValueNative(switches::kPluginPath); | 465 GetSwitchValueNative(switches::kPluginPath); |
| 466 | 466 |
| 467 FilePath builtin_flash; | 467 FilePath builtin_flash; |
| 468 if (!PathService::Get(chrome::FILE_FLASH_PLUGIN, &builtin_flash)) | 468 if (!PathService::Get(chrome::FILE_FLASH_PLUGIN_EXISTING, &builtin_flash)) |
| 469 return false; | 469 return false; |
| 470 | 470 |
| 471 FilePath plugin_path(plugin_dll); | 471 FilePath plugin_path(plugin_dll); |
| 472 if (plugin_path.BaseName() != builtin_flash.BaseName()) | 472 if (plugin_path.BaseName() != builtin_flash.BaseName()) |
| 473 return false; | 473 return false; |
| 474 | 474 |
| 475 if (base::win::GetVersion() <= base::win::VERSION_XP || | 475 if (base::win::GetVersion() <= base::win::VERSION_XP || |
| 476 CommandLine::ForCurrentProcess()->HasSwitch( | 476 CommandLine::ForCurrentProcess()->HasSwitch( |
| 477 switches::kDisableFlashSandbox)) { | 477 switches::kDisableFlashSandbox)) { |
| 478 return false; | 478 return false; |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 541 | 541 |
| 542 bool ChromeContentClient::GetBundledFieldTrialPepperFlash( | 542 bool ChromeContentClient::GetBundledFieldTrialPepperFlash( |
| 543 content::PepperPluginInfo* plugin, | 543 content::PepperPluginInfo* plugin, |
| 544 bool* override_npapi_flash) { | 544 bool* override_npapi_flash) { |
| 545 if (!ConductingPepperFlashFieldTrial()) | 545 if (!ConductingPepperFlashFieldTrial()) |
| 546 return false; | 546 return false; |
| 547 return GetBundledPepperFlash(plugin, override_npapi_flash); | 547 return GetBundledPepperFlash(plugin, override_npapi_flash); |
| 548 } | 548 } |
| 549 | 549 |
| 550 } // namespace chrome | 550 } // namespace chrome |
| OLD | NEW |