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

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

Issue 1798113002: Switch StoragePartitionService interface to use url::Origin instead of mojo string. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix android builds per Ken 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
« no previous file with comments | « content/content_common_mojo_bindings.gyp ('k') | mojo/public/tools/bindings/mojom.gni » ('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 2016 The Chromium Authors. All rights reserved. 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 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/renderer/dom_storage/local_storage_cached_area.h" 5 #include "content/renderer/dom_storage/local_storage_cached_area.h"
6 6
7 #include "content/common/storage_partition_service.mojom.h" 7 #include "content/common/storage_partition_service.mojom.h"
8 #include "content/renderer/dom_storage/local_storage_cached_areas.h" 8 #include "content/renderer/dom_storage/local_storage_cached_areas.h"
9 9
10 namespace content { 10 namespace content {
11 11
12 LocalStorageCachedArea::LocalStorageCachedArea( 12 LocalStorageCachedArea::LocalStorageCachedArea(
13 const url::Origin& origin, 13 const url::Origin& origin,
14 StoragePartitionService* storage_partition_service, 14 StoragePartitionService* storage_partition_service,
15 LocalStorageCachedAreas* cached_areas) 15 LocalStorageCachedAreas* cached_areas)
16 : loaded_(false), origin_(origin), binding_(this), 16 : loaded_(false), origin_(origin), binding_(this),
17 cached_areas_(cached_areas) { 17 cached_areas_(cached_areas) {
18 storage_partition_service->OpenLocalStorage( 18 storage_partition_service->OpenLocalStorage(
19 origin_.Serialize(), mojo::GetProxy(&leveldb_)); 19 origin_, mojo::GetProxy(&leveldb_));
20 } 20 }
21 21
22 LocalStorageCachedArea::~LocalStorageCachedArea() { 22 LocalStorageCachedArea::~LocalStorageCachedArea() {
23 cached_areas_->LocalStorageCacheAreaClosed(this); 23 cached_areas_->LocalStorageCacheAreaClosed(this);
24 } 24 }
25 25
26 unsigned LocalStorageCachedArea::GetLength() { 26 unsigned LocalStorageCachedArea::GetLength() {
27 EnsureLoaded(); 27 EnsureLoaded();
28 return 0u; 28 return 0u;
29 } 29 }
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 if (loaded_) 76 if (loaded_)
77 return; 77 return;
78 78
79 loaded_ = true; 79 loaded_ = true;
80 leveldb::DatabaseError status = leveldb::DatabaseError::OK; 80 leveldb::DatabaseError status = leveldb::DatabaseError::OK;
81 mojo::Array<content::KeyValuePtr> data; 81 mojo::Array<content::KeyValuePtr> data;
82 leveldb_->GetAll(binding_.CreateInterfacePtrAndBind(), &status, &data); 82 leveldb_->GetAll(binding_.CreateInterfacePtrAndBind(), &status, &data);
83 } 83 }
84 84
85 } // namespace content 85 } // namespace content
OLDNEW
« no previous file with comments | « content/content_common_mojo_bindings.gyp ('k') | mojo/public/tools/bindings/mojom.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698