summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/extension_cookies_api_constants.cc
diff options
context:
space:
mode:
authorjochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-23 12:08:18 +0000
committerjochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-23 12:08:18 +0000
commit8bb846f9fa618c1975638a49c3be7ec61f304d13 (patch)
treeb9a089f61f1c9c709f82eea0dc7a030cee23c24f /chrome/browser/extensions/extension_cookies_api_constants.cc
parent9b78cfd2818651c50f76990771fdaae1d85c3c3d (diff)
downloadchromium_src-8bb846f9fa618c1975638a49c3be7ec61f304d13.zip
chromium_src-8bb846f9fa618c1975638a49c3be7ec61f304d13.tar.gz
chromium_src-8bb846f9fa618c1975638a49c3be7ec61f304d13.tar.bz2
Adding `cause` to the cookie extension API's onchanged event signature.
This makes it simpler for developers to deal with the release/set event pair generated by setting a cookie that already exists, and gives them more information about general cookie removal (e.g. that the cookie wasn't "removed" actively but expired). BUG=70101 TEST=net_unittests Review URL: http://codereview.chromium.org/6698023 Patch from Mike West <mkwst@chromium.org>. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79113 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/extension_cookies_api_constants.cc')
-rw-r--r--chrome/browser/extensions/extension_cookies_api_constants.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/chrome/browser/extensions/extension_cookies_api_constants.cc b/chrome/browser/extensions/extension_cookies_api_constants.cc
index 6307079..b6d0ca3 100644
--- a/chrome/browser/extensions/extension_cookies_api_constants.cc
+++ b/chrome/browser/extensions/extension_cookies_api_constants.cc
@@ -6,6 +6,8 @@
namespace extension_cookies_api_constants {
+// Keys
+const char kCauseKey[] = "cause";
const char kCookieKey[] = "cookie";
const char kDomainKey[] = "domain";
const char kExpirationDateKey[] = "expirationDate";
@@ -22,8 +24,16 @@ const char kTabIdsKey[] = "tabIds";
const char kUrlKey[] = "url";
const char kValueKey[] = "value";
+// Cause Constants
+extern const char kExplicitChangeCause[] = "explicit";
+extern const char kOverwriteChangeCause[] = "overwrite";
+extern const char kExpiredChangeCause[] = "expired";
+extern const char kEvictedChangeCause[] = "evicted";
+
+// Events
const char kOnChanged[] = "cookies.onChanged";
+// Errors
const char kCookieSetFailedError[] =
"Failed to parse or set cookie named \"*\".";
const char kInvalidStoreIdError[] = "Invalid cookie store id: \"*\".";