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

Side by Side Diff: chrome/browser/ui/webui/settings/chromeos/device_storage_handler.cc

Issue 2663163002: MD settings: Storage: Add DELETE button for deleting Drive offline files. (Closed)
Patch Set: Use <iron-icon icon="cr:delete"> instead of copying svg. Created 3 years, 10 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/resources/settings/device_page/storage.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 base::FundamentalValue(true)); 210 base::FundamentalValue(true));
211 updating_drive_cache_size_ = true; 211 updating_drive_cache_size_ = true;
212 file_system->CalculateCacheSize( 212 file_system->CalculateCacheSize(
213 base::Bind(&StorageHandler::OnGetDriveCacheSize, base::Unretained(this))); 213 base::Bind(&StorageHandler::OnGetDriveCacheSize, base::Unretained(this)));
214 } 214 }
215 215
216 void StorageHandler::OnGetDriveCacheSize(int64_t size) { 216 void StorageHandler::OnGetDriveCacheSize(int64_t size) {
217 updating_drive_cache_size_ = false; 217 updating_drive_cache_size_ = false;
218 CallJavascriptFunction("cr.webUIListenerCallback", 218 CallJavascriptFunction("cr.webUIListenerCallback",
219 base::StringValue("storage-drive-cache-size-changed"), 219 base::StringValue("storage-drive-cache-size-changed"),
220 base::StringValue(ui::FormatBytes(size))); 220 base::StringValue(ui::FormatBytes(size)),
221 base::FundamentalValue(size > 0));
221 } 222 }
222 223
223 void StorageHandler::UpdateBrowsingDataSize() { 224 void StorageHandler::UpdateBrowsingDataSize() {
224 if (updating_browsing_data_size_) 225 if (updating_browsing_data_size_)
225 return; 226 return;
226 updating_browsing_data_size_ = true; 227 updating_browsing_data_size_ = true;
227 228
228 has_browser_cache_size_ = false; 229 has_browser_cache_size_ = false;
229 has_browser_site_data_size_ = false; 230 has_browser_site_data_size_ = false;
230 Profile* const profile = Profile::FromWebUI(web_ui()); 231 Profile* const profile = Profile::FromWebUI(web_ui());
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
380 base::StringValue("storage-android-size-changed"), 381 base::StringValue("storage-android-size-changed"),
381 base::StringValue(size_string)); 382 base::StringValue(size_string));
382 } 383 }
383 384
384 void StorageHandler::OnClearDriveCacheDone(bool success) { 385 void StorageHandler::OnClearDriveCacheDone(bool success) {
385 UpdateDriveCacheSize(); 386 UpdateDriveCacheSize();
386 } 387 }
387 388
388 } // namespace settings 389 } // namespace settings
389 } // namespace chromeos 390 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/resources/settings/device_page/storage.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698