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

Side by Side Diff: webkit/dom_storage/dom_storage_area.cc

Issue 12398008: Purge in-memory localStorage areas if the # of areas exceeds the limit (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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) 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 "webkit/dom_storage/dom_storage_area.h" 5 #include "webkit/dom_storage/dom_storage_area.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after
385 bool success = backing_->CommitChanges( 385 bool success = backing_->CommitChanges(
386 commit_batch_->clear_all_first, 386 commit_batch_->clear_all_first,
387 commit_batch_->changed_values); 387 commit_batch_->changed_values);
388 DCHECK(success); 388 DCHECK(success);
389 } 389 }
390 commit_batch_.reset(); 390 commit_batch_.reset();
391 backing_.reset(); 391 backing_.reset();
392 session_storage_backing_ = NULL; 392 session_storage_backing_ = NULL;
393 } 393 }
394 394
395 size_t DomStorageArea::GetMapSize() const {
396 return map_->bytes_used();
397 }
398
395 } // namespace dom_storage 399 } // namespace dom_storage
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698