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

Side by Side Diff: content/renderer/dom_storage/local_storage_cached_areas.cc

Issue 1745603002: Switch LevelDBWrapper::GetAll to use the new Mojo sync IPC mechanism. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comment Created 4 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
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "content/renderer/dom_storage/local_storage_cached_areas.h"
6
7 #include "content/renderer/dom_storage/local_storage_cached_area.h"
8
9 namespace content {
10
11 LocalStorageCachedAreas::LocalStorageCachedAreas(
12 StoragePartitionService* storage_partition_service)
13 : storage_partition_service_(storage_partition_service) {
14 }
15
16 LocalStorageCachedAreas::~LocalStorageCachedAreas() {
17 }
18
19 scoped_refptr<LocalStorageCachedArea>
20 LocalStorageCachedAreas::GetLocalStorageCachedArea(
21 const url::Origin& origin) {
22 if (cached_areas_.find(origin) == cached_areas_.end()) {
23 cached_areas_[origin] = new LocalStorageCachedArea(
24 origin, storage_partition_service_, this);
25 }
26
27 return make_scoped_refptr(cached_areas_[origin]);
28 }
29
30 void LocalStorageCachedAreas::LocalStorageCacheAreaClosed(
31 LocalStorageCachedArea* cached_area) {
32 DCHECK(cached_areas_.find(cached_area->origin()) != cached_areas_.end());
33 cached_areas_.erase(cached_area->origin());
34 }
35
36 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/dom_storage/local_storage_cached_areas.h ('k') | content/renderer/dom_storage/local_storage_namespace.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698