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

Unified Diff: chrome/common/extensions/extension_process_policy.cc

Issue 2554083002: Change Isolate Extensions to be off by default. (Closed)
Patch Set: Created 4 years 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/extensions/extension_process_policy.cc
diff --git a/chrome/common/extensions/extension_process_policy.cc b/chrome/common/extensions/extension_process_policy.cc
index 0bb15915d62ec6a0ff7215d17537e3d813502aa4..59fb528efd9031584886a596fefe89828bc9aaf7 100644
--- a/chrome/common/extensions/extension_process_policy.cc
+++ b/chrome/common/extensions/extension_process_policy.cc
@@ -8,6 +8,7 @@
#include "base/metrics/field_trial.h"
#include "base/strings/string_util.h"
#include "chrome/common/extensions/extension_constants.h"
+#include "content/public/common/content_switches.h"
#include "extensions/common/constants.h"
#include "extensions/common/extension.h"
#include "extensions/common/extension_set.h"
@@ -68,11 +69,18 @@ bool CrossesExtensionProcessBoundary(
}
bool IsIsolateExtensionsEnabled() {
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kIsolateExtensions) ||
+ base::CommandLine::ForCurrentProcess()->HasSwitch(
+ ::switches::kSitePerProcess)) {
+ return true;
+ }
+
const std::string group_name =
base::FieldTrialList::FindFullName("SiteIsolationExtensions");
- bool is_control_group = base::StartsWith(
- group_name, "Control", base::CompareCase::INSENSITIVE_ASCII);
- return !is_control_group;
+ // Use StartsWith() for more flexibility (e.g. multiple Enabled groups).
+ return base::StartsWith(group_name, "Enabled",
+ base::CompareCase::INSENSITIVE_ASCII);
}
} // namespace extensions
« no previous file with comments | « chrome/browser/extensions/process_manager_browsertest.cc ('k') | extensions/browser/guest_view/web_view/web_view_apitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698