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

Unified Diff: chrome/browser/extensions/api/messaging/message_service.cc

Issue 10829186: Tabs API is usable without tabs permission. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: ETU now SetString()'s for empty values Created 8 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/extensions/all_urls_apitest.cc ('k') | chrome/browser/extensions/api/tabs/tabs.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/api/messaging/message_service.cc
diff --git a/chrome/browser/extensions/api/messaging/message_service.cc b/chrome/browser/extensions/api/messaging/message_service.cc
index 807cc4d9ddce81772731ad7f9c031f903f65baac..b5ed615b916f9abecdc2f0a67cdf23bf4cdd35ac 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);
}
« no previous file with comments | « chrome/browser/extensions/all_urls_apitest.cc ('k') | chrome/browser/extensions/api/tabs/tabs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698