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

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

Issue 8585016: Don't use process isolation for bookmark apps. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_set.h" 5 #include "chrome/common/extensions/extension_set.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "chrome/common/url_constants.h" 8 #include "chrome/common/url_constants.h"
9 9
10 ExtensionSet::ExtensionSet() { 10 ExtensionSet::ExtensionSet() {
(...skipping 28 matching lines...) Expand all
39 39
40 return extension->id(); 40 return extension->id();
41 } 41 }
42 42
43 const Extension* ExtensionSet::GetByURL(const GURL& url) const { 43 const Extension* ExtensionSet::GetByURL(const GURL& url) const {
44 if (url.SchemeIs(chrome::kExtensionScheme)) 44 if (url.SchemeIs(chrome::kExtensionScheme))
45 return GetByID(url.host()); 45 return GetByID(url.host());
46 46
47 ExtensionMap::const_iterator i = extensions_.begin(); 47 ExtensionMap::const_iterator i = extensions_.begin();
48 for (; i != extensions_.end(); ++i) { 48 for (; i != extensions_.end(); ++i) {
49 if (i->second->web_extent().MatchesURL(url)) 49 // Exclude bookmark apps so that they do not affect the process model.
50 // TODO(creis): Where is the right place to do this exclusion?
51 if (i->second->web_extent().MatchesURL(url) &&
52 !i->second->from_bookmark()) {
50 return i->second.get(); 53 return i->second.get();
54 }
51 } 55 }
52 56
53 return NULL; 57 return NULL;
54 } 58 }
55 59
56 bool ExtensionSet::InSameExtent(const GURL& old_url, 60 bool ExtensionSet::InSameExtent(const GURL& old_url,
57 const GURL& new_url) const { 61 const GURL& new_url) const {
58 return GetByURL(old_url) == GetByURL(new_url); 62 return GetByURL(old_url) == GetByURL(new_url);
59 } 63 }
60 64
(...skipping 11 matching lines...) Expand all
72 76
73 ExtensionMap::const_iterator i = extensions_.begin(); 77 ExtensionMap::const_iterator i = extensions_.begin();
74 for (; i != extensions_.end(); ++i) { 78 for (; i != extensions_.end(); ++i) {
75 if (i->second->location() == Extension::COMPONENT && 79 if (i->second->location() == Extension::COMPONENT &&
76 i->second->web_extent().MatchesURL(url)) 80 i->second->web_extent().MatchesURL(url))
77 return true; 81 return true;
78 } 82 }
79 83
80 return false; 84 return false;
81 } 85 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698