Chromium Code Reviews| OLD | NEW |
|---|---|
| 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/extensions/extension_process_policy.h" | 5 #include "chrome/common/extensions/extension_process_policy.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/metrics/field_trial.h" | 8 #include "base/metrics/field_trial.h" |
| 9 #include "base/strings/string_util.h" | 9 #include "base/strings/string_util.h" |
| 10 #include "chrome/common/extensions/extension_constants.h" | 10 #include "chrome/common/extensions/extension_constants.h" |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 72 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | 72 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 73 switches::kIsolateExtensions) || | 73 switches::kIsolateExtensions) || |
| 74 base::CommandLine::ForCurrentProcess()->HasSwitch( | 74 base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 75 ::switches::kSitePerProcess)) { | 75 ::switches::kSitePerProcess)) { |
| 76 return true; | 76 return true; |
| 77 } | 77 } |
| 78 | 78 |
| 79 const std::string group_name = | 79 const std::string group_name = |
| 80 base::FieldTrialList::FindFullName("SiteIsolationExtensions"); | 80 base::FieldTrialList::FindFullName("SiteIsolationExtensions"); |
| 81 // Use StartsWith() for more flexibility (e.g. multiple Enabled groups). | 81 // Use StartsWith() for more flexibility (e.g. multiple Enabled groups). |
| 82 return base::StartsWith(group_name, "Enabled", | 82 bool control_group = base::StartsWith(group_name, "Control", |
| 83 base::CompareCase::INSENSITIVE_ASCII); | 83 base::CompareCase::INSENSITIVE_ASCII); |
| 84 bool default_group = base::StartsWith(group_name, "Default", | |
| 85 base::CompareCase::INSENSITIVE_ASCII); | |
| 86 if (control_group || default_group) | |
|
Devlin
2017/02/27 19:27:22
It's strange to me that the default_group behavior
nasko
2017/02/27 19:35:14
Yes, naming is hard ... the "default" group should
| |
| 87 return false; | |
| 88 | |
| 89 return true; | |
| 84 } | 90 } |
| 85 | 91 |
| 86 } // namespace extensions | 92 } // namespace extensions |
| OLD | NEW |