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

Unified Diff: chrome/browser/extensions/extension_cookies_helpers.cc

Issue 8468010: Creation of cookie_utils. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Indentation Created 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | net/base/cookie_monster.h » ('j') | net/base/cookie_utils.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_cookies_helpers.cc
diff --git a/chrome/browser/extensions/extension_cookies_helpers.cc b/chrome/browser/extensions/extension_cookies_helpers.cc
index a6fe7e94555ecfb7302d7d0ff5e7ac98458d469c..d7a0e3b1f3b73e14527626f3ae42509c96733f16 100644
--- a/chrome/browser/extensions/extension_cookies_helpers.cc
+++ b/chrome/browser/extensions/extension_cookies_helpers.cc
@@ -19,6 +19,7 @@
#include "chrome/common/extensions/extension.h"
#include "chrome/common/url_constants.h"
#include "googleurl/src/gurl.h"
+#include "net/base/cookie_utils.h"
namespace keys = extension_cookies_api_constants;
@@ -59,7 +60,7 @@ DictionaryValue* CreateCookieValue(
result->SetString(keys::kValueKey, UTF8ToUTF16(cookie.Value()));
result->SetString(keys::kDomainKey, cookie.Domain());
result->SetBoolean(keys::kHostOnlyKey,
- net::CookieMonster::DomainIsHostOnly(cookie.Domain()));
+ net::cookie_utils::DomainIsHostOnly(cookie.Domain()));
// A non-UTF8 path is invalid, so we just replace it with an empty string.
result->SetString(keys::kPathKey,
@@ -178,12 +179,12 @@ bool MatchFilter::MatchesDomain(const std::string& domain) {
if (!details_->GetString(keys::kDomainKey, &filter_value))
return false;
// Add a leading '.' character to the filter domain if it doesn't exist.
- if (net::CookieMonster::DomainIsHostOnly(filter_value))
+ if (net::cookie_utils::DomainIsHostOnly(filter_value))
filter_value.insert(0, ".");
std::string sub_domain(domain);
// Strip any leading '.' character from the input cookie domain.
- if (!net::CookieMonster::DomainIsHostOnly(sub_domain))
+ if (!net::cookie_utils::DomainIsHostOnly(sub_domain))
sub_domain = sub_domain.substr(1);
// Now check whether the domain argument is a subdomain of the filter domain.
« no previous file with comments | « no previous file | net/base/cookie_monster.h » ('j') | net/base/cookie_utils.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698