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

Unified Diff: chrome/common/pepper_flash.cc

Issue 10977073: Delete some unused code found by -Wunused-function (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: leiz Created 8 years, 3 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/pepper_flash.cc
diff --git a/chrome/common/pepper_flash.cc b/chrome/common/pepper_flash.cc
index ddaf733ccc20ef894beb37841b9bf16bc18da0d8..a13b22106d54481b325765920984062494261e16 100644
--- a/chrome/common/pepper_flash.cc
+++ b/chrome/common/pepper_flash.cc
@@ -4,68 +4,8 @@
#include "chrome/common/pepper_flash.h"
-#include "base/basictypes.h"
-#include "base/command_line.h"
-#include "base/memory/ref_counted.h"
-#include "base/metrics/field_trial.h"
-#include "chrome/common/chrome_switches.h"
-#include "chrome/common/chrome_version_info.h"
#include "ppapi/shared_impl/ppapi_permissions.h"
-#if defined(OS_WIN)
-#include "base/win/metro.h"
-#endif
-
-namespace {
-
-const char* const kFieldTrialName = "ApplyPepperFlash";
-const char* const kDisableGroupName = "DisableByDefault";
-const char* const kEnableGroupName = "EnableByDefault";
-int g_disabled_group_number = -1;
-
-void ActivateFieldTrial() {
- // The field trial will expire on Jan 1st, 2014.
- scoped_refptr<base::FieldTrial> trial(
- base::FieldTrialList::FactoryGetFieldTrial(
- kFieldTrialName, 1000, kDisableGroupName, 2014, 1, 1,
- &g_disabled_group_number));
-
- CommandLine* command_line = CommandLine::ForCurrentProcess();
- if (command_line->HasSwitch(switches::kPpapiFlashFieldTrial)) {
- std::string switch_value =
- command_line->GetSwitchValueASCII(switches::kPpapiFlashFieldTrial);
- if (switch_value == switches::kPpapiFlashFieldTrialEnableByDefault) {
- trial->AppendGroup(kEnableGroupName, 1000);
- return;
- } else if (switch_value ==
- switches::kPpapiFlashFieldTrialDisableByDefault) {
- return;
- }
- }
-
- // Disable by default if one time randomization is not available.
- if (!base::FieldTrialList::IsOneTimeRandomizationEnabled())
- return;
-
- trial->UseOneTimeRandomization();
- // 50% goes into the enable-by-default group.
- trial->AppendGroup(kEnableGroupName, 500);
-}
-
-bool IsInFieldTrialGroup() {
- static bool activated = false;
- if (!activated) {
- ActivateFieldTrial();
- activated = true;
- }
-
- int group = base::FieldTrialList::FindValue(kFieldTrialName);
- return group != base::FieldTrial::kNotFinalized &&
- group != g_disabled_group_number;
-}
-
-} // namespace
-
bool ConductingPepperFlashFieldTrial() {
#if defined(OS_WIN)
return true;
« no previous file with comments | « chrome/common/extensions/permissions/permission_set_unittest.cc ('k') | content/browser/gpu/gpu_process_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698