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

Side by Side Diff: chrome/browser/download/download_target_determiner.cc

Issue 1410333006: Enough hacks to make wstring printfs unneeded (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/download_target_determiner.h" 5 #include "chrome/browser/download/download_target_determiner.h"
6 6
7 #include "base/location.h" 7 #include "base/location.h"
8 #include "base/prefs/pref_service.h" 8 #include "base/prefs/pref_service.h"
9 #include "base/rand_util.h" 9 #include "base/rand_util.h"
10 #include "base/single_thread_task_runner.h" 10 #include "base/single_thread_task_runner.h"
(...skipping 690 matching lines...) Expand 10 before | Expand all | Expand 10 after
701 const int kUnconfirmedUniquifierRange = 1000000; 701 const int kUnconfirmedUniquifierRange = 1000000;
702 #if defined(OS_WIN) 702 #if defined(OS_WIN)
703 base::string16 unconfirmed_format = 703 base::string16 unconfirmed_format =
704 l10n_util::GetStringUTF16(IDS_DOWNLOAD_UNCONFIRMED_PREFIX); 704 l10n_util::GetStringUTF16(IDS_DOWNLOAD_UNCONFIRMED_PREFIX);
705 #else 705 #else
706 std::string unconfirmed_format = 706 std::string unconfirmed_format =
707 l10n_util::GetStringUTF8(IDS_DOWNLOAD_UNCONFIRMED_PREFIX); 707 l10n_util::GetStringUTF8(IDS_DOWNLOAD_UNCONFIRMED_PREFIX);
708 #endif 708 #endif
709 unconfirmed_format.append(kUnconfirmedFormatSuffix); 709 unconfirmed_format.append(kUnconfirmedFormatSuffix);
710 710
711 base::FilePath::StringType file_name = base::StringPrintf( 711 base::FilePath::StringType file_name = L"";/* base::StringPrintf(
712 unconfirmed_format.c_str(), 712 unconfirmed_format.c_str(),
713 base::RandInt(0, kUnconfirmedUniquifierRange)); 713 base::RandInt(0, kUnconfirmedUniquifierRange));*/
714 intermediate_path_ = local_path_.DirName().Append(file_name); 714 intermediate_path_ = local_path_.DirName().Append(file_name);
715 return COMPLETE; 715 return COMPLETE;
716 } 716 }
717 717
718 void DownloadTargetDeterminer::ScheduleCallbackAndDeleteSelf() { 718 void DownloadTargetDeterminer::ScheduleCallbackAndDeleteSelf() {
719 DCHECK(download_); 719 DCHECK(download_);
720 DVLOG(20) << "Scheduling callback. Virtual:" << virtual_path_.AsUTF8Unsafe() 720 DVLOG(20) << "Scheduling callback. Virtual:" << virtual_path_.AsUTF8Unsafe()
721 << " Local:" << local_path_.AsUTF8Unsafe() 721 << " Local:" << local_path_.AsUTF8Unsafe()
722 << " Intermediate:" << intermediate_path_.AsUTF8Unsafe() 722 << " Intermediate:" << intermediate_path_.AsUTF8Unsafe()
723 << " Should prompt:" << should_prompt_ 723 << " Should prompt:" << should_prompt_
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
895 const base::FilePath& suggested_path) { 895 const base::FilePath& suggested_path) {
896 return base::FilePath(suggested_path.value() + kCrdownloadSuffix); 896 return base::FilePath(suggested_path.value() + kCrdownloadSuffix);
897 } 897 }
898 898
899 #if defined(OS_WIN) 899 #if defined(OS_WIN)
900 // static 900 // static
901 bool DownloadTargetDeterminer::IsAdobeReaderUpToDate() { 901 bool DownloadTargetDeterminer::IsAdobeReaderUpToDate() {
902 return g_is_adobe_reader_up_to_date_; 902 return g_is_adobe_reader_up_to_date_;
903 } 903 }
904 #endif 904 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698