summaryrefslogtreecommitdiff
path: root/chromium/content/browser/net
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2017-01-04 14:17:57 +0100
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2017-01-05 10:05:06 +0000
commit39d357e3248f80abea0159765ff39554affb40db (patch)
treeaba0e6bfb76de0244bba0f5fdbd64b830dd6e621 /chromium/content/browser/net
parent87778abf5a1f89266f37d1321b92a21851d8244d (diff)
downloadqtwebengine-chromium-39d357e3248f80abea0159765ff39554affb40db.tar.gz
BASELINE: Update Chromium to 55.0.2883.105
And updates ninja to 1.7.2 Change-Id: I20d43c737f82764d857ada9a55586901b18b9243 Reviewed-by: Michael BrĂ¼ning <michael.bruning@qt.io>
Diffstat (limited to 'chromium/content/browser/net')
-rw-r--r--chromium/content/browser/net/quota_policy_cookie_store.cc4
-rw-r--r--chromium/content/browser/net/quota_policy_cookie_store_unittest.cc32
2 files changed, 17 insertions, 19 deletions
diff --git a/chromium/content/browser/net/quota_policy_cookie_store.cc b/chromium/content/browser/net/quota_policy_cookie_store.cc
index c2ab6b079a1..28edfbf170f 100644
--- a/chromium/content/browser/net/quota_policy_cookie_store.cc
+++ b/chromium/content/browser/net/quota_policy_cookie_store.cc
@@ -98,7 +98,7 @@ void QuotaPolicyCookieStore::Flush(const base::Closure& callback) {
void QuotaPolicyCookieStore::OnLoad(
const LoadedCallback& loaded_callback,
const std::vector<net::CanonicalCookie*>& cookies) {
- for (const auto& cookie : cookies) {
+ for (auto* cookie : cookies) {
net::SQLitePersistentCookieStore::CookieOrigin origin(
cookie->Domain(), cookie->IsSecure());
++cookies_per_origin_[origin];
@@ -149,7 +149,7 @@ std::unique_ptr<net::CookieStore> CreateCookieStore(
if (!client_task_runner.get()) {
client_task_runner =
- BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO);
+ BrowserThread::GetTaskRunnerForThread(BrowserThread::IO);
}
if (!background_task_runner.get()) {
diff --git a/chromium/content/browser/net/quota_policy_cookie_store_unittest.cc b/chromium/content/browser/net/quota_policy_cookie_store_unittest.cc
index 59d97fe89a0..436728eb383 100644
--- a/chromium/content/browser/net/quota_policy_cookie_store_unittest.cc
+++ b/chromium/content/browser/net/quota_policy_cookie_store_unittest.cc
@@ -84,10 +84,8 @@ class QuotaPolicyCookieStoreTest : public testing::Test {
CanonicalCookieVector* cookies) {
scoped_refptr<net::SQLitePersistentCookieStore> sqlite_store(
new net::SQLitePersistentCookieStore(
- temp_dir_.path().Append(kTestCookiesFilename),
- client_task_runner(),
- background_task_runner(),
- true, nullptr));
+ temp_dir_.GetPath().Append(kTestCookiesFilename),
+ client_task_runner(), background_task_runner(), true, nullptr));
store_ = new QuotaPolicyCookieStore(sqlite_store.get(), storage_policy);
Load(cookies);
}
@@ -150,12 +148,12 @@ TEST_F(QuotaPolicyCookieStoreTest, TestPersistence) {
DestroyStore();
// Reload and test for persistence.
- STLDeleteElements(&cookies);
+ base::STLDeleteElements(&cookies);
CreateAndLoad(nullptr, &cookies);
EXPECT_EQ(2U, cookies.size());
bool found_foo_cookie = false;
bool found_persistent_cookie = false;
- for (const auto& cookie : cookies) {
+ for (auto* cookie : cookies) {
if (cookie->Domain() == "foo.com")
found_foo_cookie = true;
else if (cookie->Domain() == "persistent.com")
@@ -170,10 +168,10 @@ TEST_F(QuotaPolicyCookieStoreTest, TestPersistence) {
DestroyStore();
// Reload and check if the cookies have been removed.
- STLDeleteElements(&cookies);
+ base::STLDeleteElements(&cookies);
CreateAndLoad(nullptr, &cookies);
EXPECT_EQ(0U, cookies.size());
- STLDeleteElements(&cookies);
+ base::STLDeleteElements(&cookies);
}
// Test if data is stored as expected in the QuotaPolicy database.
@@ -201,7 +199,7 @@ TEST_F(QuotaPolicyCookieStoreTest, TestPolicy) {
net::cookie_util::CookieOriginToURL("nonpersistent.com", false));
// Reload and test for persistence.
- STLDeleteElements(&cookies);
+ base::STLDeleteElements(&cookies);
CreateAndLoad(storage_policy.get(), &cookies);
EXPECT_EQ(3U, cookies.size());
@@ -212,14 +210,14 @@ TEST_F(QuotaPolicyCookieStoreTest, TestPolicy) {
// Now close the store, and "nonpersistent.com" should be deleted according to
// policy.
DestroyStore();
- STLDeleteElements(&cookies);
+ base::STLDeleteElements(&cookies);
CreateAndLoad(nullptr, &cookies);
EXPECT_EQ(2U, cookies.size());
- for (const auto& cookie : cookies) {
+ for (auto* cookie : cookies) {
EXPECT_NE("nonpersistent.com", cookie->Domain());
}
- STLDeleteElements(&cookies);
+ base::STLDeleteElements(&cookies);
}
TEST_F(QuotaPolicyCookieStoreTest, ForceKeepSessionState) {
@@ -239,7 +237,7 @@ TEST_F(QuotaPolicyCookieStoreTest, ForceKeepSessionState) {
net::cookie_util::CookieOriginToURL("nonpersistent.com", false));
// Reload and test for persistence
- STLDeleteElements(&cookies);
+ base::STLDeleteElements(&cookies);
CreateAndLoad(storage_policy.get(), &cookies);
EXPECT_EQ(1U, cookies.size());
@@ -252,11 +250,11 @@ TEST_F(QuotaPolicyCookieStoreTest, ForceKeepSessionState) {
// deleted.
store_->SetForceKeepSessionState();
DestroyStore();
- STLDeleteElements(&cookies);
+ base::STLDeleteElements(&cookies);
CreateAndLoad(nullptr, &cookies);
EXPECT_EQ(3U, cookies.size());
- STLDeleteElements(&cookies);
+ base::STLDeleteElements(&cookies);
}
// Tests that the special storage policy is properly applied even when the store
@@ -282,11 +280,11 @@ TEST_F(QuotaPolicyCookieStoreTest, TestDestroyOnBackgroundThread) {
DestroyStoreOnBackgroundThread();
// Reload and test for persistence.
- STLDeleteElements(&cookies);
+ base::STLDeleteElements(&cookies);
CreateAndLoad(storage_policy.get(), &cookies);
EXPECT_EQ(0U, cookies.size());
- STLDeleteElements(&cookies);
+ base::STLDeleteElements(&cookies);
}
} // namespace