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

Unified Diff: chrome/browser/extensions/system_info_event_router.h

Issue 12084017: [SystemInfo API] Implement systemInfo.storage.onAvailableCapacityChanged event (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 years, 11 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/system_info_event_router.h
diff --git a/chrome/browser/extensions/system_info_event_router.h b/chrome/browser/extensions/system_info_event_router.h
index 2fd8b4f1afd5d7ebbaa4b35a95d4b58e65850c47..b8c330b36c481fde559ffda2b7ba247e33866be3 100644
--- a/chrome/browser/extensions/system_info_event_router.h
+++ b/chrome/browser/extensions/system_info_event_router.h
@@ -10,6 +10,7 @@
#include "base/file_path.h"
#include "base/memory/singleton.h"
#include "base/values.h"
+#include "chrome/browser/extensions/api/system_info_storage/storage_info_observer.h"
namespace extensions {
@@ -29,7 +30,7 @@ struct CpuUpdateInfo;
// Since the system_monitor will be refactored along with media_gallery, once
// http://crbug.com/145400 is fixed, we need to update SystemInfoEventRouter
// accordingly.
-class SystemInfoEventRouter {
+class SystemInfoEventRouter : public StorageInfoObserver {
public:
static SystemInfoEventRouter* GetInstance();
@@ -40,11 +41,14 @@ class SystemInfoEventRouter {
// Return true if the |event_name| is an event from systemInfo namespace.
static bool IsSystemInfoEvent(const std::string& event_name);
+ // StorageInfoObserver implementation:
+ virtual void OnStorageFreeSpaceChanged(const std::string& id,
+ double new_value,
+ double old_value);
+
// TODO(hongbo): The following methods should be likely overriden from
// SystemMonitor::DevicesChangedObserver once the http://crbug.com/145400
// is fixed.
- void OnStorageAvailableCapacityChanged(const std::string& id,
- int64 available_capacity);
void OnRemovableStorageAttached(const std::string& id,
const string16& name,
const FilePath::StringType& location);

Powered by Google App Engine
This is Rietveld 408576698