| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Defines the Chrome Extensions Cookies API functions for accessing internet | 5 // Defines the Chrome Extensions Cookies API functions for accessing internet |
| 6 // cookies, as specified in the extension API JSON. | 6 // cookies, as specified in the extension API JSON. |
| 7 | 7 |
| 8 #ifndef CHROME_BROWSER_EXTENSIONS_API_COOKIES_COOKIES_API_H_ | 8 #ifndef CHROME_BROWSER_EXTENSIONS_API_COOKIES_COOKIES_API_H_ |
| 9 #define CHROME_BROWSER_EXTENSIONS_API_COOKIES_COOKIES_API_H_ | 9 #define CHROME_BROWSER_EXTENSIONS_API_COOKIES_COOKIES_API_H_ |
| 10 | 10 |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 // ExtensionFunction: | 186 // ExtensionFunction: |
| 187 virtual bool RunImpl() OVERRIDE; | 187 virtual bool RunImpl() OVERRIDE; |
| 188 | 188 |
| 189 private: | 189 private: |
| 190 void RemoveCookieOnIOThread(); | 190 void RemoveCookieOnIOThread(); |
| 191 void RespondOnUIThread(); | 191 void RespondOnUIThread(); |
| 192 void RemoveCookieCallback(); | 192 void RemoveCookieCallback(); |
| 193 | 193 |
| 194 GURL url_; | 194 GURL url_; |
| 195 std::string name_; | 195 std::string name_; |
| 196 bool success_; | |
| 197 std::string store_id_; | 196 std::string store_id_; |
| 198 scoped_refptr<net::URLRequestContextGetter> store_context_; | 197 scoped_refptr<net::URLRequestContextGetter> store_context_; |
| 199 }; | 198 }; |
| 200 | 199 |
| 201 // Implements the cookies.getAllCookieStores() extension function. | 200 // Implements the cookies.getAllCookieStores() extension function. |
| 202 class GetAllCookieStoresFunction : public CookiesFunction { | 201 class GetAllCookieStoresFunction : public CookiesFunction { |
| 203 public: | 202 public: |
| 204 DECLARE_EXTENSION_FUNCTION_NAME("cookies.getAllCookieStores") | 203 DECLARE_EXTENSION_FUNCTION_NAME("cookies.getAllCookieStores") |
| 205 | 204 |
| 206 protected: | 205 protected: |
| 207 virtual ~GetAllCookieStoresFunction() {} | 206 virtual ~GetAllCookieStoresFunction() {} |
| 208 | 207 |
| 209 // ExtensionFunction: | 208 // ExtensionFunction: |
| 210 // GetAllCookieStoresFunction is sync. | 209 // GetAllCookieStoresFunction is sync. |
| 211 virtual void Run() OVERRIDE; | 210 virtual void Run() OVERRIDE; |
| 212 virtual bool RunImpl() OVERRIDE; | 211 virtual bool RunImpl() OVERRIDE; |
| 213 }; | 212 }; |
| 214 | 213 |
| 215 } // namespace extensions | 214 } // namespace extensions |
| 216 | 215 |
| 217 #endif // CHROME_BROWSER_EXTENSIONS_API_COOKIES_COOKIES_API_H_ | 216 #endif // CHROME_BROWSER_EXTENSIONS_API_COOKIES_COOKIES_API_H_ |
| OLD | NEW |