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

Unified Diff: chrome/browser/ui/webui/extensions/install_extension_handler.cc

Issue 211383007: Use FilePaths in content::DropData to avoid redundant conversions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: clang-format 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
Index: chrome/browser/ui/webui/extensions/install_extension_handler.cc
diff --git a/chrome/browser/ui/webui/extensions/install_extension_handler.cc b/chrome/browser/ui/webui/extensions/install_extension_handler.cc
index 3463c09f36d85e1104936030d374e22dea29b79f..a87d439a88af556db8af2c8555685dd82431e2cb 100644
--- a/chrome/browser/ui/webui/extensions/install_extension_handler.cc
+++ b/chrome/browser/ui/webui/extensions/install_extension_handler.cc
@@ -74,13 +74,15 @@ void InstallExtensionHandler::HandleStartDragMessage(
return;
}
- const content::DropData::FileInfo& file_info = drop_data->filenames.front();
+ const ui::FileInfo& file_info = drop_data->filenames.front();
- file_to_install_ = base::FilePath::FromUTF16Unsafe(file_info.path);
+ file_to_install_ = file_info.path;
// Use the display name if provided, for checking file names
// (.path is likely a random hash value in that case).
- file_display_name_ =
- file_info.display_name.empty() ? file_info.path : file_info.display_name;
+ // TODO(dcheng): It would be nice to make this a FilePath too.
+ file_display_name_ = file_info.display_name.empty()
+ ? file_info.path.AsUTF16Unsafe()
+ : file_info.display_name.AsUTF16Unsafe();
}
void InstallExtensionHandler::HandleStopDragMessage(

Powered by Google App Engine
This is Rietveld 408576698