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 813 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
824 base::TimeTicks::Now() - start_time); | 824 base::TimeTicks::Now() - start_time); |
825 } | 825 } |
826 | 826 |
827 // Put future migration cases here. | 827 // Put future migration cases here. |
828 | 828 |
829 if (cur_version < kCurrentVersionNumber) { | 829 if (cur_version < kCurrentVersionNumber) { |
830 UMA_HISTOGRAM_COUNTS_100("Cookie.CorruptMetaTable", 1); | 830 UMA_HISTOGRAM_COUNTS_100("Cookie.CorruptMetaTable", 1); |
831 | 831 |
832 meta_table_.Reset(); | 832 meta_table_.Reset(); |
833 db_.reset(new sql::Connection); | 833 db_.reset(new sql::Connection); |
834 if (!file_util::Delete(path_, false) || | 834 if (!base::Delete(path_, false) || |
835 !db_->Open(path_) || | 835 !db_->Open(path_) || |
836 !meta_table_.Init( | 836 !meta_table_.Init( |
837 db_.get(), kCurrentVersionNumber, kCompatibleVersionNumber)) { | 837 db_.get(), kCurrentVersionNumber, kCompatibleVersionNumber)) { |
838 UMA_HISTOGRAM_COUNTS_100("Cookie.CorruptMetaTableRecoveryFailed", 1); | 838 UMA_HISTOGRAM_COUNTS_100("Cookie.CorruptMetaTableRecoveryFailed", 1); |
839 NOTREACHED() << "Unable to reset the cookie DB."; | 839 NOTREACHED() << "Unable to reset the cookie DB."; |
840 meta_table_.Reset(); | 840 meta_table_.Reset(); |
841 db_.reset(); | 841 db_.reset(); |
842 return false; | 842 return false; |
843 } | 843 } |
844 } | 844 } |
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1199 | 1199 |
1200 const std::string cookie_priority_experiment_group = | 1200 const std::string cookie_priority_experiment_group = |
1201 base::FieldTrialList::FindFullName("CookieRetentionPriorityStudy"); | 1201 base::FieldTrialList::FindFullName("CookieRetentionPriorityStudy"); |
1202 cookie_monster->SetPriorityAwareGarbageCollection( | 1202 cookie_monster->SetPriorityAwareGarbageCollection( |
1203 cookie_priority_experiment_group == "ExperimentOn"); | 1203 cookie_priority_experiment_group == "ExperimentOn"); |
1204 | 1204 |
1205 return cookie_monster; | 1205 return cookie_monster; |
1206 } | 1206 } |
1207 | 1207 |
1208 } // namespace content | 1208 } // namespace content |
OLD | NEW |