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

Side by Side Diff: chrome/browser/dom_ui/downloads_dom_handler.cc

Issue 119428: Show the remaining time in the downloads page. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 6 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 | « no previous file | no next file » | 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) 2006-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2009 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/dom_ui/downloads_dom_handler.h" 5 #include "chrome/browser/dom_ui/downloads_dom_handler.h"
6 6
7 #include "app/l10n_util.h" 7 #include "app/l10n_util.h"
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/gfx/png_encoder.h" 9 #include "base/gfx/png_encoder.h"
10 #include "base/string_piece.h" 10 #include "base/string_piece.h"
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 std::wstring time_remaining; 336 std::wstring time_remaining;
337 if (download->is_paused()) 337 if (download->is_paused())
338 time_remaining = l10n_util::GetString(IDS_DOWNLOAD_PROGRESS_PAUSED); 338 time_remaining = l10n_util::GetString(IDS_DOWNLOAD_PROGRESS_PAUSED);
339 else if (download->TimeRemaining(&remaining)) 339 else if (download->TimeRemaining(&remaining))
340 time_remaining = TimeFormat::TimeRemaining(remaining); 340 time_remaining = TimeFormat::TimeRemaining(remaining);
341 341
342 if (time_remaining.empty()) { 342 if (time_remaining.empty()) {
343 return l10n_util::GetStringF(IDS_DOWNLOAD_TAB_PROGRESS_STATUS_TIME_UNKNOWN, 343 return l10n_util::GetStringF(IDS_DOWNLOAD_TAB_PROGRESS_STATUS_TIME_UNKNOWN,
344 speed_text, amount); 344 speed_text, amount);
345 } 345 }
346 return l10n_util::GetStringF(IDS_DOWNLOAD_TAB_PROGRESS_STATUS, amount, 346 return l10n_util::GetStringF(IDS_DOWNLOAD_TAB_PROGRESS_STATUS, speed_text,
347 time_remaining); 347 amount, time_remaining);
348 } 348 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698