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

Side by Side Diff: ui/base/dragdrop/os_exchange_data_provider_aurax11.h

Issue 207013003: Mark drags starting in web content as tainted to avoid file path forgery (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More fixes and comment 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_BASE_DRAGDROP_OS_EXCHANGE_DATA_PROVIDER_AURAX11_H_ 5 #ifndef UI_BASE_DRAGDROP_OS_EXCHANGE_DATA_PROVIDER_AURAX11_H_
6 #define UI_BASE_DRAGDROP_OS_EXCHANGE_DATA_PROVIDER_AURAX11_H_ 6 #define UI_BASE_DRAGDROP_OS_EXCHANGE_DATA_PROVIDER_AURAX11_H_
7 7
8 #include <X11/Xlib.h> 8 #include <X11/Xlib.h>
9 9
10 // Get rid of a macro from Xlib.h that conflicts with Aura's RootWindow class. 10 // Get rid of a macro from Xlib.h that conflicts with Aura's RootWindow class.
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 51
52 // Retrieves a list of types we're offering. Noop if we haven't taken the 52 // Retrieves a list of types we're offering. Noop if we haven't taken the
53 // selection. 53 // selection.
54 void RetrieveTargets(std::vector<Atom>* targets) const; 54 void RetrieveTargets(std::vector<Atom>* targets) const;
55 55
56 // Makes a copy of the format map currently being offered. 56 // Makes a copy of the format map currently being offered.
57 SelectionFormatMap GetFormatMap() const; 57 SelectionFormatMap GetFormatMap() const;
58 58
59 // Overridden from OSExchangeData::Provider: 59 // Overridden from OSExchangeData::Provider:
60 virtual Provider* Clone() const OVERRIDE; 60 virtual Provider* Clone() const OVERRIDE;
61 virtual void MarkRendererTainted() OVERRIDE;
62 virtual bool IsRendererTainted() const OVERRIDE;
61 virtual void SetString(const base::string16& data) OVERRIDE; 63 virtual void SetString(const base::string16& data) OVERRIDE;
62 virtual void SetURL(const GURL& url, const base::string16& title) OVERRIDE; 64 virtual void SetURL(const GURL& url, const base::string16& title) OVERRIDE;
63 virtual void SetFilename(const base::FilePath& path) OVERRIDE; 65 virtual void SetFilename(const base::FilePath& path) OVERRIDE;
64 virtual void SetFilenames( 66 virtual void SetFilenames(
65 const std::vector<OSExchangeData::FileInfo>& filenames) OVERRIDE; 67 const std::vector<OSExchangeData::FileInfo>& filenames) OVERRIDE;
66 virtual void SetPickledData(const OSExchangeData::CustomFormat& format, 68 virtual void SetPickledData(const OSExchangeData::CustomFormat& format,
67 const Pickle& pickle) OVERRIDE; 69 const Pickle& pickle) OVERRIDE;
68 virtual bool GetString(base::string16* data) const OVERRIDE; 70 virtual bool GetString(base::string16* data) const OVERRIDE;
69 virtual bool GetURLAndTitle(OSExchangeData::FilenameToURLPolicy policy, 71 virtual bool GetURLAndTitle(OSExchangeData::FilenameToURLPolicy policy,
70 GURL* url, 72 GURL* url,
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 133
132 // Takes a snapshot of |format_map_| and offers it to other windows. 134 // Takes a snapshot of |format_map_| and offers it to other windows.
133 mutable SelectionOwner selection_owner_; 135 mutable SelectionOwner selection_owner_;
134 136
135 DISALLOW_COPY_AND_ASSIGN(OSExchangeDataProviderAuraX11); 137 DISALLOW_COPY_AND_ASSIGN(OSExchangeDataProviderAuraX11);
136 }; 138 };
137 139
138 } // namespace ui 140 } // namespace ui
139 141
140 #endif // UI_BASE_DRAGDROP_OS_EXCHANGE_DATA_PROVIDER_AURAX11_H_ 142 #endif // UI_BASE_DRAGDROP_OS_EXCHANGE_DATA_PROVIDER_AURAX11_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698