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

Side by Side Diff: chrome/common/extensions/extension_process_policy.cc

Issue 2456413002: Revert of Enable Site Isolation for Extensions. (Closed)
Patch Set: Created 4 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 unified diff | Download patch
OLDNEW
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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 if (old_url_is_hosted_app && 61 if (old_url_is_hosted_app &&
62 new_url_is_normal_or_hosted && 62 new_url_is_normal_or_hosted &&
63 !either_is_web_store) 63 !either_is_web_store)
64 return false; 64 return false;
65 } 65 }
66 66
67 return old_url_extension != new_url_extension; 67 return old_url_extension != new_url_extension;
68 } 68 }
69 69
70 bool IsIsolateExtensionsEnabled() { 70 bool IsIsolateExtensionsEnabled() {
71 return true; 71 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
72 switches::kIsolateExtensions)) {
73 return true;
74 }
75
76 const std::string group_name =
77 base::FieldTrialList::FindFullName("SiteIsolationExtensions");
78 // Use StartsWith() for more flexibility (e.g. multiple Enabled groups).
79 return base::StartsWith(group_name, "Enabled",
80 base::CompareCase::INSENSITIVE_ASCII);
72 } 81 }
73 82
74 } // namespace extensions 83 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_apitest.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