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

Side by Side Diff: ui/base/dialogs/select_file_dialog_win.cc

Issue 11878022: ui: Convert scoped_arrays to the new scoped_ptr style. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/base/clipboard/clipboard_gtk.cc ('k') | ui/base/dragdrop/gtk_dnd_util_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/dialogs/select_file_dialog_win.h" 5 #include "ui/base/dialogs/select_file_dialog_win.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 #include <commdlg.h> 8 #include <commdlg.h>
9 #include <shlobj.h> 9 #include <shlobj.h>
10 10
(...skipping 750 matching lines...) Expand 10 before | Expand all | Expand 10 after
761 const std::wstring& filter, 761 const std::wstring& filter,
762 HWND owner, 762 HWND owner,
763 std::vector<FilePath>* paths) { 763 std::vector<FilePath>* paths) {
764 OPENFILENAME ofn; 764 OPENFILENAME ofn;
765 // We must do this otherwise the ofn's FlagsEx may be initialized to random 765 // We must do this otherwise the ofn's FlagsEx may be initialized to random
766 // junk in release builds which can cause the Places Bar not to show up! 766 // junk in release builds which can cause the Places Bar not to show up!
767 ZeroMemory(&ofn, sizeof(ofn)); 767 ZeroMemory(&ofn, sizeof(ofn));
768 ofn.lStructSize = sizeof(ofn); 768 ofn.lStructSize = sizeof(ofn);
769 ofn.hwndOwner = owner; 769 ofn.hwndOwner = owner;
770 770
771 scoped_array<wchar_t> filename(new wchar_t[UNICODE_STRING_MAX_CHARS]); 771 scoped_ptr<wchar_t[]> filename(new wchar_t[UNICODE_STRING_MAX_CHARS]);
772 filename[0] = 0; 772 filename[0] = 0;
773 773
774 ofn.lpstrFile = filename.get(); 774 ofn.lpstrFile = filename.get();
775 ofn.nMaxFile = UNICODE_STRING_MAX_CHARS; 775 ofn.nMaxFile = UNICODE_STRING_MAX_CHARS;
776 // We use OFN_NOCHANGEDIR so that the user can rename or delete the directory 776 // We use OFN_NOCHANGEDIR so that the user can rename or delete the directory
777 // without having to close Chrome first. 777 // without having to close Chrome first.
778 ofn.Flags = OFN_PATHMUSTEXIST | OFN_FILEMUSTEXIST | OFN_EXPLORER 778 ofn.Flags = OFN_PATHMUSTEXIST | OFN_FILEMUSTEXIST | OFN_EXPLORER
779 | OFN_HIDEREADONLY | OFN_ALLOWMULTISELECT; 779 | OFN_HIDEREADONLY | OFN_ALLOWMULTISELECT;
780 780
781 if (!filter.empty()) { 781 if (!filter.empty()) {
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
855 return return_value; 855 return return_value;
856 } 856 }
857 857
858 SelectFileDialog* CreateWinSelectFileDialog( 858 SelectFileDialog* CreateWinSelectFileDialog(
859 SelectFileDialog::Listener* listener, 859 SelectFileDialog::Listener* listener,
860 SelectFilePolicy* policy) { 860 SelectFilePolicy* policy) {
861 return new SelectFileDialogImpl(listener, policy); 861 return new SelectFileDialogImpl(listener, policy);
862 } 862 }
863 863
864 } // namespace ui 864 } // namespace ui
OLDNEW
« no previous file with comments | « ui/base/clipboard/clipboard_gtk.cc ('k') | ui/base/dragdrop/gtk_dnd_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698