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

Unified Diff: chrome/browser/ui/webui/options/chromeos/storage_manager_handler.cc

Issue 2146393002: Storage manager: Show "0 B" as the total size of other users when there is no other user. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2785
Patch Set: Created 4 years, 5 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/options/chromeos/storage_manager_handler.cc
diff --git a/chrome/browser/ui/webui/options/chromeos/storage_manager_handler.cc b/chrome/browser/ui/webui/options/chromeos/storage_manager_handler.cc
index 6aa8e1fe4e98dc1da0640579ea9fee794db09076..c49798d764f261c46692fb2e4b9c0184739108bf 100644
--- a/chrome/browser/ui/webui/options/chromeos/storage_manager_handler.cc
+++ b/chrome/browser/ui/webui/options/chromeos/storage_manager_handler.cc
@@ -371,6 +371,13 @@ void StorageManagerHandler::UpdateOtherUsersSize() {
base::Bind(&StorageManagerHandler::OnGetOtherUserSize,
weak_ptr_factory_.GetWeakPtr()));
}
+ // We should show "0 B" if there is no other user.
+ if (other_users_.empty()) {
+ updating_other_users_size_ = false;
+ web_ui()->CallJavascriptFunctionUnsafe(
+ "options.StorageManager.setOtherUsersSize",
+ base::StringValue(ui::FormatBytes(0)));
+ }
}
void StorageManagerHandler::OnGetOtherUserSize(bool success, int64_t size) {
« 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