From 393c02e5a411707d7a5e15432ce7328386292f5a Mon Sep 17 00:00:00 2001 From: "finnur@google.com" Date: Mon, 22 Sep 2008 22:12:28 +0000 Subject: Fix for issue 2617: After using Ctrl+O to open a local file the directory is locked. Review URL: http://codereview.chromium.org/3194 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2457 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/views/shell_dialogs.cc | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'chrome') diff --git a/chrome/browser/views/shell_dialogs.cc b/chrome/browser/views/shell_dialogs.cc index 7e41937..b2dbf1c 100644 --- a/chrome/browser/views/shell_dialogs.cc +++ b/chrome/browser/views/shell_dialogs.cc @@ -38,7 +38,7 @@ class ShellDialogThread : public base::Thread { } private: - DISALLOW_EVIL_CONSTRUCTORS(ShellDialogThread); + DISALLOW_COPY_AND_ASSIGN(ShellDialogThread); }; /////////////////////////////////////////////////////////////////////////////// @@ -115,7 +115,7 @@ class BaseShellDialogImpl { static Owners owners_; static int instance_count_; - DISALLOW_EVIL_CONSTRUCTORS(BaseShellDialogImpl); + DISALLOW_COPY_AND_ASSIGN(BaseShellDialogImpl); }; // static @@ -231,7 +231,7 @@ class SelectFileDialogImpl : public SelectFileDialog, // The listener to be notified of selection completion. Listener* listener_; - DISALLOW_EVIL_CONSTRUCTORS(SelectFileDialogImpl); + DISALLOW_COPY_AND_ASSIGN(SelectFileDialogImpl); }; SelectFileDialogImpl::SelectFileDialogImpl(Listener* listener) @@ -346,7 +346,9 @@ bool SelectFileDialogImpl::RunOpenFileDialog(const std::wstring& title, ofn.lpstrFile = filename; ofn.nMaxFile = MAX_PATH; - ofn.Flags = OFN_FILEMUSTEXIST; + // We use OFN_NOCHANGEDIR so that the user can rename or delete the directory + // without having to close Chrome first. + ofn.Flags = OFN_FILEMUSTEXIST | OFN_NOCHANGEDIR; // TODO(beng): (http://b/issue?id=1126563) edit the filter options in the // dropdown list. @@ -403,7 +405,7 @@ class SelectFontDialogImpl : public SelectFontDialog, // The listener to be notified of selection completion. Listener* listener_; - DISALLOW_EVIL_CONSTRUCTORS(SelectFontDialogImpl); + DISALLOW_COPY_AND_ASSIGN(SelectFontDialogImpl); }; SelectFontDialogImpl::SelectFontDialogImpl(Listener* listener) -- cgit v1.1