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

Unified Diff: ui/base/dragdrop/os_exchange_data.h

Issue 212693004: Merge 259353 "Mark drags starting in web content as tainted to a..." (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1847/src/
Patch Set: Created 6 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
« no previous file with comments | « ui/base/dragdrop/gtk_dnd_util.cc ('k') | ui/base/dragdrop/os_exchange_data.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/dragdrop/os_exchange_data.h
===================================================================
--- ui/base/dragdrop/os_exchange_data.h (revision 259999)
+++ ui/base/dragdrop/os_exchange_data.h (working copy)
@@ -102,6 +102,9 @@
virtual Provider* Clone() const = 0;
+ virtual void MarkOriginatedFromRenderer() = 0;
+ virtual bool DidOriginateFromRenderer() const = 0;
+
virtual void SetString(const base::string16& data) = 0;
virtual void SetURL(const GURL& url, const base::string16& title) = 0;
virtual void SetFilename(const base::FilePath& path) = 0;
@@ -163,6 +166,12 @@
const Provider& provider() const { return *provider_; }
Provider& provider() { return *provider_; }
+ // Marks drag data as tainted if it originates from the renderer. This is used
+ // to avoid granting privileges to a renderer when dragging in tainted data,
+ // since it could allow potential escalation of privileges.
+ void MarkOriginatedFromRenderer();
+ bool DidOriginateFromRenderer() const;
+
// These functions add data to the OSExchangeData object of various Chrome
// types. The OSExchangeData object takes care of translating the data into
// a format suitable for exchange with the OS.
« no previous file with comments | « ui/base/dragdrop/gtk_dnd_util.cc ('k') | ui/base/dragdrop/os_exchange_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698