summaryrefslogtreecommitdiffstats
path: root/chrome/browser/net
diff options
context:
space:
mode:
authorrogerta@chromium.org <rogerta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-24 15:34:16 +0000
committerrogerta@chromium.org <rogerta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-24 15:34:16 +0000
commit11994d0899201781f497da941f15175cdf28b93b (patch)
tree77ee59ac30ca177584eb5d25fae92ca036148214 /chrome/browser/net
parentcd0efd27fc8fe1c8979ea8d5dd924c3c6a059405 (diff)
downloadchromium_src-11994d0899201781f497da941f15175cdf28b93b.zip
chromium_src-11994d0899201781f497da941f15175cdf28b93b.tar.gz
chromium_src-11994d0899201781f497da941f15175cdf28b93b.tar.bz2
Show the origin of the site setting the cookie instead of the domain of the
cookie. BUG=63662 TEST=see repro steps in bug report, including expected result Review URL: http://codereview.chromium.org/6524024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75890 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/net')
-rw-r--r--chrome/browser/net/sqlite_persistent_cookie_store.cc3
-rw-r--r--chrome/browser/net/sqlite_persistent_cookie_store_unittest.cc9
2 files changed, 8 insertions, 4 deletions
diff --git a/chrome/browser/net/sqlite_persistent_cookie_store.cc b/chrome/browser/net/sqlite_persistent_cookie_store.cc
index 734e00b..9eb7a0a 100644
--- a/chrome/browser/net/sqlite_persistent_cookie_store.cc
+++ b/chrome/browser/net/sqlite_persistent_cookie_store.cc
@@ -20,6 +20,7 @@
#include "base/threading/thread.h"
#include "chrome/browser/browser_thread.h"
#include "chrome/browser/diagnostics/sqlite_diagnostics.h"
+#include "googleurl/src/gurl.h"
using base::Time;
@@ -185,6 +186,8 @@ bool SQLitePersistentCookieStore::Backend::Load(
while (smt.Step()) {
scoped_ptr<net::CookieMonster::CanonicalCookie> cc(
new net::CookieMonster::CanonicalCookie(
+ // The "source" URL is not used with persisted cookies.
+ GURL(), // Source
smt.ColumnString(2), // name
smt.ColumnString(3), // value
smt.ColumnString(1), // domain
diff --git a/chrome/browser/net/sqlite_persistent_cookie_store_unittest.cc b/chrome/browser/net/sqlite_persistent_cookie_store_unittest.cc
index 4ce2e53..3299c39 100644
--- a/chrome/browser/net/sqlite_persistent_cookie_store_unittest.cc
+++ b/chrome/browser/net/sqlite_persistent_cookie_store_unittest.cc
@@ -34,8 +34,8 @@ class SQLitePersistentCookieStoreTest : public testing::Test {
ASSERT_TRUE(0 == cookies.size());
// Make sure the store gets written at least once.
store_->AddCookie(
- net::CookieMonster::CanonicalCookie("A", "B", "http://foo.bar", "/",
- false, false,
+ net::CookieMonster::CanonicalCookie(GURL(), "A", "B", "http://foo.bar",
+ "/", false, false,
base::Time::Now(),
base::Time::Now(),
true, base::Time::Now()));
@@ -128,8 +128,9 @@ TEST_F(SQLitePersistentCookieStoreTest, TestFlush) {
std::string name(1, c);
std::string value(1000, c);
store_->AddCookie(
- net::CookieMonster::CanonicalCookie(name, value, "http://foo.bar", "/",
- false, false, t, t, true, t));
+ net::CookieMonster::CanonicalCookie(GURL(), name, value,
+ "http://foo.bar", "/", false, false,
+ t, t, true, t));
}
// Call Flush() and wait until the DB thread is idle.