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

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

Issue 2850793005: Remove command line/field trial support and configs for Isolate Extensions. (Closed)
Patch Set: Rebase. Created 3 years, 7 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 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"
8 #include "base/metrics/field_trial.h"
9 #include "base/strings/string_util.h" 7 #include "base/strings/string_util.h"
10 #include "chrome/common/extensions/extension_constants.h" 8 #include "chrome/common/extensions/extension_constants.h"
11 #include "content/public/common/content_switches.h"
12 #include "extensions/common/constants.h" 9 #include "extensions/common/constants.h"
13 #include "extensions/common/extension.h" 10 #include "extensions/common/extension.h"
14 #include "extensions/common/extension_set.h" 11 #include "extensions/common/extension_set.h"
15 #include "extensions/common/manifest_handlers/app_isolation_info.h" 12 #include "extensions/common/manifest_handlers/app_isolation_info.h"
16 #include "extensions/common/switches.h" 13 #include "extensions/common/switches.h"
17 14
18 namespace extensions { 15 namespace extensions {
19 16
20 const extensions::Extension* GetNonBookmarkAppExtension( 17 const extensions::Extension* GetNonBookmarkAppExtension(
21 const ExtensionSet& extensions, const GURL& url) { 18 const ExtensionSet& extensions, const GURL& url) {
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 new_url_extension->id() == extensions::kWebStoreAppId); 58 new_url_extension->id() == extensions::kWebStoreAppId);
62 if (old_url_is_hosted_app && 59 if (old_url_is_hosted_app &&
63 new_url_is_normal_or_hosted && 60 new_url_is_normal_or_hosted &&
64 !either_is_web_store) 61 !either_is_web_store)
65 return false; 62 return false;
66 } 63 }
67 64
68 return old_url_extension != new_url_extension; 65 return old_url_extension != new_url_extension;
69 } 66 }
70 67
71 bool IsIsolateExtensionsEnabled() {
72 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
73 switches::kIsolateExtensions) ||
74 base::CommandLine::ForCurrentProcess()->HasSwitch(
75 ::switches::kSitePerProcess)) {
76 return true;
77 }
78
79 const std::string group_name =
80 base::FieldTrialList::FindFullName("SiteIsolationExtensions");
81 // Use StartsWith() for more flexibility (e.g. multiple Enabled groups).
82 return !base::StartsWith(group_name, "Control",
83 base::CompareCase::INSENSITIVE_ASCII);
84 }
85
86 } // namespace extensions 68 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/common/extensions/extension_process_policy.h ('k') | chrome/renderer/extensions/chrome_extensions_renderer_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698