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

Unified Diff: ui/base/dragdrop/os_exchange_data_provider_aurax11.cc

Issue 133053003: linux_aura: Fix dragging files into Dropbox. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Simplify Created 6 years, 11 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 | « no previous file | ui/base/dragdrop/os_exchange_data_provider_aurax11_unittest.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_provider_aurax11.cc
diff --git a/ui/base/dragdrop/os_exchange_data_provider_aurax11.cc b/ui/base/dragdrop/os_exchange_data_provider_aurax11.cc
index 20a684240e5a7ef74f07ba62d112b63aa6014b63..ebea65959db6c3afc8e2ceacf23159ae7b2fe92c 100644
--- a/ui/base/dragdrop/os_exchange_data_provider_aurax11.cc
+++ b/ui/base/dragdrop/os_exchange_data_provider_aurax11.cc
@@ -175,6 +175,13 @@ void OSExchangeDataProviderAuraX11::SetPickledData(
}
bool OSExchangeDataProviderAuraX11::GetString(base::string16* result) const {
+ if (HasFile()) {
+ // Various Linux file managers both pass a list of file:// URIs and set the
+ // string representation to the URI. We explicitly don't want to return use
+ // this representation.
+ return false;
+ }
+
std::vector< ::Atom> text_atoms = ui::GetTextAtomsFrom(&atom_cache_);
std::vector< ::Atom> requested_types;
ui::GetAtomIntersection(text_atoms, GetTargets(), &requested_types);
@@ -292,7 +299,7 @@ bool OSExchangeDataProviderAuraX11::HasString() const {
std::vector< ::Atom> text_atoms = ui::GetTextAtomsFrom(&atom_cache_);
std::vector< ::Atom> requested_types;
ui::GetAtomIntersection(text_atoms, GetTargets(), &requested_types);
- return !requested_types.empty();
+ return !requested_types.empty() && !HasFile();
}
bool OSExchangeDataProviderAuraX11::HasURL() const {
« no previous file with comments | « no previous file | ui/base/dragdrop/os_exchange_data_provider_aurax11_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698