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

Side by Side Diff: content/browser/level_db_wrapper_impl.h

Issue 1735583002: Rename WeakBindingSet/WeakInterfacePtrSet to BindingSet/InterfacePtrSet. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/browser/frame_host/frame_mojo_shell.h ('k') | content/browser/storage_partition_impl.h » ('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 #ifndef CONTENT_BROWSER_LEVEL_DB_WRAPPER_IMPL_H_ 5 #ifndef CONTENT_BROWSER_LEVEL_DB_WRAPPER_IMPL_H_
6 #define CONTENT_BROWSER_LEVEL_DB_WRAPPER_IMPL_H_ 6 #define CONTENT_BROWSER_LEVEL_DB_WRAPPER_IMPL_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "content/common/leveldb_wrapper.mojom.h" 10 #include "content/common/leveldb_wrapper.mojom.h"
11 #include "mojo/public/cpp/bindings/weak_binding_set.h" 11 #include "mojo/public/cpp/bindings/binding_set.h"
12 12
13 namespace content { 13 namespace content {
14 14
15 // This is a wrapper around a leveldb::LevelDBDatabase. It adds a couple of 15 // This is a wrapper around a leveldb::LevelDBDatabase. It adds a couple of
16 // features: 16 // features:
17 // 1) Adds the given prefix, if any, to all keys. This allows the sharing of one 17 // 1) Adds the given prefix, if any, to all keys. This allows the sharing of one
18 // database across many, possibly untrusted, consumers and ensuring that they 18 // database across many, possibly untrusted, consumers and ensuring that they
19 // can't access each other's values. 19 // can't access each other's values.
20 // 2) Informs an observer when the given prefix' values are modified by another 20 // 2) Informs an observer when the given prefix' values are modified by another
21 // process. 21 // process.
(...skipping 19 matching lines...) Expand all
41 const mojo::String& source, 41 const mojo::String& source,
42 const DeleteCallback& callback) override; 42 const DeleteCallback& callback) override;
43 void DeleteAll(const mojo::String& source, 43 void DeleteAll(const mojo::String& source,
44 const DeleteAllCallback& callback) override; 44 const DeleteAllCallback& callback) override;
45 void Get(mojo::Array<uint8_t> key, const GetCallback& callback) override; 45 void Get(mojo::Array<uint8_t> key, const GetCallback& callback) override;
46 void GetAll(const GetAllCallback& callback) override; 46 void GetAll(const GetAllCallback& callback) override;
47 47
48 void OnConnectionError(); 48 void OnConnectionError();
49 49
50 std::string prefix_; 50 std::string prefix_;
51 mojo::WeakBindingSet<LevelDBWrapper> bindings_; 51 mojo::BindingSet<LevelDBWrapper> bindings_;
52 base::Closure no_bindings_callback_; 52 base::Closure no_bindings_callback_;
53 53
54 DISALLOW_COPY_AND_ASSIGN(LevelDBWrapperImpl); 54 DISALLOW_COPY_AND_ASSIGN(LevelDBWrapperImpl);
55 }; 55 };
56 56
57 } // namespace content 57 } // namespace content
58 58
59 #endif // CONTENT_BROWSER_LEVEL_DB_WRAPPER_IMPL_H_ 59 #endif // CONTENT_BROWSER_LEVEL_DB_WRAPPER_IMPL_H_
OLDNEW
« no previous file with comments | « content/browser/frame_host/frame_mojo_shell.h ('k') | content/browser/storage_partition_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698