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

Unified Diff: media/video/capture/mac/avfoundation_glue.mm

Issue 128373002: Added code for AVFoundation Finch Experiment enabling (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: asvitkine@ comments Created 6 years, 11 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/video/capture/mac/avfoundation_glue.mm
diff --git a/media/video/capture/mac/avfoundation_glue.mm b/media/video/capture/mac/avfoundation_glue.mm
index 1610d0f104a7e48bd8a1302e0023bcdb810149aa..4f7de4d480cea1a52f62ba1f7a2711b91c46bade 100644
--- a/media/video/capture/mac/avfoundation_glue.mm
+++ b/media/video/capture/mac/avfoundation_glue.mm
@@ -9,6 +9,7 @@
#include "base/command_line.h"
#include "base/lazy_instance.h"
#include "base/mac/mac_util.h"
+#include "base/metrics/field_trial.h"
#include "media/base/media_switches.h"
namespace {
@@ -56,9 +57,13 @@ static NSString* ReadNSStringPtr(const char* symbol) {
} // namespace media
bool AVFoundationGlue::IsAVFoundationSupported() {
+ if (!base::mac::IsOSLionOrLater())
+ return false;
+ const std::string group_name =
+ base::FieldTrialList::FindFullName("AVFoundationMacVideoCapture");
const CommandLine* cmd_line = CommandLine::ForCurrentProcess();
- return cmd_line->HasSwitch(switches::kEnableAVFoundation) &&
- base::mac::IsOSLionOrLater() && [AVFoundationBundle() load];
+ return (cmd_line->HasSwitch(switches::kEnableAVFoundation) ||
+ group_name == "Enabled") && [AVFoundationBundle() load];
}
NSBundle const* AVFoundationGlue::AVFoundationBundle() {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698