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

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

Issue 11419279: Implement systemInfo.storage.onChanged event (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: refine browser test and code comments Created 8 years 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/storage_info_observer.h
diff --git a/chrome/browser/extensions/storage_info_observer.h b/chrome/browser/extensions/storage_info_observer.h
new file mode 100644
index 0000000000000000000000000000000000000000..b3e7ad7641ff3a3eeb2daf68e9441270294d0dd7
--- /dev/null
+++ b/chrome/browser/extensions/storage_info_observer.h
@@ -0,0 +1,25 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+#ifndef CHROME_BROWSER_EXTENSIONS_STORAGE_INFO_OBSERVER_H_
+#define CHROME_BROWSER_EXTENSIONS_STORAGE_INFO_OBSERVER_H_
+
+namespace extensions {
+
+// Observes the changes happening on the disk storage, e.g. free space changes.
+class StorageInfoObserver {
+ public:
+ virtual ~StorageInfoObserver() {}
+
+ // Called from FILE thread when the storage free space changes. The
+ // |threshold| paremeter indicates the change threshold from which the
+ // callback get called.
+ virtual void OnStorageFreeSpaceChanged(const std::string& id,
+ double old_value,
+ double new_value,
+ int threshold) = 0;
+};
+
+} // namespace extensions
+
+#endif // CHROME_BROWSER_EXTENSIONS_STORAGE_INFO_OBSERVER_H_

Powered by Google App Engine
This is Rietveld 408576698