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

Side by Side Diff: content/browser/in_process_webkit/indexed_db_context.cc

Issue 7745011: Remove --unlimited-quota-for-indexeddb. Increase incognito quota. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: another rebase Created 9 years, 3 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
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 "content/browser/in_process_webkit/indexed_db_context.h" 5 #include "content/browser/in_process_webkit/indexed_db_context.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/message_loop_proxy.h" 10 #include "base/message_loop_proxy.h"
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 bool deleted = file_util::Delete(idb_directory, true /*recursive*/); 169 bool deleted = file_util::Delete(idb_directory, true /*recursive*/);
170 QueryDiskAndUpdateQuotaUsage(origin_url); 170 QueryDiskAndUpdateQuotaUsage(origin_url);
171 if (deleted) { 171 if (deleted) {
172 RemoveFromOriginSet(origin_url); 172 RemoveFromOriginSet(origin_url);
173 origin_size_map_.erase(origin_url); 173 origin_size_map_.erase(origin_url);
174 space_available_map_.erase(origin_url); 174 space_available_map_.erase(origin_url);
175 } 175 }
176 } 176 }
177 } 177 }
178 178
179 bool IndexedDBContext::IsUnlimitedStorageGranted(
180 const GURL& origin) const {
181 return special_storage_policy_->IsStorageUnlimited(origin);
182 }
183
184 void IndexedDBContext::GetAllOrigins(std::vector<GURL>* origins) { 179 void IndexedDBContext::GetAllOrigins(std::vector<GURL>* origins) {
185 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::WEBKIT)); 180 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::WEBKIT));
186 std::set<GURL>* origins_set = GetOriginSet(); 181 std::set<GURL>* origins_set = GetOriginSet();
187 for (std::set<GURL>::const_iterator iter = origins_set->begin(); 182 for (std::set<GURL>::const_iterator iter = origins_set->begin();
188 iter != origins_set->end(); ++iter) { 183 iter != origins_set->end(); ++iter) {
189 origins->push_back(*iter); 184 origins->push_back(*iter);
190 } 185 }
191 } 186 }
192 187
193 int64 IndexedDBContext::GetOriginDiskUsage(const GURL& origin_url) { 188 int64 IndexedDBContext::GetOriginDiskUsage(const GURL& origin_url) {
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 } 333 }
339 } 334 }
340 return origin_set_.get(); 335 return origin_set_.get();
341 } 336 }
342 337
343 void IndexedDBContext::ResetCaches() { 338 void IndexedDBContext::ResetCaches() {
344 origin_set_.reset(); 339 origin_set_.reset();
345 origin_size_map_.clear(); 340 origin_size_map_.clear();
346 space_available_map_.clear(); 341 space_available_map_.clear();
347 } 342 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698