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

Side by Side Diff: content/browser/dom_storage/local_storage_context_mojo.h

Issue 2649963002: Enable mojo localstorage to actually store on disk. (Closed)
Patch Set: Remove Sync() method, and instead make sure browser test waits long enough. Created 3 years, 10 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
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_DOM_STORAGE_LOCAL_STORAGE_CONTEXT_MOJO_H_ 5 #ifndef CONTENT_BROWSER_DOM_STORAGE_LOCAL_STORAGE_CONTEXT_MOJO_H_
6 #define CONTENT_BROWSER_DOM_STORAGE_LOCAL_STORAGE_CONTEXT_MOJO_H_ 6 #define CONTENT_BROWSER_DOM_STORAGE_LOCAL_STORAGE_CONTEXT_MOJO_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 30 matching lines...) Expand all
41 mojom::LevelDBWrapperRequest request); 41 mojom::LevelDBWrapperRequest request);
42 void GetStorageUsage(GetStorageUsageCallback callback); 42 void GetStorageUsage(GetStorageUsageCallback callback);
43 void DeleteStorage(const url::Origin& origin); 43 void DeleteStorage(const url::Origin& origin);
44 // Like DeleteStorage(), but also deletes storage for all sub-origins. 44 // Like DeleteStorage(), but also deletes storage for all sub-origins.
45 void DeleteStorageForPhysicalOrigin(const url::Origin& origin); 45 void DeleteStorageForPhysicalOrigin(const url::Origin& origin);
46 void Flush(); 46 void Flush();
47 47
48 leveldb::mojom::LevelDBDatabaseAssociatedRequest DatabaseRequestForTesting(); 48 leveldb::mojom::LevelDBDatabaseAssociatedRequest DatabaseRequestForTesting();
49 49
50 private: 50 private:
51 friend class MojoDOMStorageBrowserTest;
52
51 class LevelDBWrapperHolder; 53 class LevelDBWrapperHolder;
52 54
53 // Runs |callback| immediately if already connected to a database, otherwise 55 // Runs |callback| immediately if already connected to a database, otherwise
54 // delays running |callback| untill after a connection has been established. 56 // delays running |callback| untill after a connection has been established.
55 // Initiates connecting to the database if no connection is in progres yet. 57 // Initiates connecting to the database if no connection is in progres yet.
56 void RunWhenConnected(base::OnceClosure callback); 58 void RunWhenConnected(base::OnceClosure callback);
57 59
58 void OnUserServiceConnectionComplete(); 60 void OnUserServiceConnectionComplete();
59 void OnUserServiceConnectionError(); 61 void OnUserServiceConnectionError();
60 62
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 // Used to access old data for migration. 116 // Used to access old data for migration.
115 scoped_refptr<DOMStorageTaskRunner> task_runner_; 117 scoped_refptr<DOMStorageTaskRunner> task_runner_;
116 base::FilePath old_localstorage_path_; 118 base::FilePath old_localstorage_path_;
117 119
118 base::WeakPtrFactory<LocalStorageContextMojo> weak_ptr_factory_; 120 base::WeakPtrFactory<LocalStorageContextMojo> weak_ptr_factory_;
119 }; 121 };
120 122
121 } // namespace content 123 } // namespace content
122 124
123 #endif // CONTENT_BROWSER_DOM_STORAGE_LOCAL_STORAGE_CONTEXT_MOJO_H_ 125 #endif // CONTENT_BROWSER_DOM_STORAGE_LOCAL_STORAGE_CONTEXT_MOJO_H_
OLDNEW
« no previous file with comments | « content/browser/dom_storage/dom_storage_context_wrapper.cc ('k') | content/browser/dom_storage/local_storage_context_mojo.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698