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

Side by Side Diff: chrome/browser/extensions/extension_info_map.cc

Issue 8477004: Have content/ create and destroy its own threads. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: With this patchset, Chrome runs and exits normally on Linux. 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/browser/extensions/extension_info_map.h" 5 #include "chrome/browser/extensions/extension_info_map.h"
6 6
7 #include <algorithm>
8
7 #include "chrome/common/extensions/extension.h" 9 #include "chrome/common/extensions/extension.h"
8 #include "chrome/common/extensions/extension_set.h" 10 #include "chrome/common/extensions/extension_set.h"
9 #include "chrome/common/url_constants.h" 11 #include "chrome/common/url_constants.h"
10 #include "content/public/browser/browser_thread.h" 12 #include "content/public/browser/browser_thread.h"
11 13
12 using content::BrowserThread; 14 using content::BrowserThread;
13 15
14 namespace { 16 namespace {
15 17
16 void CheckOnValidThread() { 18 void CheckOnValidThread() {
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 ExtensionSet::ExtensionMap::const_iterator i = extensions_.begin(); 139 ExtensionSet::ExtensionMap::const_iterator i = extensions_.begin();
138 for (; i != extensions_.end(); ++i) { 140 for (; i != extensions_.end(); ++i) {
139 if (i->second->web_extent().MatchesSecurityOrigin(origin) && 141 if (i->second->web_extent().MatchesSecurityOrigin(origin) &&
140 process_map_.Contains(i->first, process_id) && 142 process_map_.Contains(i->first, process_id) &&
141 i->second->HasAPIPermission(permission)) { 143 i->second->HasAPIPermission(permission)) {
142 return true; 144 return true;
143 } 145 }
144 } 146 }
145 return false; 147 return false;
146 } 148 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698