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

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

Issue 8113035: Remove RenderProcessHost::is_extension_process (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updates Created 9 years, 2 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 | 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 "chrome/common/extensions/extension.h" 7 #include "chrome/common/extensions/extension.h"
8 #include "content/browser/browser_thread.h" 8 #include "content/browser/browser_thread.h"
9 9
10 namespace { 10 namespace {
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 return iter->second.incognito_enabled; 88 return iter->second.incognito_enabled;
89 return false; 89 return false;
90 } 90 }
91 91
92 bool ExtensionInfoMap::CanCrossIncognito(const Extension* extension) { 92 bool ExtensionInfoMap::CanCrossIncognito(const Extension* extension) {
93 // This is duplicated from ExtensionService :(. 93 // This is duplicated from ExtensionService :(.
94 return IsIncognitoEnabled(extension->id()) && 94 return IsIncognitoEnabled(extension->id()) &&
95 !extension->incognito_split_mode(); 95 !extension->incognito_split_mode();
96 } 96 }
97 97
98 // These are duplicated from ExtensionProcessManager :(. 98 // These are duplicated from ExtensionProcessManager so that we can have the
99 void ExtensionInfoMap::BindingsEnabledForProcess(int host_id) { 99 // information on the IO thread :(.
100 extension_bindings_process_ids_.insert(host_id); 100 void ExtensionInfoMap::BindingsEnabledForProcess(int render_process_id) {
101 extension_bindings_process_ids_.insert(render_process_id);
101 } 102 }
102 103
103 void ExtensionInfoMap::BindingsDisabledForProcess(int host_id) { 104 void ExtensionInfoMap::BindingsDisabledForProcess(int render_process_id) {
104 extension_bindings_process_ids_.erase(host_id); 105 extension_bindings_process_ids_.erase(render_process_id);
105 } 106 }
106 107
107 bool ExtensionInfoMap::AreBindingsEnabledForProcess(int host_id) const { 108 bool ExtensionInfoMap::AreBindingsEnabledForProcess(
108 return extension_bindings_process_ids_.find(host_id) != 109 int render_process_id) const {
110 return extension_bindings_process_ids_.find(render_process_id) !=
109 extension_bindings_process_ids_.end(); 111 extension_bindings_process_ids_.end();
110 } 112 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_info_map.h ('k') | chrome/browser/extensions/extension_process_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698