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

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

Issue 2589663003: mojo:: Rename mojo::GetProxy() to mojo::MakeRequest() (Closed)
Patch Set: Rebase Created 4 years 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
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 "base/bind.h" 7 #include "base/bind.h"
8 #include "base/metrics/histogram_macros.h" 8 #include "base/metrics/histogram_macros.h"
9 #include "base/rand_util.h" 9 #include "base/rand_util.h"
10 #include "base/strings/string16.h" 10 #include "base/strings/string16.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 *storage_area_id = result[1]; 51 *storage_area_id = result[1];
52 } 52 }
53 53
54 LocalStorageCachedArea::LocalStorageCachedArea( 54 LocalStorageCachedArea::LocalStorageCachedArea(
55 const url::Origin& origin, 55 const url::Origin& origin,
56 mojom::StoragePartitionService* storage_partition_service, 56 mojom::StoragePartitionService* storage_partition_service,
57 LocalStorageCachedAreas* cached_areas) 57 LocalStorageCachedAreas* cached_areas)
58 : origin_(origin), binding_(this), 58 : origin_(origin), binding_(this),
59 cached_areas_(cached_areas), weak_factory_(this) { 59 cached_areas_(cached_areas), weak_factory_(this) {
60 storage_partition_service->OpenLocalStorage( 60 storage_partition_service->OpenLocalStorage(
61 origin_, binding_.CreateInterfacePtrAndBind(), mojo::GetProxy(&leveldb_)); 61 origin_, binding_.CreateInterfacePtrAndBind(),
62 mojo::MakeRequest(&leveldb_));
62 } 63 }
63 64
64 LocalStorageCachedArea::~LocalStorageCachedArea() { 65 LocalStorageCachedArea::~LocalStorageCachedArea() {
65 cached_areas_->CacheAreaClosed(this); 66 cached_areas_->CacheAreaClosed(this);
66 } 67 }
67 68
68 unsigned LocalStorageCachedArea::GetLength() { 69 unsigned LocalStorageCachedArea::GetLength() {
69 EnsureLoaded(); 70 EnsureLoaded();
70 return map_->Length(); 71 return map_->Length();
71 } 72 }
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 } 335 }
335 336
336 void LocalStorageCachedArea::Reset() { 337 void LocalStorageCachedArea::Reset() {
337 map_ = NULL; 338 map_ = NULL;
338 ignore_key_mutations_.clear(); 339 ignore_key_mutations_.clear();
339 ignore_all_mutations_ = false; 340 ignore_all_mutations_ = false;
340 weak_factory_.InvalidateWeakPtrs(); 341 weak_factory_.InvalidateWeakPtrs();
341 } 342 }
342 343
343 } // namespace content 344 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/device_sensors/device_sensor_event_pump.h ('k') | content/renderer/gamepad_shared_memory_reader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698