| 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 18f0e6f7da007c331caebf92c55481464f05d9c1..0265ddd0d04031b56caa45818272d3301c66fe62 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
|
| @@ -4,14 +4,15 @@
|
| #ifndef CHROME_BROWSER_EXTENSIONS_API_SYSTEM_INFO_STORAGE_STORAGE_INFO_PROVIDER_H_
|
| #define CHROME_BROWSER_EXTENSIONS_API_SYSTEM_INFO_STORAGE_STORAGE_INFO_PROVIDER_H_
|
|
|
| +#include "chrome/browser/extensions/system_info_provider.h"
|
| #include "chrome/common/extensions/api/experimental_system_info_storage.h"
|
|
|
| namespace extensions {
|
| namespace systeminfo {
|
|
|
| -// TODO(hmin): Here the storage type is declared as string type due to the IDL
|
| -// doesn't support enum type yet. Once http://crbug.com/141940 is fixed, we
|
| -// could reuse enum values generated by IDL compiler.
|
| +// TODO(hongbo): Here the storage type is declared as string type due to the
|
| +// IDL doesn't support enum type yet. Once http://crbug.com/141940 is fixed,
|
| +// we could reuse enum values generated by IDL compiler.
|
|
|
| // Unknown storage type.
|
| extern const char kStorageTypeUnknown[];
|
| @@ -19,21 +20,22 @@ extern const char kStorageTypeUnknown[];
|
| extern const char kStorageTypeHardDisk[];
|
| // Removable storage, e.g. USB device, flash card reader.
|
| extern const char kStorageTypeRemovable[];
|
| +
|
| } // namespace systeminfo
|
|
|
| -// An interface for retrieving storage information on different platforms.
|
| -class StorageInfoProvider {
|
| +class StorageInfoProvider
|
| + : public SystemInfoProvider<
|
| + api::experimental_system_info_storage::StorageInfo> {
|
| public:
|
| - // Return a StorageInfoProvider instance. The caller is responsible for
|
| - // destroying it.
|
| - static StorageInfoProvider* Create();
|
| + virtual ~StorageInfoProvider() {}
|
|
|
| - virtual ~StorageInfoProvider() {}
|
| + // Get the single shared instance of StorageInfoProvider.
|
| + static StorageInfoProvider* Get();
|
|
|
| - // Return true if succeed to get storage information. Should be implemented
|
| - // on different platforms.
|
| - virtual bool GetStorageInfo(
|
| - api::experimental_system_info_storage::StorageInfo* info) = 0;
|
| + // Get the information for the storage unit specified by the |id| parameter,
|
| + // and output the result to the |info|.
|
| + virtual bool QueryUnitInfo(const std::string& id,
|
| + api::experimental_system_info_storage::StorageUnitInfo* info) = 0;
|
| };
|
|
|
| } // namespace extensions
|
|
|