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

Unified Diff: chrome/browser/browsing_data/browsing_data_counter_utils.cc

Issue 2921423002: Fix 'Less than 1 MB' used inside a sentence (Closed)
Patch Set: Use "less than 1 MB" inside sentence Created 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/browsing_data/browsing_data_counter_utils_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..a165aaebf110024fa70fc4faf15e47d86ea85a58 100644
--- a/chrome/browser/browsing_data/browsing_data_counter_utils.cc
+++ b/chrome/browser/browsing_data/browsing_data_counter_utils.cc
@@ -76,6 +76,7 @@ base::string16 GetChromeCounterTextFromResult(
static_cast<const CacheCounter::CacheResult*>(result);
int64_t cache_size_bytes = cache_result->cache_size();
bool is_upper_limit = cache_result->is_upper_limit();
+ bool is_basic_tab = pref_name == browsing_data::prefs::kDeleteCacheBasic;
// 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).
@@ -88,10 +89,12 @@ base::string16 GetChromeCounterTextFromResult(
IDS_DEL_CACHE_COUNTER_UPPER_ESTIMATE,
formatted_size);
} else {
- size_string =
- l10n_util::GetStringUTF16(IDS_DEL_CACHE_COUNTER_ALMOST_EMPTY);
+ size_string = l10n_util::GetStringUTF16(
+ is_basic_tab ? IDS_DEL_CACHE_COUNTER_ALMOST_EMPTY_BASIC
+ : IDS_DEL_CACHE_COUNTER_ALMOST_EMPTY);
}
- if (pref_name == browsing_data::prefs::kDeleteCacheBasic) {
+ if (is_basic_tab) {
+ // Wrap the size string inside a sentence.
return l10n_util::GetStringFUTF16(IDS_DEL_CACHE_COUNTER_BASIC,
size_string);
}
« no previous file with comments | « no previous file | chrome/browser/browsing_data/browsing_data_counter_utils_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698