summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/extension_function_dispatcher.cc
diff options
context:
space:
mode:
authorarv@chromium.org <arv@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-10 19:54:41 +0000
committerarv@chromium.org <arv@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-10 19:54:41 +0000
commitcb0ce1e02b7d16ab9024da9335ab7c70c493aa4e (patch)
tree1665a8f8d944aa85938154cbf2fefa5797c226aa /chrome/browser/extensions/extension_function_dispatcher.cc
parent17496bbed312152a6a0c2251c88ccefd70849540 (diff)
downloadchromium_src-cb0ce1e02b7d16ab9024da9335ab7c70c493aa4e.zip
chromium_src-cb0ce1e02b7d16ab9024da9335ab7c70c493aa4e.tar.gz
chromium_src-cb0ce1e02b7d16ab9024da9335ab7c70c493aa4e.tar.bz2
Bookmark manager: Open in incognito window.
Make IsIncognitoEnabled take an Extension* as an argument as well and use that where possible. BUG=4890 TEST=Select one more bookmarks and right click/tools and select "Open in incognito". The bookmarks should open in an incognito window. Review URL: http://codereview.chromium.org/750001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41193 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/extension_function_dispatcher.cc')
-rw-r--r--chrome/browser/extensions/extension_function_dispatcher.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/chrome/browser/extensions/extension_function_dispatcher.cc b/chrome/browser/extensions/extension_function_dispatcher.cc
index 36f8651..fb380a1 100644
--- a/chrome/browser/extensions/extension_function_dispatcher.cc
+++ b/chrome/browser/extensions/extension_function_dispatcher.cc
@@ -285,7 +285,7 @@ ExtensionFunctionDispatcher::ExtensionFunctionDispatcher(
render_view_host->process()->id());
bool incognito_enabled =
- profile()->GetExtensionsService()->IsIncognitoEnabled(extension->id());
+ profile()->GetExtensionsService()->IsIncognitoEnabled(extension);
// Update the extension permissions. Doing this each time we create an EFD
// ensures that new processes are informed of permissions for newly installed
@@ -357,11 +357,12 @@ void ExtensionFunctionDispatcher::HandleRequest(const std::string& name,
function->SetArgs(args);
function->set_request_id(request_id);
function->set_has_callback(has_callback);
- function->set_include_incognito(
- profile()->GetExtensionsService()->IsIncognitoEnabled(extension_id()));
-
ExtensionsService* service = profile()->GetExtensionsService();
DCHECK(service);
+ Extension* extension = service->GetExtensionById(extension_id(), false);
+ DCHECK(extension);
+ function->set_include_incognito(service->IsIncognitoEnabled(extension));
+
ExtensionsQuotaService* quota = service->quota_service();
if (quota->Assess(extension_id(), function, args, base::TimeTicks::Now())) {
function->Run();