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

Side by Side Diff: ui/base/dragdrop/os_exchange_data_provider_win.cc

Issue 447403002: Move file_util_icu to base::i18n namespace (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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 | « printing/printed_document.cc ('k') | ui/base/l10n/l10n_util.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/dragdrop/os_exchange_data_provider_win.h" 5 #include "ui/base/dragdrop/os_exchange_data_provider_win.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 899 matching lines...) Expand 10 before | Expand all | Expand 10 after
910 if (url.is_valid()) { 910 if (url.is_valid()) {
911 *validated = net::GetSuggestedFilename(url, "", "", "", "", 911 *validated = net::GetSuggestedFilename(url, "", "", "", "",
912 std::string()); 912 std::string());
913 } else { 913 } else {
914 // Nothing else can be done, just use a default. 914 // Nothing else can be done, just use a default.
915 *validated = 915 *validated =
916 l10n_util::GetStringUTF16(IDS_APP_UNTITLED_SHORTCUT_FILE_NAME); 916 l10n_util::GetStringUTF16(IDS_APP_UNTITLED_SHORTCUT_FILE_NAME);
917 } 917 }
918 } else { 918 } else {
919 *validated = title; 919 *validated = title;
920 file_util::ReplaceIllegalCharactersInPath(validated, '-'); 920 base::i18n::ReplaceIllegalCharactersInPath(validated, '-');
921 } 921 }
922 static const wchar_t extension[] = L".url"; 922 static const wchar_t extension[] = L".url";
923 static const size_t max_length = MAX_PATH - arraysize(extension); 923 static const size_t max_length = MAX_PATH - arraysize(extension);
924 if (validated->size() > max_length) 924 if (validated->size() > max_length)
925 validated->erase(max_length); 925 validated->erase(max_length);
926 *validated += extension; 926 *validated += extension;
927 } 927 }
928 928
929 static STGMEDIUM* GetStorageForFileName(const base::FilePath& path) { 929 static STGMEDIUM* GetStorageForFileName(const base::FilePath& path) {
930 const size_t kDropSize = sizeof(DROPFILES); 930 const size_t kDropSize = sizeof(DROPFILES);
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
1048 1048
1049 /////////////////////////////////////////////////////////////////////////////// 1049 ///////////////////////////////////////////////////////////////////////////////
1050 // OSExchangeData, public: 1050 // OSExchangeData, public:
1051 1051
1052 // static 1052 // static
1053 OSExchangeData::Provider* OSExchangeData::CreateProvider() { 1053 OSExchangeData::Provider* OSExchangeData::CreateProvider() {
1054 return new OSExchangeDataProviderWin(); 1054 return new OSExchangeDataProviderWin();
1055 } 1055 }
1056 1056
1057 } // namespace ui 1057 } // namespace ui
OLDNEW
« no previous file with comments | « printing/printed_document.cc ('k') | ui/base/l10n/l10n_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698