OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 // Download utility implementation | 5 // Download utility implementation |
6 | 6 |
7 #include "chrome/browser/download/download_util.h" | 7 #include "chrome/browser/download/download_util.h" |
8 | 8 |
9 #if defined(OS_WIN) | 9 #if defined(OS_WIN) |
10 #include <shobjidl.h> | 10 #include <shobjidl.h> |
(...skipping 499 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
510 IDS_DOWNLOAD_TAB_PROGRESS_STATUS_TIME_UNKNOWN, speed_text, amount); | 510 IDS_DOWNLOAD_TAB_PROGRESS_STATUS_TIME_UNKNOWN, speed_text, amount); |
511 } | 511 } |
512 return l10n_util::GetStringFUTF16(IDS_DOWNLOAD_TAB_PROGRESS_STATUS, | 512 return l10n_util::GetStringFUTF16(IDS_DOWNLOAD_TAB_PROGRESS_STATUS, |
513 speed_text, amount, time_remaining); | 513 speed_text, amount, time_remaining); |
514 } | 514 } |
515 | 515 |
516 #if !defined(OS_MACOSX) | 516 #if !defined(OS_MACOSX) |
517 void UpdateAppIconDownloadProgress(int download_count, | 517 void UpdateAppIconDownloadProgress(int download_count, |
518 bool progress_known, | 518 bool progress_known, |
519 float progress) { | 519 float progress) { |
520 #if defined(USE_AURA) | 520 #if defined(OS_WIN) |
Ben Goodger (Google)
2011/11/17 22:28:37
I wonder if we will want to do anything here in Au
DaveMoore
2011/11/18 18:17:35
Done.
| |
521 // TODO(beng): | |
522 NOTIMPLEMENTED(); | |
523 #elif defined(OS_WIN) | |
524 // Taskbar progress bar is only supported on Win7. | 521 // Taskbar progress bar is only supported on Win7. |
525 if (base::win::GetVersion() < base::win::VERSION_WIN7) | 522 if (base::win::GetVersion() < base::win::VERSION_WIN7) |
526 return; | 523 return; |
527 | 524 |
528 base::win::ScopedComPtr<ITaskbarList3> taskbar; | 525 base::win::ScopedComPtr<ITaskbarList3> taskbar; |
529 HRESULT result = taskbar.CreateInstance(CLSID_TaskbarList, NULL, | 526 HRESULT result = taskbar.CreateInstance(CLSID_TaskbarList, NULL, |
530 CLSCTX_INPROC_SERVER); | 527 CLSCTX_INPROC_SERVER); |
531 if (FAILED(result)) { | 528 if (FAILED(result)) { |
532 VLOG(1) << "Failed creating a TaskbarList object: " << result; | 529 VLOG(1) << "Failed creating a TaskbarList object: " << result; |
533 return; | 530 return; |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
565 return DownloadFile::GetUniquePathNumberWithSuffix( | 562 return DownloadFile::GetUniquePathNumberWithSuffix( |
566 path, FILE_PATH_LITERAL(".crdownload")); | 563 path, FILE_PATH_LITERAL(".crdownload")); |
567 } | 564 } |
568 | 565 |
569 FilePath GetCrDownloadPath(const FilePath& suggested_path) { | 566 FilePath GetCrDownloadPath(const FilePath& suggested_path) { |
570 return DownloadFile::AppendSuffixToPath( | 567 return DownloadFile::AppendSuffixToPath( |
571 suggested_path, FILE_PATH_LITERAL(".crdownload")); | 568 suggested_path, FILE_PATH_LITERAL(".crdownload")); |
572 } | 569 } |
573 | 570 |
574 } // namespace download_util | 571 } // namespace download_util |
OLD | NEW |