diff options
author | battre@chromium.org <battre@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-03 16:58:04 +0000 |
---|---|---|
committer | battre@chromium.org <battre@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-03 16:58:04 +0000 |
commit | ca943e7182d3e4bc7ae2e8c1c80df5310fbdab38 (patch) | |
tree | ae89245b223e5d4920c113993ca186f8365f0495 /chrome/browser/extensions/extension_preference_api.h | |
parent | d6c19b2bc1f0e3b90c55d46ca0646cb24b245e14 (diff) | |
download | chromium_src-ca943e7182d3e4bc7ae2e8c1c80df5310fbdab38.zip chromium_src-ca943e7182d3e4bc7ae2e8c1c80df5310fbdab38.tar.gz chromium_src-ca943e7182d3e4bc7ae2e8c1c80df5310fbdab38.tar.bz2 |
Improve error handling in proxy settings api
Introduce a bad_message parameter in order to simulate EXTENSION_FUNCTION_VALIDATE. This allows the Proxy Settings API to terminate extensions that circumvent the input parameter validation performed by the generic extension api.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/6902039
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@83901 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/extension_preference_api.h')
-rw-r--r-- | chrome/browser/extensions/extension_preference_api.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/chrome/browser/extensions/extension_preference_api.h b/chrome/browser/extensions/extension_preference_api.h index 19325d5..2ff2c1b 100644 --- a/chrome/browser/extensions/extension_preference_api.h +++ b/chrome/browser/extensions/extension_preference_api.h @@ -48,12 +48,12 @@ class PrefTransformerInterface { // Converts the representation of a preference as seen by the extension // into a representation that is used in the pref stores of the browser. // Returns the pref store representation in case of success or sets - // |error| and returns NULL otherwise. + // |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. - // TODO(battre): add bool* bad_message to allow terminating the entire - // extension in order to simulate the behavior of EXTENSION_FUNCTION_VALIDATE. virtual Value* ExtensionToBrowserPref(const Value* extension_pref, - std::string* error) = 0; + std::string* error, + bool* bad_message) = 0; // Converts the representation of the preference as stored in the browser // into a representation that is used by the extension. |