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

Side by Side Diff: ui/base/dragdrop/os_exchange_data.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: 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 #include "ui/base/dragdrop/os_exchange_data.h" 5 #include "ui/base/dragdrop/os_exchange_data.h"
6 6
7 #include "base/pickle.h" 7 #include "base/pickle.h"
8 #include "url/gurl.h" 8 #include "url/gurl.h"
9 9
10 namespace ui { 10 namespace ui {
(...skipping 18 matching lines...) Expand all
29 29
30 OSExchangeData::OSExchangeData() : provider_(CreateProvider()) { 30 OSExchangeData::OSExchangeData() : provider_(CreateProvider()) {
31 } 31 }
32 32
33 OSExchangeData::OSExchangeData(Provider* provider) : provider_(provider) { 33 OSExchangeData::OSExchangeData(Provider* provider) : provider_(provider) {
34 } 34 }
35 35
36 OSExchangeData::~OSExchangeData() { 36 OSExchangeData::~OSExchangeData() {
37 } 37 }
38 38
39 void OSExchangeData::MarkRendererTainted() {
40 provider_->MarkRendererTainted();
41 }
42
43 bool OSExchangeData::IsRendererTainted() const {
44 return provider_->IsRendererTainted();
45 }
46
39 void OSExchangeData::SetString(const base::string16& data) { 47 void OSExchangeData::SetString(const base::string16& data) {
40 provider_->SetString(data); 48 provider_->SetString(data);
41 } 49 }
42 50
43 void OSExchangeData::SetURL(const GURL& url, const base::string16& title) { 51 void OSExchangeData::SetURL(const GURL& url, const base::string16& title) {
44 provider_->SetURL(url, title); 52 provider_->SetURL(url, title);
45 } 53 }
46 54
47 void OSExchangeData::SetFilename(const base::FilePath& path) { 55 void OSExchangeData::SetFilename(const base::FilePath& path) {
48 provider_->SetFilename(path); 56 provider_->SetFilename(path);
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 void OSExchangeData::SetHtml(const base::string16& html, const GURL& base_url) { 155 void OSExchangeData::SetHtml(const base::string16& html, const GURL& base_url) {
148 provider_->SetHtml(html, base_url); 156 provider_->SetHtml(html, base_url);
149 } 157 }
150 158
151 bool OSExchangeData::GetHtml(base::string16* html, GURL* base_url) const { 159 bool OSExchangeData::GetHtml(base::string16* html, GURL* base_url) const {
152 return provider_->GetHtml(html, base_url); 160 return provider_->GetHtml(html, base_url);
153 } 161 }
154 #endif 162 #endif
155 163
156 } // namespace ui 164 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698