OLD | NEW |
---|---|
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 "content/browser/net/sqlite_persistent_cookie_store.h" | 5 #include "content/browser/net/sqlite_persistent_cookie_store.h" |
6 | 6 |
7 #include <list> | 7 #include <list> |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <utility> | 10 #include <utility> |
(...skipping 683 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
694 50); | 694 50); |
695 | 695 |
696 UMA_HISTOGRAM_CUSTOM_TIMES( | 696 UMA_HISTOGRAM_CUSTOM_TIMES( |
697 "Cookie.TimeInitializeDomainMap", | 697 "Cookie.TimeInitializeDomainMap", |
698 base::Time::Now() - start, | 698 base::Time::Now() - start, |
699 base::TimeDelta::FromMilliseconds(1), base::TimeDelta::FromMinutes(1), | 699 base::TimeDelta::FromMilliseconds(1), base::TimeDelta::FromMinutes(1), |
700 50); | 700 50); |
701 | 701 |
702 initialized_ = true; | 702 initialized_ = true; |
703 | 703 |
704 if (!restore_old_session_cookies_) | 704 if (!restore_old_session_cookies_) { |
705 base::Time start_time = base::Time::Now(); | |
705 DeleteSessionCookiesOnStartup(); | 706 DeleteSessionCookiesOnStartup(); |
707 | |
708 UMA_HISTOGRAM_TIMES("Cookie.Startup.TimeSpentDeletingCookies", | |
709 base::Time::Now() - start_time); | |
710 UMA_HISTOGRAM_COUNTS("Cookie.Startup.NumberOfCookiesDeleted", | |
711 db_->GetLastChangeCount()); | |
erikwright (departed)
2015/05/12 19:39:50
Either:
(1) Have DeleteSessionCookiesOnStartup re
erikchen
2015/05/12 20:33:49
Oh yes, good point. This logic originally started
| |
712 } | |
713 | |
706 return true; | 714 return true; |
707 } | 715 } |
708 | 716 |
709 void SQLitePersistentCookieStore::Backend::ChainLoadCookies( | 717 void SQLitePersistentCookieStore::Backend::ChainLoadCookies( |
710 const LoadedCallback& loaded_callback) { | 718 const LoadedCallback& loaded_callback) { |
711 DCHECK(background_task_runner_->RunsTasksOnCurrentThread()); | 719 DCHECK(background_task_runner_->RunsTasksOnCurrentThread()); |
712 IncrementTimeDelta increment(&cookie_load_duration_); | 720 IncrementTimeDelta increment(&cookie_load_duration_); |
713 | 721 |
714 bool load_success = true; | 722 bool load_success = true; |
715 | 723 |
(...skipping 734 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1450 (config.session_cookie_mode == | 1458 (config.session_cookie_mode == |
1451 CookieStoreConfig::RESTORED_SESSION_COOKIES)) { | 1459 CookieStoreConfig::RESTORED_SESSION_COOKIES)) { |
1452 cookie_monster->SetPersistSessionCookies(true); | 1460 cookie_monster->SetPersistSessionCookies(true); |
1453 } | 1461 } |
1454 } | 1462 } |
1455 | 1463 |
1456 return cookie_monster; | 1464 return cookie_monster; |
1457 } | 1465 } |
1458 | 1466 |
1459 } // namespace content | 1467 } // namespace content |
OLD | NEW |