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

Side by Side Diff: ui/base/dragdrop/os_exchange_data_provider_aura.cc

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: Cleanup 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 #include "ui/base/dragdrop/os_exchange_data_provider_aura.h" 5 #include "ui/base/dragdrop/os_exchange_data_provider_aura.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "net/base/net_util.h" 9 #include "net/base/net_util.h"
10 #include "ui/base/clipboard/clipboard.h" 10 #include "ui/base/clipboard/clipboard.h"
(...skipping 15 matching lines...) Expand all
26 ret->title_ = title_; 26 ret->title_ = title_;
27 ret->filenames_ = filenames_; 27 ret->filenames_ = filenames_;
28 ret->pickle_data_ = pickle_data_; 28 ret->pickle_data_ = pickle_data_;
29 // We skip copying the drag images. 29 // We skip copying the drag images.
30 ret->html_ = html_; 30 ret->html_ = html_;
31 ret->base_url_ = base_url_; 31 ret->base_url_ = base_url_;
32 32
33 return ret; 33 return ret;
34 } 34 }
35 35
36 void OSExchangeDataProviderAura::MarkOriginatedFromRenderer() {
37 // TODO(dcheng): Currently unneeded because ChromeOS Aura correctly separates
38 // URL and filename metadata, and does not implement the DownloadURL protocol.
39 }
40
41 bool OSExchangeDataProviderAura::DidOriginateFromRenderer() const {
42 return false;
43 }
44
36 void OSExchangeDataProviderAura::SetString(const base::string16& data) { 45 void OSExchangeDataProviderAura::SetString(const base::string16& data) {
37 string_ = data; 46 string_ = data;
38 formats_ |= OSExchangeData::STRING; 47 formats_ |= OSExchangeData::STRING;
39 } 48 }
40 49
41 void OSExchangeDataProviderAura::SetURL(const GURL& url, 50 void OSExchangeDataProviderAura::SetURL(const GURL& url,
42 const base::string16& title) { 51 const base::string16& title) {
43 url_ = url; 52 url_ = url;
44 title_ = title; 53 title_ = title;
45 formats_ |= OSExchangeData::URL; 54 formats_ |= OSExchangeData::URL;
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 201
193 /////////////////////////////////////////////////////////////////////////////// 202 ///////////////////////////////////////////////////////////////////////////////
194 // OSExchangeData, public: 203 // OSExchangeData, public:
195 204
196 // static 205 // static
197 OSExchangeData::Provider* OSExchangeData::CreateProvider() { 206 OSExchangeData::Provider* OSExchangeData::CreateProvider() {
198 return new OSExchangeDataProviderAura(); 207 return new OSExchangeDataProviderAura();
199 } 208 }
200 209
201 } // namespace ui 210 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698