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

Side by Side Diff: net/base/cookie_monster_perftest.cc

Issue 8289028: Revert 105639 - The change list splits loading of cookies from DB by the domain key(eTLD+1). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 2 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 | « net/base/cookie_monster.cc ('k') | net/base/cookie_monster_store_test.h » ('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 <algorithm> 5 #include <algorithm>
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/perftimer.h" 9 #include "base/perftimer.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 public: 56 public:
57 BaseCallback() : has_run_(false) {} 57 BaseCallback() : has_run_(false) {}
58 58
59 protected: 59 protected:
60 void WaitForCallback() { 60 void WaitForCallback() {
61 // Note that the performance tests currently all operate on a loaded cookie 61 // Note that the performance tests currently all operate on a loaded cookie
62 // store (or, more precisely, one that has no backing persistent store). 62 // store (or, more precisely, one that has no backing persistent store).
63 // Therefore, callbacks will actually always complete synchronously. If the 63 // Therefore, callbacks will actually always complete synchronously. If the
64 // tests get more advanced we need to add other means of signaling 64 // tests get more advanced we need to add other means of signaling
65 // completion. 65 // completion.
66 MessageLoop::current()->RunAllPending();
67 EXPECT_TRUE(has_run_); 66 EXPECT_TRUE(has_run_);
68 has_run_ = false; 67 has_run_ = false;
69 } 68 }
70 69
71 void Run() { 70 void Run() {
72 has_run_ = true; 71 has_run_ = true;
73 } 72 }
74 73
75 bool has_run_; 74 bool has_run_;
76 }; 75 };
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after
421 setCookieCallback.SetCookie(cm, gurl, cookie_line); 420 setCookieCallback.SetCookie(cm, gurl, cookie_line);
422 421
423 PerfTimeLogger timer((std::string("GC_") + test_case.name).c_str()); 422 PerfTimeLogger timer((std::string("GC_") + test_case.name).c_str());
424 for (int i = 0; i < kNumCookies; i++) 423 for (int i = 0; i < kNumCookies; i++)
425 setCookieCallback.SetCookie(cm, gurl, cookie_line); 424 setCookieCallback.SetCookie(cm, gurl, cookie_line);
426 timer.Done(); 425 timer.Done();
427 } 426 }
428 } 427 }
429 428
430 } // namespace 429 } // namespace
OLDNEW
« no previous file with comments | « net/base/cookie_monster.cc ('k') | net/base/cookie_monster_store_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698