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

Unified Diff: chrome/browser/extensions/api/preference/preference_api.h

Issue 2777063003: Stop passing raw pointers to base::Value API in c/b/chromeos and c/b/extensions (Closed)
Patch Set: Just rebased Created 3 years, 8 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/preference/preference_api.h
diff --git a/chrome/browser/extensions/api/preference/preference_api.h b/chrome/browser/extensions/api/preference/preference_api.h
index 47d68b4a576c3e21218935cc819ad2db33400f22..ff72eba7b2798e94b54687191af3fc4ea78af18f 100644
--- a/chrome/browser/extensions/api/preference/preference_api.h
+++ b/chrome/browser/extensions/api/preference/preference_api.h
@@ -5,6 +5,7 @@
#ifndef CHROME_BROWSER_EXTENSIONS_API_PREFERENCE_PREFERENCE_API_H__
#define CHROME_BROWSER_EXTENSIONS_API_PREFERENCE_PREFERENCE_API_H__
+#include <memory>
#include <string>
#include "base/macros.h"
@@ -151,7 +152,7 @@ class PrefTransformerInterface {
// |error| and returns NULL otherwise. |bad_message| is passed to simulate
// the behavior of EXTENSION_FUNCTION_VALIDATE. It is never NULL.
// The ownership of the returned value is passed to the caller.
- virtual base::Value* ExtensionToBrowserPref(
+ virtual std::unique_ptr<base::Value> ExtensionToBrowserPref(
const base::Value* extension_pref,
std::string* error,
bool* bad_message) = 0;
@@ -160,7 +161,7 @@ class PrefTransformerInterface {
// into a representation that is used by the extension.
// Returns the extension representation in case of success or NULL otherwise.
// The ownership of the returned value is passed to the caller.
- virtual base::Value* BrowserToExtensionPref(
+ virtual std::unique_ptr<base::Value> BrowserToExtensionPref(
const base::Value* browser_pref) = 0;
};

Powered by Google App Engine
This is Rietveld 408576698