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

Unified Diff: chrome/common/chrome_content_client.cc

Issue 10123016: Use bundled Pepper Flash on Windows (Canary, still on a field trial). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 months 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
Index: chrome/common/chrome_content_client.cc
diff --git a/chrome/common/chrome_content_client.cc b/chrome/common/chrome_content_client.cc
index cbb47ddf0c9cb496b29e6a45b27d0ad8d5ffa495..c75a2f8366fa016b409b6876eb497f874a9896ac 100644
--- a/chrome/common/chrome_content_client.cc
+++ b/chrome/common/chrome_content_client.cc
@@ -17,6 +17,7 @@
#include "chrome/common/chrome_paths.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/chrome_version_info.h"
+#include "chrome/common/pepper_flash.h"
#include "chrome/common/render_messages.h"
#include "content/public/common/pepper_plugin_info.h"
#include "content/public/common/url_constants.h"
@@ -28,7 +29,7 @@
#include "webkit/plugins/npapi/plugin_list.h"
#include "webkit/plugins/plugin_constants.h"
-#include "flapper_version.h" // In <(SHARED_INTERMEDIATE_DIR).
+#include "flapper_version.h" // In SHARED_INTERMEDIATE_DIR.
#if defined(OS_WIN)
#include "base/win/registry.h"
@@ -214,15 +215,15 @@ void AddPepperFlash(std::vector<content::PepperPluginInfo>* plugins) {
flash_version = CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
switches::kPpapiFlashVersion);
} else {
- // Use the bundled Pepper Flash if it's enabled and available.
- // It's currently only enabled by default on Linux ia32 and x64.
-#if defined(FLAPPER_AVAILABLE) && defined(OS_LINUX) && \
- (defined(ARCH_CPU_X86) || defined(ARCH_CPU_X86_64))
- bool bundled_flapper_enabled = true;
-#else
+ // Try to use a bundled Pepper Flash if:
+ // 1) it's forcibly enabled via the command-line;
bool bundled_flapper_enabled = CommandLine::ForCurrentProcess()->HasSwitch(
switches::kEnableBundledPpapiFlash);
+ // 2) it's known to be available at build time and enabled by default; and
+#if defined(FLAPPER_AVAILABLE)
+ bundled_flapper_enabled |= IsPepperFlashEnabledByDefault();
#endif
+ // 3) it's not forcibly disabled via the command-line.
bundled_flapper_enabled &= !CommandLine::ForCurrentProcess()->HasSwitch(
switches::kDisableBundledPpapiFlash);
yzshen1 2012/04/19 18:33:09 should be 8 space indent (from the beginning of th
viettrungluu 2012/04/19 20:23:16 It's a 4-space continuation indent from being alig
yzshen1 2012/04/19 20:27:49 But it is not consistent with line 221. I don't th
if (!bundled_flapper_enabled)

Powered by Google App Engine
This is Rietveld 408576698