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

Side by Side Diff: chrome/common/pepper_flash.cc

Issue 11016016: Flapper field trial to use workerpool for sync file operations. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix group check for browser_tests. Created 8 years, 2 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/common/pepper_flash.h" 5 #include "chrome/common/pepper_flash.h"
6 6
7 #include "base/memory/ref_counted.h"
8 #include "base/metrics/field_trial.h"
9
7 #include "ppapi/shared_impl/ppapi_permissions.h" 10 #include "ppapi/shared_impl/ppapi_permissions.h"
8 11
12 namespace {
13
14 const char* const kIOFieldTrialName = "FlapperIOThread";
15 const char* const kPoolGroupName = "PoolThread";
16 const char* const kFileGroupName = "FileThread";
17
18 } // namespace
19
20 void ActivatePepperFlashThreadFieldTrial() {
21 static bool activated = false;
22 if (activated)
23 return;
24
25 activated = true;
26
27 // The field trial will expire on Jan 1st, 2014.
28 scoped_refptr<base::FieldTrial> trial(
29 base::FieldTrialList::FactoryGetFieldTrial(
30 kIOFieldTrialName, 1000, kPoolGroupName, 2014, 1, 1,
31 NULL));
32
33 // 50% goes into the FILE thread group.
34 trial->AppendGroup(kFileGroupName, 500);
35 }
36
9 bool ConductingPepperFlashFieldTrial() { 37 bool ConductingPepperFlashFieldTrial() {
10 #if defined(OS_WIN) 38 #if defined(OS_WIN)
11 return true; 39 return true;
12 #elif defined(OS_MACOSX) 40 #elif defined(OS_MACOSX)
13 return true; 41 return true;
14 #else 42 #else
15 return false; 43 return false;
16 #endif 44 #endif
17 } 45 }
18 46
(...skipping 11 matching lines...) Expand all
30 #else 58 #else
31 return false; 59 return false;
32 #endif 60 #endif
33 } 61 }
34 62
35 int32 kPepperFlashPermissions = ppapi::PERMISSION_DEV | 63 int32 kPepperFlashPermissions = ppapi::PERMISSION_DEV |
36 ppapi::PERMISSION_PRIVATE | 64 ppapi::PERMISSION_PRIVATE |
37 ppapi::PERMISSION_BYPASS_USER_GESTURE; 65 ppapi::PERMISSION_BYPASS_USER_GESTURE;
38 66
39 67
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698