| 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/settings/chromeos/device_storage_handler.h" | 5 #include "chrome/browser/ui/webui/settings/chromeos/device_storage_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 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 253 storage_partition->GetServiceWorkerContext()), | 253 storage_partition->GetServiceWorkerContext()), |
| 254 new BrowsingDataCacheStorageHelper( | 254 new BrowsingDataCacheStorageHelper( |
| 255 storage_partition->GetCacheStorageContext()), | 255 storage_partition->GetCacheStorageContext()), |
| 256 BrowsingDataFlashLSOHelper::Create(profile))); | 256 BrowsingDataFlashLSOHelper::Create(profile))); |
| 257 } | 257 } |
| 258 site_data_size_collector_->Fetch( | 258 site_data_size_collector_->Fetch( |
| 259 base::Bind(&StorageHandler::OnGetBrowsingDataSize, | 259 base::Bind(&StorageHandler::OnGetBrowsingDataSize, |
| 260 base::Unretained(this), true)); | 260 base::Unretained(this), true)); |
| 261 } | 261 } |
| 262 | 262 |
| 263 void StorageHandler::OnGetCacheSize(int64_t size, bool is_upper_limit) { | 263 void StorageHandler::OnGetCacheSize(bool is_upper_limit, int64_t size) { |
| 264 DCHECK(!is_upper_limit); | 264 DCHECK(!is_upper_limit); |
| 265 OnGetBrowsingDataSize(false, size); | 265 OnGetBrowsingDataSize(false, size); |
| 266 } | 266 } |
| 267 | 267 |
| 268 void StorageHandler::OnGetBrowsingDataSize(bool is_site_data, int64_t size) { | 268 void StorageHandler::OnGetBrowsingDataSize(bool is_site_data, int64_t size) { |
| 269 if (is_site_data) { | 269 if (is_site_data) { |
| 270 has_browser_site_data_size_ = true; | 270 has_browser_site_data_size_ = true; |
| 271 browser_site_data_size_ = size; | 271 browser_site_data_size_ = size; |
| 272 } else { | 272 } else { |
| 273 has_browser_cache_size_ = true; | 273 has_browser_cache_size_ = true; |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 374 base::Value("storage-android-size-changed"), | 374 base::Value("storage-android-size-changed"), |
| 375 base::Value(size_string)); | 375 base::Value(size_string)); |
| 376 } | 376 } |
| 377 | 377 |
| 378 void StorageHandler::OnClearDriveCacheDone(bool success) { | 378 void StorageHandler::OnClearDriveCacheDone(bool success) { |
| 379 UpdateDriveCacheSize(); | 379 UpdateDriveCacheSize(); |
| 380 } | 380 } |
| 381 | 381 |
| 382 } // namespace settings | 382 } // namespace settings |
| 383 } // namespace chromeos | 383 } // namespace chromeos |
| OLD | NEW |