Index: net/extras/sqlite/sqlite_persistent_cookie_store_perftest.cc |
diff --git a/content/browser/net/sqlite_persistent_cookie_store_perftest.cc b/net/extras/sqlite/sqlite_persistent_cookie_store_perftest.cc |
similarity index 88% |
rename from content/browser/net/sqlite_persistent_cookie_store_perftest.cc |
rename to net/extras/sqlite/sqlite_persistent_cookie_store_perftest.cc |
index 7421bf15a96dbee1ababe2b892e0871c1c588137..b6dfc846e665d1163b4a76f5ad330a0d677a3069 100644 |
--- a/content/browser/net/sqlite_persistent_cookie_store_perftest.cc |
+++ b/net/extras/sqlite/sqlite_persistent_cookie_store_perftest.cc |
@@ -2,11 +2,12 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#include "content/browser/net/sqlite_persistent_cookie_store.h" |
+#include "net/extras/sqlite/sqlite_persistent_cookie_store.h" |
Ryan Sleevi
2015/05/12 00:48:34
IWYU: vector (line 39)
rohitrao (ping after 24h)
2015/05/13 17:05:08
Done.
|
#include "base/bind.h" |
#include "base/compiler_specific.h" |
#include "base/files/scoped_temp_dir.h" |
+#include "base/message_loop/message_loop.h" |
#include "base/sequenced_task_runner.h" |
#include "base/strings/stringprintf.h" |
#include "base/synchronization/waitable_event.h" |
@@ -19,7 +20,7 @@ |
#include "testing/gtest/include/gtest/gtest.h" |
#include "url/gurl.h" |
-namespace content { |
+namespace net { |
namespace { |
@@ -35,12 +36,12 @@ class SQLitePersistentCookieStorePerfTest : public testing::Test { |
key_loaded_event_(false, false) { |
} |
- void OnLoaded(const std::vector<net::CanonicalCookie*>& cookies) { |
+ void OnLoaded(const std::vector<CanonicalCookie*>& cookies) { |
cookies_ = cookies; |
loaded_event_.Signal(); |
} |
- void OnKeyLoaded(const std::vector<net::CanonicalCookie*>& cookies) { |
+ void OnKeyLoaded(const std::vector<CanonicalCookie*>& cookies) { |
cookies_ = cookies; |
key_loaded_event_.Signal(); |
} |
@@ -67,8 +68,8 @@ class SQLitePersistentCookieStorePerfTest : public testing::Test { |
temp_dir_.path().Append(cookie_filename), |
client_task_runner(), |
background_task_runner(), |
- false, NULL, NULL); |
- std::vector<net::CanonicalCookie*> cookies; |
+ false, NULL); |
+ std::vector<CanonicalCookie*> cookies; |
Load(); |
ASSERT_EQ(0u, cookies_.size()); |
// Creates 15000 cookies from 300 eTLD+1s. |
@@ -78,9 +79,9 @@ class SQLitePersistentCookieStorePerfTest : public testing::Test { |
GURL gurl("www" + domain_name); |
for (int cookie_num = 0; cookie_num < 50; ++cookie_num) { |
t += base::TimeDelta::FromInternalValue(10); |
- store_->AddCookie(net::CanonicalCookie( |
+ store_->AddCookie(CanonicalCookie( |
gurl, base::StringPrintf("Cookie_%d", cookie_num), "1", domain_name, |
- "/", t, t, t, false, false, false, net::COOKIE_PRIORITY_DEFAULT)); |
+ "/", t, t, t, false, false, false, COOKIE_PRIORITY_DEFAULT)); |
} |
} |
// Replace the store effectively destroying the current one and forcing it |
@@ -96,7 +97,7 @@ class SQLitePersistentCookieStorePerfTest : public testing::Test { |
temp_dir_.path().Append(cookie_filename), |
client_task_runner(), |
background_task_runner(), |
- false, NULL, NULL); |
+ false, NULL); |
} |
void TearDown() override { |
@@ -105,10 +106,11 @@ class SQLitePersistentCookieStorePerfTest : public testing::Test { |
} |
protected: |
+ base::MessageLoop main_loop_; |
scoped_ptr<base::SequencedWorkerPoolOwner> pool_owner_; |
base::WaitableEvent loaded_event_; |
base::WaitableEvent key_loaded_event_; |
- std::vector<net::CanonicalCookie*> cookies_; |
+ std::vector<CanonicalCookie*> cookies_; |
base::ScopedTempDir temp_dir_; |
scoped_refptr<SQLitePersistentCookieStore> store_; |
}; |
@@ -138,4 +140,4 @@ TEST_F(SQLitePersistentCookieStorePerfTest, TestLoadPerformance) { |
ASSERT_EQ(15000U, cookies_.size()); |
} |
-} // namespace content |
+} // namespace net |