Commit 29407d3b authored by bauerb@chromium.org's avatar bauerb@chromium.org

Add a command line flag to specify the minimum flash version implementing the...

Add a command line flag to specify the minimum flash version implementing the NPP_ClearSiteData API.

BUG=58235
TEST=none

Review URL: http://codereview.chromium.org/6242002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71441 0039d316-1c4b-4281-b951-d872f2087c98
parent c9d8cb0c
......@@ -4,11 +4,13 @@
#include "chrome/browser/plugin_data_remover.h"
#include "base/command_line.h"
#include "base/message_loop_proxy.h"
#include "base/metrics/histogram.h"
#include "base/version.h"
#include "chrome/browser/browser_thread.h"
#include "chrome/browser/plugin_service.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/plugin_messages.h"
#include "webkit/plugins/npapi/plugin_group.h"
#include "webkit/plugins/npapi/plugin_list.h"
......@@ -156,8 +158,11 @@ bool PluginDataRemover::IsSupported() {
}
scoped_ptr<Version> version(
webkit::npapi::PluginGroup::CreateVersionFromString(plugin.version));
scoped_ptr<Version> min_version(
Version::GetVersionFromString(kMinFlashVersion));
scoped_ptr<Version> min_version(Version::GetVersionFromString(
CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
switches::kMinClearSiteDataFlashVersion)));
if (!min_version.get())
min_version.reset(Version::GetVersionFromString(kMinFlashVersion));
return plugin.enabled &&
version.get() &&
min_version->CompareTo(*version) == -1;
......
......@@ -811,6 +811,9 @@ const char kMessageLoopHistogrammer[] = "message-loop-histogrammer";
// and performance tests.
const char kMetricsRecordingOnly[] = "metrics-recording-only";
// The minimum version of Flash that implements the NPP_ClearSiteData API.
const char kMinClearSiteDataFlashVersion[] = "min-clearsitedata-flash-version";
// Sets the default IP address (interface) for the stub (normally 127.0.0.1).
const char kNaClDebugIP[] = "nacl-debug-ip";
......
......@@ -232,6 +232,7 @@ extern const char kMediaCacheSize[];
extern const char kMemoryProfiling[];
extern const char kMessageLoopHistogrammer[];
extern const char kMetricsRecordingOnly[];
extern const char kMinClearSiteDataFlashVersion[];
extern const char kNaClDebugIP[];
extern const char kNaClDebugPorts[];
extern const char kNaClBrokerProcess[];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment