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

Unified Diff: content/browser/intents/intent_injector.cc

Issue 9651020: Pass content-type resources to web intents. Goes through download, then invokes the p… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove includes Created 8 years, 9 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
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..1430a62197201fad6cf8cb1cb1d0e54d6088df47 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,13 @@ 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.
+ int child_id = render_view_host->GetProcess()->GetID();
+ ChildProcessSecurityPolicyImpl::GetInstance()->GrantReadFile(
+ child_id, source_intent_->blob_file);
+ }
+
render_view_host->Send(new IntentsMsg_SetWebIntentData(
render_view_host->GetRoutingID(), *(source_intent_.get())));
}
« no previous file with comments | « chrome/browser/download/chrome_download_manager_delegate.cc ('k') | content/browser/intents/web_intents_dispatcher_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698