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

Unified Diff: chrome/browser/extensions/chrome_extension_web_contents_observer.cc

Issue 1682253006: Add a control group to the SiteIsolationExtensionsActive. It corresponds to the Disabled group of t… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@uma3
Patch Set: Set correct upstream Created 4 years, 10 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 | chrome/browser/site_details_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/chrome_extension_web_contents_observer.cc
diff --git a/chrome/browser/extensions/chrome_extension_web_contents_observer.cc b/chrome/browser/extensions/chrome_extension_web_contents_observer.cc
index 9f58eefa55e9f272226c2b04b62e804bda147f5f..4168b3499380f1e9799e5637ae25fa5e468cd25d 100644
--- a/chrome/browser/extensions/chrome_extension_web_contents_observer.cc
+++ b/chrome/browser/extensions/chrome_extension_web_contents_observer.cc
@@ -5,6 +5,7 @@
#include "chrome/browser/extensions/chrome_extension_web_contents_observer.h"
#include "base/command_line.h"
+#include "base/metrics/field_trial.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/extensions/error_console/error_console.h"
#include "chrome/browser/extensions/extension_service.h"
@@ -205,8 +206,17 @@ void ChromeExtensionWebContentsObserver::SetExtensionIsolationTrial(
"SiteIsolationExtensionsActive", "FieldTrial");
}
} else {
- ChromeMetricsServiceAccessor::RegisterSyntheticFieldTrial(
- "SiteIsolationExtensionsActive", "Default");
+ if (!base::FieldTrialList::FindFullName("SiteIsolationExtensions")
+ .empty()) {
+ // The field trial is active, but we are in a control group with oopifs
+ // disabled.
+ ChromeMetricsServiceAccessor::RegisterSyntheticFieldTrial(
+ "SiteIsolationExtensionsActive", "Control");
+ } else {
+ // The field trial is not active for this version.
+ ChromeMetricsServiceAccessor::RegisterSyntheticFieldTrial(
+ "SiteIsolationExtensionsActive", "Default");
+ }
}
if (rappor::RapporService* rappor = g_browser_process->rappor_service()) {
« no previous file with comments | « no previous file | chrome/browser/site_details_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698