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

Unified Diff: chrome/browser/extensions/api/cookies/cookies_helpers.cc

Issue 10785017: Move CanonicalCookie into separate files (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added missing include Created 8 years, 5 months 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/api/cookies/cookies_helpers.cc
diff --git a/chrome/browser/extensions/api/cookies/cookies_helpers.cc b/chrome/browser/extensions/api/cookies/cookies_helpers.cc
index 55917d52a5bab6c618a6751211347d59ac86be9e..5bab1aa38badab5479fa57257f90978a9b8f26d6 100644
--- a/chrome/browser/extensions/api/cookies/cookies_helpers.cc
+++ b/chrome/browser/extensions/api/cookies/cookies_helpers.cc
@@ -20,6 +20,7 @@
#include "chrome/common/url_constants.h"
#include "content/public/browser/web_contents.h"
#include "googleurl/src/gurl.h"
+#include "net/cookies/canonical_cookie.h"
#include "net/cookies/cookie_util.h"
namespace extensions {
@@ -51,9 +52,8 @@ const char* GetStoreIdFromProfile(Profile* profile) {
kOffTheRecordProfileStoreId : kOriginalProfileStoreId;
}
-DictionaryValue* CreateCookieValue(
- const net::CookieMonster::CanonicalCookie& cookie,
- const std::string& store_id) {
+DictionaryValue* CreateCookieValue(const net::CanonicalCookie& cookie,
+ const std::string& store_id) {
DictionaryValue* result = new DictionaryValue();
// A cookie is a raw byte sequence. By explicitly parsing it as UTF8, we
@@ -103,8 +103,7 @@ void GetCookieListFromStore(
}
}
-GURL GetURLFromCanonicalCookie(
- const net::CookieMonster::CanonicalCookie& cookie) {
+GURL GetURLFromCanonicalCookie(const net::CanonicalCookie& cookie) {
const std::string& domain_key = cookie.Domain();
const std::string scheme =
cookie.IsSecure() ? chrome::kHttpsScheme : chrome::kHttpScheme;
@@ -149,8 +148,7 @@ MatchFilter::MatchFilter(const DictionaryValue* details)
DCHECK(details_);
}
-bool MatchFilter::MatchesCookie(
- const net::CookieMonster::CanonicalCookie& cookie) {
+bool MatchFilter::MatchesCookie(const net::CanonicalCookie& cookie) {
return MatchesString(keys::kNameKey, cookie.Name()) &&
MatchesDomain(cookie.Domain()) &&
MatchesString(keys::kPathKey, cookie.Path()) &&

Powered by Google App Engine
This is Rietveld 408576698