| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/ui/webui/options/chromeos/storage_manager_handler.h" | 5 #include "chrome/browser/ui/webui/options/chromeos/storage_manager_handler.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <numeric> | 8 #include <numeric> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 323 storage_partition->GetServiceWorkerContext()), | 323 storage_partition->GetServiceWorkerContext()), |
| 324 new BrowsingDataCacheStorageHelper( | 324 new BrowsingDataCacheStorageHelper( |
| 325 storage_partition->GetCacheStorageContext()), | 325 storage_partition->GetCacheStorageContext()), |
| 326 BrowsingDataFlashLSOHelper::Create(profile))); | 326 BrowsingDataFlashLSOHelper::Create(profile))); |
| 327 } | 327 } |
| 328 site_data_size_collector_->Fetch( | 328 site_data_size_collector_->Fetch( |
| 329 base::Bind(&StorageManagerHandler::OnGetBrowsingDataSize, | 329 base::Bind(&StorageManagerHandler::OnGetBrowsingDataSize, |
| 330 weak_ptr_factory_.GetWeakPtr(), true)); | 330 weak_ptr_factory_.GetWeakPtr(), true)); |
| 331 } | 331 } |
| 332 | 332 |
| 333 void StorageManagerHandler::OnGetCacheSize(int64_t size, bool is_upper_limit) { | 333 void StorageManagerHandler::OnGetCacheSize(bool is_upper_limit, int64_t size) { |
| 334 DCHECK(!is_upper_limit); | 334 DCHECK(!is_upper_limit); |
| 335 OnGetBrowsingDataSize(false, size); | 335 OnGetBrowsingDataSize(false, size); |
| 336 } | 336 } |
| 337 | 337 |
| 338 void StorageManagerHandler::OnGetBrowsingDataSize(bool is_site_data, | 338 void StorageManagerHandler::OnGetBrowsingDataSize(bool is_site_data, |
| 339 int64_t size) { | 339 int64_t size) { |
| 340 if (is_site_data) { | 340 if (is_site_data) { |
| 341 has_browser_site_data_size_ = true; | 341 has_browser_site_data_size_ = true; |
| 342 browser_site_data_size_ = size; | 342 browser_site_data_size_ = size; |
| 343 } else { | 343 } else { |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 441 web_ui()->CallJavascriptFunctionUnsafe("options.StorageManager.setArcSize", | 441 web_ui()->CallJavascriptFunctionUnsafe("options.StorageManager.setArcSize", |
| 442 base::Value(size_string)); | 442 base::Value(size_string)); |
| 443 } | 443 } |
| 444 | 444 |
| 445 void StorageManagerHandler::OnClearDriveCacheDone(bool success) { | 445 void StorageManagerHandler::OnClearDriveCacheDone(bool success) { |
| 446 UpdateDriveCacheSize(); | 446 UpdateDriveCacheSize(); |
| 447 } | 447 } |
| 448 | 448 |
| 449 } // namespace options | 449 } // namespace options |
| 450 } // namespace chromeos | 450 } // namespace chromeos |
| OLD | NEW |