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

Unified Diff: chrome/browser/extensions/api/system_storage/storage_info_provider.cc

Issue 18578008: [SystemInfo API] Move Storage API out of experimental namespace and rename to the "system" namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rename to the "system" namespace. Created 7 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
Index: chrome/browser/extensions/api/system_storage/storage_info_provider.cc
diff --git a/chrome/browser/extensions/api/system_info_storage/storage_info_provider.cc b/chrome/browser/extensions/api/system_storage/storage_info_provider.cc
similarity index 94%
rename from chrome/browser/extensions/api/system_info_storage/storage_info_provider.cc
rename to chrome/browser/extensions/api/system_storage/storage_info_provider.cc
index c43fe8f4fdaa6829d65abbac7062798412769fa3..5e40ab799f7a63391babd0b9c9ae1eaf601fc6bb 100644
--- a/chrome/browser/extensions/api/system_info_storage/storage_info_provider.cc
+++ b/chrome/browser/extensions/api/system_storage/storage_info_provider.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/extensions/api/system_info_storage/storage_info_provider.h"
+#include "chrome/browser/extensions/api/system_storage/storage_info_provider.h"
#include "base/stl_util.h"
#include "base/strings/utf_string_conversions.h"
@@ -15,9 +15,9 @@ namespace extensions {
using content::BrowserThread;
using chrome::StorageMonitor;
-using api::experimental_system_info_storage::StorageUnitInfo;
-using api::experimental_system_info_storage::STORAGE_UNIT_TYPE_FIXED;
-using api::experimental_system_info_storage::STORAGE_UNIT_TYPE_REMOVABLE;
+using api::system_storage::StorageUnitInfo;
+using api::system_storage::STORAGE_UNIT_TYPE_FIXED;
+using api::system_storage::STORAGE_UNIT_TYPE_REMOVABLE;
namespace systeminfo {
@@ -34,7 +34,6 @@ void BuildStorageUnitInfo(const chrome::StorageInfo& info,
unit->type = chrome::StorageInfo::IsRemovableDevice(info.device_id()) ?
STORAGE_UNIT_TYPE_REMOVABLE : STORAGE_UNIT_TYPE_FIXED;
unit->capacity = static_cast<double>(info.total_size_in_bytes());
- unit->available_capacity = 0;
}
} // namespace systeminfo
@@ -77,13 +76,7 @@ void StorageInfoProvider::InitializeProvider(
bool StorageInfoProvider::QueryInfo() {
DCHECK(BrowserThread::GetBlockingPool()->RunsTasksOnCurrentThread());
- for (StorageUnitInfoList::iterator it = info_.begin();
- it != info_.end(); ++it) {
- int64 amount = GetStorageFreeSpaceFromTransientId((*it)->id);
- if (amount > 0)
- (*it)->available_capacity = static_cast<double>(amount);
- }
-
+ // No task to do in worker pool.
return true;
}

Powered by Google App Engine
This is Rietveld 408576698