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

Unified Diff: extensions/browser/api/execute_code_function.h

Issue 2231353002: Make FileReader return ownership of the string content (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments Created 4 years, 4 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/execute_code_function.h
diff --git a/extensions/browser/api/execute_code_function.h b/extensions/browser/api/execute_code_function.h
index a483e13ab3b57379e630d2d78efd4ffc311cc8da..3ba96e21317feb317c80eedc95e299434b9f52dd 100644
--- a/extensions/browser/api/execute_code_function.h
+++ b/extensions/browser/api/execute_code_function.h
@@ -43,7 +43,7 @@ class ExecuteCodeFunction : public AsyncExtensionFunction {
// Called when contents from the loaded file have been localized.
void DidLoadAndLocalizeFile(const std::string& file,
bool success,
- const std::string& data);
+ std::unique_ptr<std::string> data);
const HostID& host_id() const { return host_id_; }
void set_host_id(const HostID& host_id) { host_id_ = host_id; }
@@ -54,12 +54,12 @@ class ExecuteCodeFunction : public AsyncExtensionFunction {
private:
// Called when contents from the file whose path is specified in JSON
// arguments has been loaded.
- void DidLoadFile(bool success, const std::string& data);
+ void DidLoadFile(bool success, std::unique_ptr<std::string> data);
// Runs on FILE thread. Loads message bundles for the extension and
// localizes the CSS data. Calls back DidLoadAndLocalizeFile on the UI thread.
void GetFileURLAndLocalizeCSS(ScriptExecutor::ScriptType script_type,
- const std::string& data,
+ std::unique_ptr<std::string> data,
const std::string& extension_id,
const base::FilePath& extension_path,
const std::string& extension_default_locale);
« no previous file with comments | « chrome/browser/chromeos/accessibility/accessibility_manager.cc ('k') | extensions/browser/api/execute_code_function.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698