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

Side by Side Diff: chrome/browser/download/save_package_file_picker.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
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 "chrome/browser/download/save_package_file_picker.h" 5 #include "chrome/browser/download/save_package_file_picker.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/i18n/file_util_icu.h" 9 #include "base/i18n/file_util_icu.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 248
249 UMA_HISTOGRAM_ENUMERATION("Download.SavePageType", 249 UMA_HISTOGRAM_ENUMERATION("Download.SavePageType",
250 save_type, 250 save_type,
251 content::SAVE_PAGE_TYPE_MAX); 251 content::SAVE_PAGE_TYPE_MAX);
252 } else { 252 } else {
253 // Use "HTML Only" type as a dummy. 253 // Use "HTML Only" type as a dummy.
254 save_type = content::SAVE_PAGE_TYPE_AS_ONLY_HTML; 254 save_type = content::SAVE_PAGE_TYPE_AS_ONLY_HTML;
255 } 255 }
256 256
257 base::FilePath path_copy(path); 257 base::FilePath path_copy(path);
258 file_util::NormalizeFileNameEncoding(&path_copy); 258 base::i18n::NormalizeFileNameEncoding(&path_copy);
259 259
260 download_prefs_->SetSaveFilePath(path_copy.DirName()); 260 download_prefs_->SetSaveFilePath(path_copy.DirName());
261 261
262 #if defined(OS_CHROMEOS) 262 #if defined(OS_CHROMEOS)
263 if (drive::util::IsUnderDriveMountPoint(path_copy)) { 263 if (drive::util::IsUnderDriveMountPoint(path_copy)) {
264 // Here's a map to the callback chain: 264 // Here's a map to the callback chain:
265 // SubstituteDriveDownloadPath -> 265 // SubstituteDriveDownloadPath ->
266 // ContinueSettingUpDriveDownload -> 266 // ContinueSettingUpDriveDownload ->
267 // callback_ = SavePackage::OnPathPicked -> 267 // callback_ = SavePackage::OnPathPicked ->
268 // download_created_callback = OnSavePackageDownloadCreatedChromeOS 268 // download_created_callback = OnSavePackageDownloadCreatedChromeOS
(...skipping 11 matching lines...) Expand all
280 } 280 }
281 #endif 281 #endif
282 282
283 callback_.Run(path_copy, save_type, 283 callback_.Run(path_copy, save_type,
284 base::Bind(&OnSavePackageDownloadCreated)); 284 base::Bind(&OnSavePackageDownloadCreated));
285 } 285 }
286 286
287 void SavePackageFilePicker::FileSelectionCanceled(void* unused_params) { 287 void SavePackageFilePicker::FileSelectionCanceled(void* unused_params) {
288 delete this; 288 delete this;
289 } 289 }
OLDNEW
« no previous file with comments | « base/i18n/file_util_icu_unittest.cc ('k') | chrome/browser/extensions/api/bookmarks/bookmarks_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698