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

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

Issue 8537016: Add/change metrics for cookie store loading: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove race condition handling. Created 9 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 | « chrome/browser/net/sqlite_persistent_cookie_store.cc ('k') | net/base/cookie_monster.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 // 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 #pragma once 9 #pragma once
10 10
(...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after
455 initialized_ = true; 455 initialized_ = true;
456 } 456 }
457 } 457 }
458 458
459 // Initializes the backing store and reads existing cookies from it. 459 // Initializes the backing store and reads existing cookies from it.
460 // Should only be called by InitIfNecessary(). 460 // Should only be called by InitIfNecessary().
461 void InitStore(); 461 void InitStore();
462 462
463 // Stores cookies loaded from the backing store and invokes any deferred 463 // Stores cookies loaded from the backing store and invokes any deferred
464 // calls. |beginning_time| should be the moment PersistentCookieStore::Load 464 // calls. |beginning_time| should be the moment PersistentCookieStore::Load
465 // was invoked and is used for reporting histogram_time_load_. 465 // was invoked and is used for reporting histogram_time_blocked_on_load_.
466 // See PersistentCookieStore::Load for details on the contents of cookies. 466 // See PersistentCookieStore::Load for details on the contents of cookies.
467 void OnLoaded(base::TimeTicks beginning_time, 467 void OnLoaded(base::TimeTicks beginning_time,
468 const std::vector<CanonicalCookie*>& cookies); 468 const std::vector<CanonicalCookie*>& cookies);
469 469
470 // Stores cookies loaded from the backing store and invokes the deferred 470 // Stores cookies loaded from the backing store and invokes the deferred
471 // task(s) pending loading of cookies associated with the domain key 471 // task(s) pending loading of cookies associated with the domain key
472 // (eTLD+1). Called when all cookies for the domain key(eTLD+1) have been 472 // (eTLD+1). Called when all cookies for the domain key(eTLD+1) have been
473 // loaded from DB. See PersistentCookieStore::Load for details on the contents 473 // loaded from DB. See PersistentCookieStore::Load for details on the contents
474 // of cookies. 474 // of cookies.
475 void OnKeyLoaded( 475 void OnKeyLoaded(
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
606 base::Histogram* histogram_between_access_interval_minutes_; 606 base::Histogram* histogram_between_access_interval_minutes_;
607 base::Histogram* histogram_evicted_last_access_minutes_; 607 base::Histogram* histogram_evicted_last_access_minutes_;
608 base::Histogram* histogram_count_; 608 base::Histogram* histogram_count_;
609 base::Histogram* histogram_domain_count_; 609 base::Histogram* histogram_domain_count_;
610 base::Histogram* histogram_etldp1_count_; 610 base::Histogram* histogram_etldp1_count_;
611 base::Histogram* histogram_domain_per_etldp1_count_; 611 base::Histogram* histogram_domain_per_etldp1_count_;
612 base::Histogram* histogram_number_duplicate_db_cookies_; 612 base::Histogram* histogram_number_duplicate_db_cookies_;
613 base::Histogram* histogram_cookie_deletion_cause_; 613 base::Histogram* histogram_cookie_deletion_cause_;
614 base::Histogram* histogram_time_get_; 614 base::Histogram* histogram_time_get_;
615 base::Histogram* histogram_time_mac_; 615 base::Histogram* histogram_time_mac_;
616 base::Histogram* histogram_time_load_; 616 base::Histogram* histogram_time_blocked_on_load_;
617 617
618 CookieMap cookies_; 618 CookieMap cookies_;
619 619
620 // Indicates whether the cookie store has been initialized. This happens 620 // Indicates whether the cookie store has been initialized. This happens
621 // lazily in InitStoreIfNecessary(). 621 // lazily in InitStoreIfNecessary().
622 bool initialized_; 622 bool initialized_;
623 623
624 // Indicates whether loading from the backend store is completed and 624 // Indicates whether loading from the backend store is completed and
625 // calls may be immediately processed. 625 // calls may be immediately processed.
626 bool loaded_; 626 bool loaded_;
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after
994 private: 994 private:
995 DISALLOW_COPY_AND_ASSIGN(PersistentCookieStore); 995 DISALLOW_COPY_AND_ASSIGN(PersistentCookieStore);
996 }; 996 };
997 997
998 class CookieList : public std::vector<CookieMonster::CanonicalCookie> { 998 class CookieList : public std::vector<CookieMonster::CanonicalCookie> {
999 }; 999 };
1000 1000
1001 } // namespace net 1001 } // namespace net
1002 1002
1003 #endif // NET_BASE_COOKIE_MONSTER_H_ 1003 #endif // NET_BASE_COOKIE_MONSTER_H_
OLDNEW
« no previous file with comments | « chrome/browser/net/sqlite_persistent_cookie_store.cc ('k') | net/base/cookie_monster.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698