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

Unified Diff: extensions/browser/api/system_storage/system_storage_api.h

Issue 2612873004: Remove some usages of AsyncExtensionFunction::results_. (Closed)
Patch Set: sync Created 3 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: extensions/browser/api/system_storage/system_storage_api.h
diff --git a/extensions/browser/api/system_storage/system_storage_api.h b/extensions/browser/api/system_storage/system_storage_api.h
index 914e8a228ab91477063ba659c8a0169f392ebbfe..c79734d91d87bde5e3d404dbf2c0f7c6bee87331 100644
--- a/extensions/browser/api/system_storage/system_storage_api.h
+++ b/extensions/browser/api/system_storage/system_storage_api.h
@@ -13,19 +13,21 @@ namespace extensions {
// Implementation of the systeminfo.storage.get API. It is an asynchronous
// call relative to browser UI thread.
-class SystemStorageGetInfoFunction : public AsyncExtensionFunction {
+class SystemStorageGetInfoFunction : public UIThreadExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("system.storage.getInfo", SYSTEM_STORAGE_GETINFO);
SystemStorageGetInfoFunction();
private:
~SystemStorageGetInfoFunction() override;
- bool RunAsync() override;
+
+ // ExtensionFunction:
+ ResponseAction Run() override;
void OnGetStorageInfoCompleted(bool success);
};
-class SystemStorageEjectDeviceFunction : public AsyncExtensionFunction {
+class SystemStorageEjectDeviceFunction : public UIThreadExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("system.storage.ejectDevice",
SYSTEM_STORAGE_EJECTDEVICE);
@@ -33,8 +35,8 @@ class SystemStorageEjectDeviceFunction : public AsyncExtensionFunction {
protected:
~SystemStorageEjectDeviceFunction() override;
- // AsyncExtensionFunction overrides.
- bool RunAsync() override;
+ // ExtensionFunction:
+ ResponseAction Run() override;
private:
void OnStorageMonitorInit(const std::string& transient_device_id);
@@ -44,7 +46,7 @@ class SystemStorageEjectDeviceFunction : public AsyncExtensionFunction {
};
class SystemStorageGetAvailableCapacityFunction
- : public AsyncExtensionFunction {
+ : public UIThreadExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("system.storage.getAvailableCapacity",
SYSTEM_STORAGE_GETAVAILABLECAPACITY);
@@ -55,7 +57,9 @@ class SystemStorageGetAvailableCapacityFunction
void OnQueryCompleted(const std::string& transient_id,
double available_capacity);
~SystemStorageGetAvailableCapacityFunction() override;
- bool RunAsync() override;
+
+ // ExtensionFunction:
+ ResponseAction Run() override;
};
} // namespace extensions

Powered by Google App Engine
This is Rietveld 408576698