OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "chrome/browser/browsing_data/browsing_data_cache_storage_helper.h" | 5 #include "chrome/browser/browsing_data/browsing_data_cache_storage_helper.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/location.h" | 10 #include "base/location.h" |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 } | 73 } |
74 | 74 |
75 void BrowsingDataCacheStorageHelper::DeleteCacheStorageOnIOThread( | 75 void BrowsingDataCacheStorageHelper::DeleteCacheStorageOnIOThread( |
76 const GURL& origin) { | 76 const GURL& origin) { |
77 DCHECK_CURRENTLY_ON(BrowserThread::IO); | 77 DCHECK_CURRENTLY_ON(BrowserThread::IO); |
78 cache_storage_context_->DeleteForOrigin(origin); | 78 cache_storage_context_->DeleteForOrigin(origin); |
79 } | 79 } |
80 | 80 |
81 CannedBrowsingDataCacheStorageHelper::PendingCacheStorageUsageInfo:: | 81 CannedBrowsingDataCacheStorageHelper::PendingCacheStorageUsageInfo:: |
82 PendingCacheStorageUsageInfo(const GURL& origin, | 82 PendingCacheStorageUsageInfo(const GURL& origin, |
83 int64 total_size_bytes, | 83 int64_t total_size_bytes, |
84 const base::Time& last_modified) | 84 const base::Time& last_modified) |
85 : origin(origin), | 85 : origin(origin), |
86 total_size_bytes(total_size_bytes), | 86 total_size_bytes(total_size_bytes), |
87 last_modified(last_modified) {} | 87 last_modified(last_modified) {} |
88 | 88 |
89 CannedBrowsingDataCacheStorageHelper::PendingCacheStorageUsageInfo:: | 89 CannedBrowsingDataCacheStorageHelper::PendingCacheStorageUsageInfo:: |
90 ~PendingCacheStorageUsageInfo() {} | 90 ~PendingCacheStorageUsageInfo() {} |
91 | 91 |
92 bool CannedBrowsingDataCacheStorageHelper::PendingCacheStorageUsageInfo:: | 92 bool CannedBrowsingDataCacheStorageHelper::PendingCacheStorageUsageInfo:: |
93 operator<(const PendingCacheStorageUsageInfo& other) const { | 93 operator<(const PendingCacheStorageUsageInfo& other) const { |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 for (std::set<PendingCacheStorageUsageInfo>::iterator it = | 149 for (std::set<PendingCacheStorageUsageInfo>::iterator it = |
150 pending_cache_storage_info_.begin(); | 150 pending_cache_storage_info_.begin(); |
151 it != pending_cache_storage_info_.end();) { | 151 it != pending_cache_storage_info_.end();) { |
152 if (it->origin == origin) | 152 if (it->origin == origin) |
153 pending_cache_storage_info_.erase(it++); | 153 pending_cache_storage_info_.erase(it++); |
154 else | 154 else |
155 ++it; | 155 ++it; |
156 } | 156 } |
157 BrowsingDataCacheStorageHelper::DeleteCacheStorage(origin); | 157 BrowsingDataCacheStorageHelper::DeleteCacheStorage(origin); |
158 } | 158 } |
OLD | NEW |