| Index: chrome/browser/browsing_data/browsing_data_counter_utils.cc
|
| diff --git a/chrome/browser/browsing_data/browsing_data_counter_utils.cc b/chrome/browser/browsing_data/browsing_data_counter_utils.cc
|
| index 9b50b398ec28b5162a45552c3be983aeed32379c..7c38a4b78a3290ca6038c3ce1713687aa6e34b5b 100644
|
| --- a/chrome/browser/browsing_data/browsing_data_counter_utils.cc
|
| +++ b/chrome/browser/browsing_data/browsing_data_counter_utils.cc
|
| @@ -77,20 +77,20 @@ base::string16 GetChromeCounterTextFromResult(
|
| int64_t cache_size_bytes = cache_result->cache_size();
|
| bool is_upper_limit = cache_result->is_upper_limit();
|
|
|
| - // Three cases: Nonzero result for the entire cache, nonzero result for
|
| - // a subset of cache (i.e. a finite time interval), and almost zero (< 1MB).
|
| static const int kBytesInAMegabyte = 1024 * 1024;
|
| - base::string16 size_string;
|
| - if (cache_size_bytes >= kBytesInAMegabyte) {
|
| - base::string16 formatted_size = FormatBytesMBOrHigher(cache_size_bytes);
|
| - size_string = !is_upper_limit ? formatted_size
|
| - : l10n_util::GetStringFUTF16(
|
| - IDS_DEL_CACHE_COUNTER_UPPER_ESTIMATE,
|
| - formatted_size);
|
| - } else {
|
| - size_string =
|
| - l10n_util::GetStringUTF16(IDS_DEL_CACHE_COUNTER_ALMOST_EMPTY);
|
| + // Almost zero (< 1MB).
|
| + if (cache_size_bytes < kBytesInAMegabyte) {
|
| + return l10n_util::GetStringUTF16(IDS_DEL_CACHE_COUNTER_ALMOST_EMPTY);
|
| }
|
| + // Nonzero result for the entire cache or nonzero result for
|
| + // a subset of cache (i.e. a finite time interval).
|
| + base::string16 formatted_size = FormatBytesMBOrHigher(cache_size_bytes);
|
| + base::string16 size_string =
|
| + !is_upper_limit
|
| + ? formatted_size
|
| + : l10n_util::GetStringFUTF16(IDS_DEL_CACHE_COUNTER_UPPER_ESTIMATE,
|
| + formatted_size);
|
| + // For the basic tab, wrap the size in a sentence.
|
| if (pref_name == browsing_data::prefs::kDeleteCacheBasic) {
|
| return l10n_util::GetStringFUTF16(IDS_DEL_CACHE_COUNTER_BASIC,
|
| size_string);
|
|
|