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

Side by Side Diff: chrome/browser/extensions/api/cookies/cookies_api.h

Issue 64273006: Move ExtensionFunction to the extensions component. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 59
60 DISALLOW_COPY_AND_ASSIGN(CookiesEventRouter); 60 DISALLOW_COPY_AND_ASSIGN(CookiesEventRouter);
61 }; 61 };
62 62
63 // Serves as a base class for all cookies API functions, and defines some 63 // Serves as a base class for all cookies API functions, and defines some
64 // common functionality for parsing cookies API function arguments. 64 // common functionality for parsing cookies API function arguments.
65 // Note that all of the functions in this file derive from 65 // Note that all of the functions in this file derive from
66 // AsyncExtensionFunction, and are not threadsafe, so they should not be 66 // AsyncExtensionFunction, and are not threadsafe, so they should not be
67 // concurrently accessed from multiple threads. They modify |result_| and other 67 // concurrently accessed from multiple threads. They modify |result_| and other
68 // member variables directly. 68 // member variables directly.
69 // See chrome/browser/extensions/extension_function.h for more information. 69 // See extensions/browser/extension_function.h for more information.
70 class CookiesFunction : public ChromeAsyncExtensionFunction { 70 class CookiesFunction : public ChromeAsyncExtensionFunction {
71 protected: 71 protected:
72 virtual ~CookiesFunction() {} 72 virtual ~CookiesFunction() {}
73 73
74 // Constructs a GURL from the given url string. Returns false and assigns the 74 // Constructs a GURL from the given url string. Returns false and assigns the
75 // internal error_ value if the URL is invalid. If |check_host_permissions| is 75 // internal error_ value if the URL is invalid. If |check_host_permissions| is
76 // true, the URL is also checked against the extension's host permissions, and 76 // true, the URL is also checked against the extension's host permissions, and
77 // if there is no permission for the URL, this function returns false. 77 // if there is no permission for the URL, this function returns false.
78 bool ParseUrl(const std::string& url_string, GURL* url, 78 bool ParseUrl(const std::string& url_string, GURL* url,
79 bool check_host_permissions); 79 bool check_host_permissions);
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 222
223 // Created lazily upon OnListenerAdded. 223 // Created lazily upon OnListenerAdded.
224 scoped_ptr<CookiesEventRouter> cookies_event_router_; 224 scoped_ptr<CookiesEventRouter> cookies_event_router_;
225 225
226 DISALLOW_COPY_AND_ASSIGN(CookiesAPI); 226 DISALLOW_COPY_AND_ASSIGN(CookiesAPI);
227 }; 227 };
228 228
229 } // namespace extensions 229 } // namespace extensions
230 230
231 #endif // CHROME_BROWSER_EXTENSIONS_API_COOKIES_COOKIES_API_H_ 231 #endif // CHROME_BROWSER_EXTENSIONS_API_COOKIES_COOKIES_API_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698