Index: chrome/browser/component_updater/pepper_flash_component_installer.cc |
=================================================================== |
--- chrome/browser/component_updater/pepper_flash_component_installer.cc (revision 133481) |
+++ chrome/browser/component_updater/pepper_flash_component_installer.cc (working copy) |
@@ -22,10 +22,11 @@ |
#include "base/version.h" |
#include "build/build_config.h" |
#include "chrome/browser/component_updater/component_updater_service.h" |
-#include "chrome/common/pepper_flash.h" |
+#include "chrome/browser/component_updater/pepper_flash_field_trial.h" |
#include "chrome/browser/plugin_prefs.h" |
#include "chrome/common/chrome_constants.h" |
#include "chrome/common/chrome_paths.h" |
+#include "chrome/installer/util/browser_distribution.h" |
#include "content/public/browser/browser_thread.h" |
#include "content/public/browser/plugin_service.h" |
#include "content/public/common/pepper_plugin_info.h" |
@@ -33,7 +34,9 @@ |
#include "webkit/plugins/plugin_constants.h" |
#include "webkit/plugins/ppapi/plugin_module.h" |
-#include "flapper_version.h" // In SHARED_INTERMEDIATE_DIR. |
+#if defined(OS_WIN) |
+#include "base/win/metro.h" |
+#endif |
using content::BrowserThread; |
using content::PluginService; |
@@ -76,6 +79,29 @@ |
// If we don't have a Pepper Flash component, this is the version we claim. |
const char kNullVersion[] = "0.0.0.0"; |
+// True if Pepper Flash should be enabled by default. Aura builds for any OS |
+// Windows 8 metro mode and part of Windows canary have it enabled by default. |
+bool IsPepperFlashEnabledByDefault() { |
+#if defined(USE_AURA) |
+ return true; |
+#elif !defined(OS_WIN) |
+ return false; |
+#else |
+ if (base::win::GetMetroModule()) |
+ return true; |
+ if (!PepperFlashFieldTrial::InEnableByDefaultGroup()) |
+ return false; |
+ |
+ BrowserDistribution* dist = BrowserDistribution::GetDistribution(); |
+ if (!dist) |
+ return false; |
+ string16 channel; |
+ if (!dist->GetChromeChannel(&channel)) |
+ return false; |
+ return (channel == L"canary"); |
+#endif |
+} |
+ |
// The base directory on Windows looks like: |
// <profile>\AppData\Local\Google\Chrome\User Data\PepperFlash\. |
FilePath GetPepperFlashBaseDirectory() { |
@@ -360,7 +386,7 @@ |
} // namespace |
void RegisterPepperFlashComponent(ComponentUpdateService* cus) { |
-#if defined(GOOGLE_CHROME_BUILD) && !defined(FLAPPER_AVAILABLE) |
+#if defined(GOOGLE_CHROME_BUILD) |
BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE, |
base::Bind(&StartPepperFlashUpdateRegistration, cus)); |
#endif |
Property changes on: chrome/browser/component_updater/pepper_flash_component_installer.cc |
___________________________________________________________________ |
Deleted: svn:mergeinfo |