Chromium Code Reviews| Index: chrome/browser/extensions/api/cookies/cookies_helpers.h |
| diff --git a/chrome/browser/extensions/api/cookies/cookies_helpers.h b/chrome/browser/extensions/api/cookies/cookies_helpers.h |
| index 86dd5d90a73649ed417ab5a74025c887df888acb..f4317d8c7fd06c858dcc1b4fda91a736697cded4 100644 |
| --- a/chrome/browser/extensions/api/cookies/cookies_helpers.h |
| +++ b/chrome/browser/extensions/api/cookies/cookies_helpers.h |
| @@ -13,8 +13,6 @@ |
| #include <string> |
| #include <vector> |
| -#include "base/memory/linked_ptr.h" |
| -#include "base/memory/scoped_ptr.h" |
| #include "chrome/common/extensions/api/cookies.h" |
| #include "net/cookies/cookie_monster.h" |
| #include "net/cookies/canonical_cookie.h" |
| @@ -37,9 +35,6 @@ class Extension; |
| namespace cookies_helpers { |
| -typedef std::vector<linked_ptr<extensions::api::cookies::Cookie> > |
| - LinkedCookieVec; |
| - |
| // Returns either the original profile or the incognito profile, based on the |
| // given store ID. Returns NULL if the profile doesn't exist or is not allowed |
| // (e.g. if incognito mode is not enabled for the extension). |
| @@ -52,21 +47,20 @@ const char* GetStoreIdFromProfile(Profile* profile); |
| // Allocates and construct a new Cookie object representing a cookie as defined |
|
asargent_no_longer_on_chrome
2016/03/23 19:54:25
"construct" should be "constructs", and I suppose
Devlin
2016/03/24 19:57:57
Done.
|
| // by the cookies API. |
| -scoped_ptr<extensions::api::cookies::Cookie> CreateCookie( |
| - const net::CanonicalCookie& cookie, |
| - const std::string& store_id); |
| +api::cookies::Cookie CreateCookie(const net::CanonicalCookie& cookie, |
| + const std::string& store_id); |
| // Allocates and constructs a new CookieStore object as defined by the cookies |
|
asargent_no_longer_on_chrome
2016/03/23 19:54:25
same thing here re:Allocates
Devlin
2016/03/24 19:57:57
Done.
|
| // API. |
| -scoped_ptr<extensions::api::cookies::CookieStore> CreateCookieStore( |
| - Profile* profile, |
| - base::ListValue* tab_ids); |
| +api::cookies::CookieStore CreateCookieStore(Profile* profile, |
| + base::ListValue* tab_ids); |
| // Retrieves all cookies from the given cookie store corresponding to the given |
| // URL. If the URL is empty, all cookies in the cookie store are retrieved. |
| // This can only be called on the IO thread. |
| void GetCookieListFromStore( |
| - net::CookieStore* cookie_store, const GURL& url, |
| + net::CookieStore* cookie_store, |
| + const GURL& url, |
| const net::CookieMonster::GetCookieListCallback& callback); |
| // Constructs a URL from a cookie's information for use in checking |
| @@ -80,9 +74,11 @@ GURL GetURLFromCanonicalCookie( |
| // match vector all the cookies that both match the given URL and cookie details |
| // and are allowed by extension host permissions. |
| void AppendMatchingCookiesToVector( |
| - const net::CookieList& all_cookies, const GURL& url, |
| - const extensions::api::cookies::GetAll::Params::Details* details, |
| - const Extension* extension, LinkedCookieVec* match_vector); |
| + const net::CookieList& all_cookies, |
| + const GURL& url, |
| + const api::cookies::GetAll::Params::Details* details, |
| + const Extension* extension, |
| + std::vector<api::cookies::Cookie>* match_vector); |
| // Appends the IDs of all tabs belonging to the given browser to the |
| // given list. |
| @@ -99,8 +95,7 @@ class MatchFilter { |
| // Takes the details dictionary argument given by the user as input. |
| // This class does not take ownership of the lifetime of the Details |
| // object. |
| - explicit MatchFilter( |
| - const extensions::api::cookies::GetAll::Params::Details* details); |
| + explicit MatchFilter(const api::cookies::GetAll::Params::Details* details); |
| // Returns true if the given cookie matches the properties in the match |
| // filter. |
| @@ -116,7 +111,7 @@ class MatchFilter { |
| // 'foo.bar.com', '.foo.bar.com', and 'baz.foo.bar.com'. |
| bool MatchesDomain(const std::string& domain); |
| - const extensions::api::cookies::GetAll::Params::Details* details_; |
| + const api::cookies::GetAll::Params::Details* details_; |
| }; |
| } // namespace cookies_helpers |