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

Unified Diff: content/common/sandbox_win.cc

Issue 1407883005: Added field trial for enabling AppContainer and a chrome://flags entry. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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: content/common/sandbox_win.cc
diff --git a/content/common/sandbox_win.cc b/content/common/sandbox_win.cc
index d8689bc71901ec4221f624624125a7596059faa0..334bdefc497c6e8e8af438d9bbd6f8f8a013c1e5 100644
--- a/content/common/sandbox_win.cc
+++ b/content/common/sandbox_win.cc
@@ -13,6 +13,7 @@
#include "base/hash.h"
#include "base/logging.h"
#include "base/memory/shared_memory.h"
+#include "base/metrics/field_trial.h"
#include "base/metrics/sparse_histogram.h"
#include "base/path_service.h"
#include "base/process/launch.h"
@@ -569,7 +570,10 @@ void AddAppContainerPolicy(sandbox::TargetPolicy* policy, const wchar_t* sid) {
if (base::win::GetVersion() >= base::win::VERSION_WIN8) {
const base::CommandLine& command_line =
*base::CommandLine::ForCurrentProcess();
- if (command_line.HasSwitch(switches::kEnableAppContainer)) {
+ std::string appcontainer_trial_name =
+ base::FieldTrialList::FindFullName("EnableAppContainer");
+ if (command_line.HasSwitch(switches::kEnableAppContainer) ||
+ appcontainer_trial_name == "Enabled") {
Alexei Svitkine (slow) 2015/11/02 17:27:52 Does this code run in the child process, browser p
policy->SetLowBox(sid);
}
}

Powered by Google App Engine
This is Rietveld 408576698