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

Side by Side Diff: net/extras/sqlite/sqlite_persistent_cookie_store_perftest.cc

Issue 1893083002: Change scoped_ptr to std::unique_ptr in //net. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: scopedptr-net-all: iwyu Created 4 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "net/extras/sqlite/sqlite_persistent_cookie_store.h" 5 #include "net/extras/sqlite/sqlite_persistent_cookie_store.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 temp_dir_.path().Append(cookie_filename), client_task_runner(), 97 temp_dir_.path().Append(cookie_filename), client_task_runner(),
98 background_task_runner(), false, NULL); 98 background_task_runner(), false, NULL);
99 } 99 }
100 100
101 void TearDown() override { 101 void TearDown() override {
102 store_ = NULL; 102 store_ = NULL;
103 } 103 }
104 104
105 protected: 105 protected:
106 base::MessageLoop main_loop_; 106 base::MessageLoop main_loop_;
107 scoped_ptr<base::SequencedWorkerPoolOwner> pool_owner_; 107 std::unique_ptr<base::SequencedWorkerPoolOwner> pool_owner_;
108 base::WaitableEvent loaded_event_; 108 base::WaitableEvent loaded_event_;
109 base::WaitableEvent key_loaded_event_; 109 base::WaitableEvent key_loaded_event_;
110 std::vector<CanonicalCookie*> cookies_; 110 std::vector<CanonicalCookie*> cookies_;
111 base::ScopedTempDir temp_dir_; 111 base::ScopedTempDir temp_dir_;
112 scoped_refptr<SQLitePersistentCookieStore> store_; 112 scoped_refptr<SQLitePersistentCookieStore> store_;
113 }; 113 };
114 114
115 // Test the performance of priority load of cookies for a specfic domain key 115 // Test the performance of priority load of cookies for a specfic domain key
116 TEST_F(SQLitePersistentCookieStorePerfTest, TestLoadForKeyPerformance) { 116 TEST_F(SQLitePersistentCookieStorePerfTest, TestLoadForKeyPerformance) {
117 for (int domain_num = 0; domain_num < 3; ++domain_num) { 117 for (int domain_num = 0; domain_num < 3; ++domain_num) {
(...skipping 14 matching lines...) Expand all
132 // Test the performance of load 132 // Test the performance of load
133 TEST_F(SQLitePersistentCookieStorePerfTest, TestLoadPerformance) { 133 TEST_F(SQLitePersistentCookieStorePerfTest, TestLoadPerformance) {
134 base::PerfTimeLogger timer("Load all cookies"); 134 base::PerfTimeLogger timer("Load all cookies");
135 Load(); 135 Load();
136 timer.Done(); 136 timer.Done();
137 137
138 ASSERT_EQ(15000U, cookies_.size()); 138 ASSERT_EQ(15000U, cookies_.size());
139 } 139 }
140 140
141 } // namespace net 141 } // namespace net
OLDNEW
« no previous file with comments | « net/extras/sqlite/sqlite_persistent_cookie_store.cc ('k') | net/extras/sqlite/sqlite_persistent_cookie_store_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698