Chromium Code Reviews| 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 07003e6f692c1d570149b7ef2dbfe3bdfec4820a..e45fb80a03f3b6416752ae2c60bd40dfc585fe19 100644 |
| --- a/chrome/browser/extensions/api/messaging/message_service.cc |
| +++ b/chrome/browser/extensions/api/messaging/message_service.cc |
| @@ -162,9 +162,7 @@ void MessageService::OpenChannelToExtension( |
| std::string tab_json = "null"; |
| if (source_contents) { |
| scoped_ptr<DictionaryValue> tab_value(ExtensionTabUtil::CreateTabValue( |
| - source_contents, |
| - profile->GetExtensionService()->extensions()->GetByID( |
| - source_extension_id))); |
| + source_contents, ExtensionTabUtil::INCLUDE_PRIVACY_SENSITIVE_FIELDS)); |
|
not at google - send to devlin
2012/09/17 01:46:53
so I guess this is safe because by this point the
Aaron Boodman
2012/09/17 03:22:17
Yep.
|
| base::JSONWriter::Write(tab_value.get(), &tab_json); |
| } |
| @@ -196,7 +194,6 @@ void MessageService::OpenChannelToNativeApp( |
| content::RenderProcessHost::FromID(source_process_id); |
| if (!source) |
| return; |
| - Profile* profile = Profile::FromBrowserContext(source->GetBrowserContext()); |
| WebContents* source_contents = tab_util::GetWebContentsByID( |
| source_process_id, source_routing_id); |
| @@ -205,9 +202,7 @@ void MessageService::OpenChannelToNativeApp( |
| std::string tab_json = "null"; |
| if (source_contents) { |
| scoped_ptr<DictionaryValue> tab_value(ExtensionTabUtil::CreateTabValue( |
| - source_contents, |
| - profile->GetExtensionService()->extensions()->GetByID( |
| - source_extension_id))); |
| + source_contents, ExtensionTabUtil::INCLUDE_PRIVACY_SENSITIVE_FIELDS)); |
| base::JSONWriter::Write(tab_value.get(), &tab_json); |
| } |
| @@ -292,9 +287,7 @@ void MessageService::OpenChannelToTab( |
| std::string tab_json = "null"; |
| if (source_contents) { |
| scoped_ptr<DictionaryValue> tab_value(ExtensionTabUtil::CreateTabValue( |
| - source_contents, |
| - profile->GetExtensionService()->extensions()->GetByID( |
| - extension_id))); |
| + source_contents, ExtensionTabUtil::INCLUDE_PRIVACY_SENSITIVE_FIELDS)); |
| base::JSONWriter::Write(tab_value.get(), &tab_json); |
| } |