summaryrefslogtreecommitdiffstats
path: root/chrome/browser
diff options
context:
space:
mode:
authoraa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-16 06:38:59 +0000
committeraa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-16 06:38:59 +0000
commit00804cab814e94ab48396b046e54479688be0a70 (patch)
treea3cae914d9b8038252cc116161f5ae4da2856c35 /chrome/browser
parent36eb3c99981fed7c57e4e7a802434b1c4d0f344c (diff)
downloadchromium_src-00804cab814e94ab48396b046e54479688be0a70.zip
chromium_src-00804cab814e94ab48396b046e54479688be0a70.tar.gz
chromium_src-00804cab814e94ab48396b046e54479688be0a70.tar.bz2
Unexperimentalify the cookies API.
BUG=41663,48726 Review URL: http://codereview.chromium.org/2982008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52623 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r--chrome/browser/extensions/extension_cookies_api.h20
-rw-r--r--chrome/browser/extensions/extension_cookies_api_constants.cc2
-rw-r--r--chrome/browser/extensions/extension_cookies_apitest.cc10
3 files changed, 15 insertions, 17 deletions
diff --git a/chrome/browser/extensions/extension_cookies_api.h b/chrome/browser/extensions/extension_cookies_api.h
index a250524..e783f31 100644
--- a/chrome/browser/extensions/extension_cookies_api.h
+++ b/chrome/browser/extensions/extension_cookies_api.h
@@ -87,12 +87,12 @@ class CookiesFunction : public AsyncExtensionFunction {
std::string* store_id);
};
-// Implements the experimental.cookies.get() extension function.
+// Implements the cookies.get() extension function.
class GetCookieFunction : public CookiesFunction {
public:
GetCookieFunction();
virtual bool RunImpl();
- DECLARE_EXTENSION_FUNCTION_NAME("experimental.cookies.get")
+ DECLARE_EXTENSION_FUNCTION_NAME("cookies.get")
private:
void GetCookieOnIOThread();
@@ -105,12 +105,12 @@ class GetCookieFunction : public CookiesFunction {
net::CookieMonster::CookieList cookie_list_;
};
-// Implements the experimental.cookies.getAll() extension function.
+// Implements the cookies.getAll() extension function.
class GetAllCookiesFunction : public CookiesFunction {
public:
GetAllCookiesFunction();
virtual bool RunImpl();
- DECLARE_EXTENSION_FUNCTION_NAME("experimental.cookies.getAll")
+ DECLARE_EXTENSION_FUNCTION_NAME("cookies.getAll")
private:
void GetAllCookiesOnIOThread();
@@ -123,12 +123,12 @@ class GetAllCookiesFunction : public CookiesFunction {
net::CookieMonster::CookieList cookie_list_;
};
-// Implements the experimental.cookies.set() extension function.
+// Implements the cookies.set() extension function.
class SetCookieFunction : public CookiesFunction {
public:
SetCookieFunction();
virtual bool RunImpl();
- DECLARE_EXTENSION_FUNCTION_NAME("experimental.cookies.set")
+ DECLARE_EXTENSION_FUNCTION_NAME("cookies.set")
private:
void SetCookieOnIOThread();
@@ -146,7 +146,7 @@ class SetCookieFunction : public CookiesFunction {
scoped_refptr<URLRequestContextGetter> store_context_;
};
-// Implements the experimental.cookies.remove() extension function.
+// Implements the cookies.remove() extension function.
class RemoveCookieFunction : public CookiesFunction {
public:
virtual bool RunImpl();
@@ -154,10 +154,10 @@ class RemoveCookieFunction : public CookiesFunction {
virtual void Run() {
SendResponse(RunImpl());
}
- DECLARE_EXTENSION_FUNCTION_NAME("experimental.cookies.remove")
+ DECLARE_EXTENSION_FUNCTION_NAME("cookies.remove")
};
-// Implements the experimental.cookies.getAllCookieStores() extension function.
+// Implements the cookies.getAllCookieStores() extension function.
class GetAllCookieStoresFunction : public CookiesFunction {
public:
virtual bool RunImpl();
@@ -165,7 +165,7 @@ class GetAllCookieStoresFunction : public CookiesFunction {
virtual void Run() {
SendResponse(RunImpl());
}
- DECLARE_EXTENSION_FUNCTION_NAME("experimental.cookies.getAllCookieStores")
+ DECLARE_EXTENSION_FUNCTION_NAME("cookies.getAllCookieStores")
};
#endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_COOKIES_API_H_
diff --git a/chrome/browser/extensions/extension_cookies_api_constants.cc b/chrome/browser/extensions/extension_cookies_api_constants.cc
index e77482b..1524d36 100644
--- a/chrome/browser/extensions/extension_cookies_api_constants.cc
+++ b/chrome/browser/extensions/extension_cookies_api_constants.cc
@@ -22,7 +22,7 @@ const wchar_t kTabIdsKey[] = L"tabIds";
const wchar_t kUrlKey[] = L"url";
const wchar_t kValueKey[] = L"value";
-const char kOnChanged[] = "experimental.cookies.onChanged";
+const char kOnChanged[] = "cookies.onChanged";
const char kCookieSetFailedError[] =
"Failed to parse or set cookie named \"*\".";
diff --git a/chrome/browser/extensions/extension_cookies_apitest.cc b/chrome/browser/extensions/extension_cookies_apitest.cc
index 396f8c7..1da9500 100644
--- a/chrome/browser/extensions/extension_cookies_apitest.cc
+++ b/chrome/browser/extensions/extension_cookies_apitest.cc
@@ -7,15 +7,13 @@
#include "chrome/common/chrome_switches.h"
IN_PROC_BROWSER_TEST_F(ExtensionApiTest, Cookies) {
- CommandLine::ForCurrentProcess()->AppendSwitch(
- switches::kEnableExperimentalExtensionApis);
-
ASSERT_TRUE(RunExtensionTest("cookies/api")) << message_;
}
IN_PROC_BROWSER_TEST_F(ExtensionApiTest, CookiesEvents) {
- CommandLine::ForCurrentProcess()->AppendSwitch(
- switches::kEnableExperimentalExtensionApis);
-
ASSERT_TRUE(RunExtensionTest("cookies/events")) << message_;
}
+
+IN_PROC_BROWSER_TEST_F(ExtensionApiTest, CookiesNoPermission) {
+ ASSERT_TRUE(RunExtensionTest("cookies/no_permission")) << message_;
+}