summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/api/messaging/message_service.cc
diff options
context:
space:
mode:
authoraa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-09-04 07:32:09 +0000
committeraa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-09-04 07:32:09 +0000
commitf34706be3d46c4b7f0aaf243c1e27e0015665838 (patch)
tree851eacebcb3020db16704066794c559b6cdd4874 /chrome/browser/extensions/api/messaging/message_service.cc
parent930a7dbf4eccca3a5cb7671965bd9a38957c08cb (diff)
downloadchromium_src-f34706be3d46c4b7f0aaf243c1e27e0015665838.zip
chromium_src-f34706be3d46c4b7f0aaf243c1e27e0015665838.tar.gz
chromium_src-f34706be3d46c4b7f0aaf243c1e27e0015665838.tar.bz2
Remove permission warnings from most tabs and windows APIs.
Patch contributed by 'Chris Hebert <chebert@chromium.org>'. See http://codereview.chromium.org/10829186/ BUG=137404 TBR=jennb,derat,chebert Review URL: https://chromiumcodereview.appspot.com/10920070 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@154730 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/api/messaging/message_service.cc')
-rw-r--r--chrome/browser/extensions/api/messaging/message_service.cc12
1 files changed, 8 insertions, 4 deletions
diff --git a/chrome/browser/extensions/api/messaging/message_service.cc b/chrome/browser/extensions/api/messaging/message_service.cc
index 807cc4d..b5ed615 100644
--- a/chrome/browser/extensions/api/messaging/message_service.cc
+++ b/chrome/browser/extensions/api/messaging/message_service.cc
@@ -219,8 +219,10 @@ void MessageService::OpenChannelToExtension(
// Include info about the opener's tab (if it was a tab).
std::string tab_json = "null";
if (source_contents) {
- scoped_ptr<DictionaryValue> tab_value(
- ExtensionTabUtil::CreateTabValue(source_contents));
+ scoped_ptr<DictionaryValue> tab_value(ExtensionTabUtil::CreateTabValue(
+ source_contents,
+ profile->GetExtensionService()->extensions()->GetByID(
+ source_extension_id)));
base::JSONWriter::Write(tab_value.get(), &tab_json);
}
@@ -271,8 +273,10 @@ void MessageService::OpenChannelToTab(
// Include info about the opener's tab (if it was a tab).
std::string tab_json = "null";
if (source_contents) {
- scoped_ptr<DictionaryValue> tab_value(
- ExtensionTabUtil::CreateTabValue(source_contents));
+ scoped_ptr<DictionaryValue> tab_value(ExtensionTabUtil::CreateTabValue(
+ source_contents,
+ profile->GetExtensionService()->extensions()->GetByID(
+ extension_id)));
base::JSONWriter::Write(tab_value.get(), &tab_json);
}