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

Side by Side Diff: chrome/browser/browsing_data_quota_helper_impl.cc

Issue 7676002: When deleting storage through the cookies tree model, also update its cache (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updates Created 9 years, 4 months 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/browsing_data_quota_helper_impl.h ('k') | chrome/browser/cookies_tree_model.h » ('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 #include "chrome/browser/browsing_data_quota_helper_impl.h" 5 #include "chrome/browser/browsing_data_quota_helper_impl.h"
6 6
7 #include <map> 7 #include <map>
8 #include <set> 8 #include <set>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 FROM_HERE, 136 FROM_HERE,
137 NewRunnableMethod( 137 NewRunnableMethod(
138 this, 138 this,
139 &BrowsingDataQuotaHelperImpl::OnComplete)); 139 &BrowsingDataQuotaHelperImpl::OnComplete));
140 return; 140 return;
141 } 141 }
142 142
143 is_fetching_ = false; 143 is_fetching_ = false;
144 144
145 QuotaInfoArray result; 145 QuotaInfoArray result;
146 result.reserve(quota_info_.size());
147 146
148 for (std::map<std::string, QuotaInfo>::iterator itr = quota_info_.begin(); 147 for (std::map<std::string, QuotaInfo>::iterator itr = quota_info_.begin();
149 itr != quota_info_.end(); 148 itr != quota_info_.end();
150 ++itr) { 149 ++itr) {
151 QuotaInfo* info = &itr->second; 150 QuotaInfo* info = &itr->second;
152 // Skip unused entries 151 // Skip unused entries
153 if (info->temporary_usage <= 0 && 152 if (info->temporary_usage <= 0 &&
154 info->persistent_usage <= 0) 153 info->persistent_usage <= 0)
155 continue; 154 continue;
156 155
157 info->host = itr->first; 156 info->host = itr->first;
158 result.push_back(*info); 157 result.push_back(*info);
159 } 158 }
160 159
161 callback_->Run(result); 160 callback_->Run(result);
162 callback_.reset(); 161 callback_.reset();
163 } 162 }
OLDNEW
« no previous file with comments | « chrome/browser/browsing_data_quota_helper_impl.h ('k') | chrome/browser/cookies_tree_model.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698