| 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 d08d62329d4a976df7e0131e6dc8a931b99a41c0..ccee5311adcaebe3729875404ce89f8337ce24db 100644
|
| --- a/chrome/browser/ui/webui/options/chromeos/storage_manager_handler.cc
|
| +++ b/chrome/browser/ui/webui/options/chromeos/storage_manager_handler.cc
|
| @@ -269,10 +269,16 @@ void StorageManagerHandler::OnGetDownloadsSize(int64_t size) {
|
| void StorageManagerHandler::UpdateDriveCacheSize() {
|
| if (updating_drive_cache_size_)
|
| return;
|
| - updating_drive_cache_size_ = true;
|
|
|
| drive::FileSystemInterface* const file_system =
|
| drive::util::GetFileSystemByProfile(Profile::FromWebUI(web_ui()));
|
| + if (!file_system)
|
| + return;
|
| +
|
| + // Shows the item "Offline cache" and start calculating size.
|
| + web_ui()->CallJavascriptFunctionUnsafe(
|
| + "options.StorageManager.showDriveCacheItem");
|
| + updating_drive_cache_size_ = true;
|
| file_system->CalculateCacheSize(
|
| base::Bind(&StorageManagerHandler::OnGetDriveCacheSize,
|
| weak_ptr_factory_.GetWeakPtr()));
|
|
|