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

Unified Diff: chrome/browser/extensions/api/system_info_storage/storage_info_provider.h

Issue 18290002: [SystemInfo API] Finish TODOs in SystemInfoProvider (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@dev_rewrite_storage_info_api
Patch Set: Fix hongbo's comments 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_info_storage/storage_info_provider.h
diff --git a/chrome/browser/extensions/api/system_info_storage/storage_info_provider.h b/chrome/browser/extensions/api/system_info_storage/storage_info_provider.h
index cfa73970961acd7a87c1fdcefed95ce7a872b560..3866865e40541a9911e6f2a91853fa7b4f4c7413 100644
--- a/chrome/browser/extensions/api/system_info_storage/storage_info_provider.h
+++ b/chrome/browser/extensions/api/system_info_storage/storage_info_provider.h
@@ -62,6 +62,8 @@ class StorageInfoProvider : public SystemInfoProvider<StorageInfo> {
virtual std::string GetDeviceIdForTransientId(
const std::string& transient_id) const;
+ const StorageInfo& storage_info() const;
+
protected:
virtual ~StorageInfoProvider();
@@ -69,15 +71,15 @@ class StorageInfoProvider : public SystemInfoProvider<StorageInfo> {
void SetWatchingIntervalForTesting(size_t ms) { watching_interval_ = ms; }
// SystemInfoProvider implementations.
- virtual bool QueryInfo(StorageInfo* info) OVERRIDE;
- virtual void StartQueryInfoImpl() OVERRIDE;
+ virtual bool QueryInfo() OVERRIDE;
+ virtual void StartQueryInfoPostInitialization() OVERRIDE;
private:
typedef std::map<std::string, double> StorageTransientIdToSizeMap;
// Query the available capacity of all known storage devices on the blocking
// pool, including fixed and removable.
- void QueryAvailableCapacityOnBlockingPool();
+ bool QueryAvailableCapacityOnBlockingPool();
// Query the new attached removable storage info on the blocking pool.
void QueryAttachedStorageInfoOnBlockingPool(const std::string& transient_id);
// Run the QueryInfo() implementation after the StorageMonitor has been

Powered by Google App Engine
This is Rietveld 408576698