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

Side by Side Diff: net/base/cookie_monster.h

Issue 345012: Change update threshold in CookieMonster for testing from 1s to 20ms. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 1 month 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 | net/base/cookie_monster_unittest.cc » ('j') | net/base/cookie_monster_unittest.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 // Brought to you by the letter D and the number 2. 5 // Brought to you by the letter D and the number 2.
6 6
7 #ifndef NET_BASE_COOKIE_MONSTER_H_ 7 #ifndef NET_BASE_COOKIE_MONSTER_H_
8 #define NET_BASE_COOKIE_MONSTER_H_ 8 #define NET_BASE_COOKIE_MONSTER_H_
9 9
10 #include <map> 10 #include <map>
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 53
54 CookieMonster(); 54 CookieMonster();
55 55
56 // The store passed in should not have had Init() called on it yet. This class 56 // The store passed in should not have had Init() called on it yet. This class
57 // will take care of initializing it. The backing store is NOT owned by this 57 // will take care of initializing it. The backing store is NOT owned by this
58 // class, but it must remain valid for the duration of the cookie monster's 58 // class, but it must remain valid for the duration of the cookie monster's
59 // existence. 59 // existence.
60 CookieMonster(PersistentCookieStore* store); 60 CookieMonster(PersistentCookieStore* store);
61 61
62 #ifdef UNIT_TEST 62 #ifdef UNIT_TEST
63 CookieMonster(int last_access_threshold_seconds) 63 CookieMonster(int last_access_threshold_milliseconds)
64 : initialized_(false), 64 : initialized_(false),
65 store_(NULL), 65 store_(NULL),
66 last_access_threshold_( 66 last_access_threshold_(base::TimeDelta::FromMilliseconds(
67 base::TimeDelta::FromSeconds(last_access_threshold_seconds)) { 67 last_access_threshold_milliseconds)) {
68 SetDefaultCookieableSchemes(); 68 SetDefaultCookieableSchemes();
69 } 69 }
70 #endif 70 #endif
71 71
72 ~CookieMonster(); 72 ~CookieMonster();
73 73
74 // Parse the string with the cookie time (very forgivingly). 74 // Parse the string with the cookie time (very forgivingly).
75 static base::Time ParseCookieTime(const std::string& time_string); 75 static base::Time ParseCookieTime(const std::string& time_string);
76 76
77 // CookieStore implementation. 77 // CookieStore implementation.
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
386 protected: 386 protected:
387 PersistentCookieStore() { } 387 PersistentCookieStore() { }
388 388
389 private: 389 private:
390 DISALLOW_COPY_AND_ASSIGN(PersistentCookieStore); 390 DISALLOW_COPY_AND_ASSIGN(PersistentCookieStore);
391 }; 391 };
392 392
393 } // namespace net 393 } // namespace net
394 394
395 #endif // NET_BASE_COOKIE_MONSTER_H_ 395 #endif // NET_BASE_COOKIE_MONSTER_H_
OLDNEW
« no previous file with comments | « no previous file | net/base/cookie_monster_unittest.cc » ('j') | net/base/cookie_monster_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698