summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorsky@google.com <sky@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-18 21:37:45 +0000
committersky@google.com <sky@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-18 21:37:45 +0000
commitcda62c6de3826cd012fb9b5c44c9e1c80544b436 (patch)
tree0bb9110838b3accc06f4e156555d626d4b2fa1e0 /chrome
parent351057cfd10365381a085d70f55d0565222141c0 (diff)
downloadchromium_src-cda62c6de3826cd012fb9b5c44c9e1c80544b436.zip
chromium_src-cda62c6de3826cd012fb9b5c44c9e1c80544b436.tar.gz
chromium_src-cda62c6de3826cd012fb9b5c44c9e1c80544b436.tar.bz2
Fixes drag of images from new tab page. We need to pass in the mime
type, otherwise webkit isn't able to get the mime type and we try and drag an image with a bogus name. BUG=none TEST=drag a thumbnail from the new tab to explorer. You should end up with a file named foo.png. Review URL: http://codereview.chromium.org/21435 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9967 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/dom_ui/dom_ui_contents.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/chrome/browser/dom_ui/dom_ui_contents.h b/chrome/browser/dom_ui/dom_ui_contents.h
index 58daf01..6f8bcb3 100644
--- a/chrome/browser/dom_ui/dom_ui_contents.h
+++ b/chrome/browser/dom_ui/dom_ui_contents.h
@@ -25,8 +25,9 @@ class FavIconSource : public ChromeURLDataManager::DataSource {
virtual void StartDataRequest(const std::string& path, int request_id);
virtual std::string GetMimeType(const std::string&) const {
- // Rely on image decoder inferring the correct type.
- return std::string();
+ // We need to explicitly return a mime type, otherwise if the user tries to
+ // drag the image they get no extension.
+ return "image/png";
}
// Called when favicon data is available from the history backend.
@@ -59,8 +60,9 @@ class ThumbnailSource : public ChromeURLDataManager::DataSource {
virtual void StartDataRequest(const std::string& path, int request_id);
virtual std::string GetMimeType(const std::string&) const {
- // Rely on image decoder inferring the correct type.
- return std::string();
+ // We need to explicitly return a mime type, otherwise if the user tries to
+ // drag the image they get no extension.
+ return "image/png";
}
// Called when thumbnail data is available from the history backend.