Chromium Code Reviews| Index: content/browser/intents/intent_injector.cc |
| diff --git a/content/browser/intents/intent_injector.cc b/content/browser/intents/intent_injector.cc |
| index 03198892525e1254a190c4e3ea44abd07b2d826e..0e1f96fd1773bb0a1b56cc71dc13816a6e767bc2 100644 |
| --- a/content/browser/intents/intent_injector.cc |
| +++ b/content/browser/intents/intent_injector.cc |
| @@ -6,8 +6,10 @@ |
| #include "base/bind.h" |
| #include "base/command_line.h" |
| +#include "base/file_path.h" |
| #include "base/logging.h" |
| #include "base/string16.h" |
| +#include "content/browser/child_process_security_policy_impl.h" |
| #include "content/browser/renderer_host/render_view_host_impl.h" |
| #include "content/browser/tab_contents/tab_contents.h" |
| #include "content/common/intents_messages.h" |
| @@ -63,6 +65,15 @@ void IntentInjector::RenderViewCreated(RenderViewHost* render_view_host) { |
| return; |
| } |
| + if (source_intent_->data_type == webkit_glue::WebIntentData::BLOB) { |
| + // Grant read permission on the blob file to the delivered context. |
| + ChildProcessSecurityPolicyImpl* policy = |
| + ChildProcessSecurityPolicyImpl::GetInstance(); |
| + int child_id = render_view_host->GetProcess()->GetID(); |
| + policy->GrantReadFile(child_id, |
|
michaeln
2012/03/29 20:51:57
are read rights ever revoked, should they be at so
Greg Billock
2012/03/29 21:04:45
I should do that when the injector is destroyed? I
|
| + FilePath::FromUTF8Unsafe(source_intent_->blob_file)); |
| + } |
| + |
| render_view_host->Send(new IntentsMsg_SetWebIntentData( |
| render_view_host->GetRoutingID(), *(source_intent_.get()))); |
| } |