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

Unified Diff: chrome/browser/extensions/api/system_info_storage/storage_info_provider_win.cc

Issue 10907151: Extensions Docs Server: Enum values do not show up if enum is a type (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add back braces Created 8 years, 3 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_win.cc
diff --git a/chrome/browser/extensions/api/system_info_storage/storage_info_provider_win.cc b/chrome/browser/extensions/api/system_info_storage/storage_info_provider_win.cc
index e3c721d1063b6665953d2ba36cd2360f8286028a..a4e6e72e73d6a687990ae70e79b888ab8cf4a859 100644
--- a/chrome/browser/extensions/api/system_info_storage/storage_info_provider_win.cc
+++ b/chrome/browser/extensions/api/system_info_storage/storage_info_provider_win.cc
@@ -83,7 +83,10 @@ bool StorageInfoProviderWin::QueryUnitInfo(const std::string& id,
if (GetDiskFreeSpaceEx(drive.c_str(), NULL, &total_bytes, &free_bytes)) {
info->id = id;
- info->type = type;
+ if (!api::experimental_system_info_storage::
+ GetEnumFromString(type, &info->type)) {
+ return false;
+ }
info->capacity = static_cast<double>(total_bytes.QuadPart);
info->available_capacity = static_cast<double>(free_bytes.QuadPart);
return true;

Powered by Google App Engine
This is Rietveld 408576698