Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2053)

Unified Diff: chrome/common/chrome_content_client.cc

Issue 11419260: Enable Pepper threading on canary. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/browser/ppapi_plugin_process_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/chrome_content_client.cc
diff --git a/chrome/common/chrome_content_client.cc b/chrome/common/chrome_content_client.cc
index e8fb3d021a1bca696c5115896f846edc4ecc2495..9ad32fd687b3a509688217d5798503c709e046e2 100644
--- a/chrome/common/chrome_content_client.cc
+++ b/chrome/common/chrome_content_client.cc
@@ -34,6 +34,7 @@
#include "ui/base/resource/resource_bundle.h"
#include "webkit/plugins/npapi/plugin_list.h"
#include "webkit/plugins/plugin_constants.h"
+#include "webkit/plugins/plugin_switches.h"
#include "webkit/user_agent/user_agent_util.h"
#include "flapper_version.h" // In SHARED_INTERMEDIATE_DIR.
@@ -313,14 +314,22 @@ void AddPepperFlashFromCommandLine(
bool GetBundledPepperFlash(content::PepperPluginInfo* plugin,
bool* override_npapi_flash) {
+ CommandLine* command_line = CommandLine::ForCurrentProcess();
+ if (!command_line->HasSwitch(switches::kDisablePepperThreading) &&
+ !command_line->HasSwitch(switches::kEnablePepperThreading)) {
+ chrome::VersionInfo::Channel channel = chrome::VersionInfo::GetChannel();
+ if (channel == chrome::VersionInfo::CHANNEL_CANARY)
+ command_line->AppendSwitch(switches::kEnablePepperThreading);
+ }
+
#if defined(FLAPPER_AVAILABLE)
// Ignore bundled Pepper Flash if there is Pepper Flash specified from the
// command-line.
- if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kPpapiFlashPath))
+ if (command_line->HasSwitch(switches::kPpapiFlashPath))
return false;
- bool force_disable = CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kDisableBundledPpapiFlash);
+ bool force_disable =
+ command_line->HasSwitch(switches::kDisableBundledPpapiFlash);
if (force_disable)
return false;
@@ -334,8 +343,8 @@ bool GetBundledPepperFlash(content::PepperPluginInfo* plugin,
if (!PathService::Get(chrome::FILE_PEPPER_FLASH_PLUGIN, &flash_path))
return false;
- bool force_enable = CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kEnableBundledPpapiFlash);
+ bool force_enable =
+ command_line->HasSwitch(switches::kEnableBundledPpapiFlash);
*plugin = CreatePepperFlashInfo(flash_path, FLAPPER_VERSION_STRING);
*override_npapi_flash = force_enable || IsPepperFlashEnabledByDefault();
« no previous file with comments | « no previous file | content/browser/ppapi_plugin_process_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698