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

Side by Side Diff: chrome/browser/net/sqlite_persistent_cookie_store_perftest.cc

Issue 9897002: Fix some grammar in chrome/browser/net (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: catch up to head Created 8 years, 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/net/sqlite_persistent_cookie_store_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/bind.h" 5 #include "base/bind.h"
6 #include "base/message_loop.h" 6 #include "base/message_loop.h"
7 #include "base/perftimer.h" 7 #include "base/perftimer.h"
8 #include "base/scoped_temp_dir.h" 8 #include "base/scoped_temp_dir.h"
9 #include "base/stringprintf.h" 9 #include "base/stringprintf.h"
10 #include "base/synchronization/waitable_event.h" 10 #include "base/synchronization/waitable_event.h"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 for (int cookie_num = 0; cookie_num < 50; ++cookie_num) { 61 for (int cookie_num = 0; cookie_num < 50; ++cookie_num) {
62 t += base::TimeDelta::FromInternalValue(10); 62 t += base::TimeDelta::FromInternalValue(10);
63 store_->AddCookie( 63 store_->AddCookie(
64 net::CookieMonster::CanonicalCookie(gurl, 64 net::CookieMonster::CanonicalCookie(gurl,
65 base::StringPrintf("Cookie_%d", cookie_num), "1", 65 base::StringPrintf("Cookie_%d", cookie_num), "1",
66 domain_name, "/", std::string(), std::string(), 66 domain_name, "/", std::string(), std::string(),
67 t, t, t, false, false, true)); 67 t, t, t, false, false, true));
68 } 68 }
69 } 69 }
70 // Replace the store effectively destroying the current one and forcing it 70 // Replace the store effectively destroying the current one and forcing it
71 // to write it's data to disk. 71 // to write its data to disk.
72 store_ = NULL; 72 store_ = NULL;
73 scoped_refptr<base::ThreadTestHelper> helper( 73 scoped_refptr<base::ThreadTestHelper> helper(
74 new base::ThreadTestHelper( 74 new base::ThreadTestHelper(
75 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::DB))); 75 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::DB)));
76 // Make sure we wait until the destructor has run. 76 // Make sure we wait until the destructor has run.
77 ASSERT_TRUE(helper->Run()); 77 ASSERT_TRUE(helper->Run());
78 78
79 store_ = new SQLitePersistentCookieStore( 79 store_ = new SQLitePersistentCookieStore(
80 temp_dir_.path().Append(chrome::kCookieFilename)); 80 temp_dir_.path().Append(chrome::kCookieFilename));
81 } 81 }
(...skipping 25 matching lines...) Expand all
107 } 107 }
108 108
109 // Test the performance of load 109 // Test the performance of load
110 TEST_F(SQLitePersistentCookieStorePerfTest, TestLoadPerformance) { 110 TEST_F(SQLitePersistentCookieStorePerfTest, TestLoadPerformance) {
111 PerfTimeLogger timer("Load all cookies"); 111 PerfTimeLogger timer("Load all cookies");
112 Load(); 112 Load();
113 timer.Done(); 113 timer.Done();
114 114
115 ASSERT_EQ(15000U, cookies_.size()); 115 ASSERT_EQ(15000U, cookies_.size());
116 } 116 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/net/sqlite_persistent_cookie_store_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698