summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-28 22:33:11 +0000
committertfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-28 22:33:11 +0000
commit865b86212bc86749f81137e3753af4b1b1d87fd2 (patch)
tree7ad503a8833cbb5ae6f3bebed35195ed82670730
parentf98c6a196e9e6b5be349ad3db40081213fcc4c88 (diff)
downloadchromium_src-865b86212bc86749f81137e3753af4b1b1d87fd2.zip
chromium_src-865b86212bc86749f81137e3753af4b1b1d87fd2.tar.gz
chromium_src-865b86212bc86749f81137e3753af4b1b1d87fd2.tar.bz2
Use FilePath::Extension instead of the deprecated file_util::GetFileExtensionFromPath. Part 2.
Use it in one place in shell_dialogs_win.cc BUG=24672 TEST=trybots Review URL: http://codereview.chromium.org/6269023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@73031 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/ui/views/shell_dialogs_win.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/chrome/browser/ui/views/shell_dialogs_win.cc b/chrome/browser/ui/views/shell_dialogs_win.cc
index 2b1a48f..b643c34 100644
--- a/chrome/browser/ui/views/shell_dialogs_win.cc
+++ b/chrome/browser/ui/views/shell_dialogs_win.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -11,6 +11,7 @@
#include <algorithm>
#include <set>
+#include "base/file_path.h"
#include "base/file_util.h"
#include "base/message_loop.h"
#include "base/scoped_comptr_win.h"
@@ -348,12 +349,11 @@ bool SaveFileAsWithFilter(HWND owner,
bool SaveFileAs(HWND owner,
const std::wstring& suggested_name,
std::wstring* final_name) {
- std::wstring file_ext = file_util::GetFileExtensionFromPath(suggested_name);
- file_ext.insert(0, L"*.");
+ std::wstring file_ext = FilePath(suggested_name).Extension().insert(0, L"*");
std::wstring filter = FormatFilterForExtensions(
- std::vector<std::wstring>(1, file_ext),
- std::vector<std::wstring>(),
- true);
+ std::vector<std::wstring>(1, file_ext),
+ std::vector<std::wstring>(),
+ true);
unsigned index = 1;
return SaveFileAsWithFilter(owner,
suggested_name,