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

Unified Diff: chrome/browser/extensions/api/file_system/file_system_api.h

Issue 1991083002: Remove ExtensionFunction::SetResult(T*) overload. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: IWYU Created 4 years, 7 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/file_system/file_system_api.h
diff --git a/chrome/browser/extensions/api/file_system/file_system_api.h b/chrome/browser/extensions/api/file_system/file_system_api.h
index 5034de818e2f91f2624326a832c38b0a867fe260..75113b61cb858483786ce09852587dcfb34fa5cb 100644
--- a/chrome/browser/extensions/api/file_system/file_system_api.h
+++ b/chrome/browser/extensions/api/file_system/file_system_api.h
@@ -13,6 +13,7 @@
#include "base/files/file_path.h"
#include "base/macros.h"
#include "base/memory/weak_ptr.h"
+#include "base/values.h"
#include "build/build_config.h"
#include "chrome/browser/extensions/chrome_extension_function.h"
#include "chrome/browser/extensions/chrome_extension_function_details.h"
@@ -170,12 +171,13 @@ class FileSystemEntryFunction : public ChromeAsyncExtensionFunction {
void RegisterFileSystemsAndSendResponse(
const std::vector<base::FilePath>& path);
- // Creates a response dictionary and sets it as the response to be sent.
- void CreateResponse();
+ // Creates a result dictionary.
+ std::unique_ptr<base::DictionaryValue> CreateResult();
- // Adds an entry to the response dictionary.
- void AddEntryToResponse(const base::FilePath& path,
- const std::string& id_override);
+ // Adds an entry to the result dictionary.
+ void AddEntryToResult(const base::FilePath& path,
+ const std::string& id_override,
+ base::DictionaryValue* result);
// called on the UI thread if there is a problem checking a writable file.
void HandleWritableFileError(const base::FilePath& error_path);
@@ -185,9 +187,6 @@ class FileSystemEntryFunction : public ChromeAsyncExtensionFunction {
// Whether a directory has been requested.
bool is_directory_;
-
- // The dictionary to send as the response.
- base::DictionaryValue* response_;
};
class FileSystemGetWritableEntryFunction : public FileSystemEntryFunction {

Powered by Google App Engine
This is Rietveld 408576698