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

Side by Side Diff: content/browser/in_process_webkit/indexed_db_key_utility_client.h

Issue 10834350: Remove all the indexeddb-related utility process code (Closed) Base URL: http://git.chromium.org/chromium/src.git@opencursor-cleanup
Patch Set: Rebase, attempt to reland Created 8 years, 4 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 (c) 2012 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 #ifndef CONTENT_BROWSER_IN_PROCESS_WEBKIT_INDEXED_DB_KEY_UTILITY_CLIENT_H_
6 #define CONTENT_BROWSER_IN_PROCESS_WEBKIT_INDEXED_DB_KEY_UTILITY_CLIENT_H_
7
8 #include <vector>
9
10 #include "base/memory/ref_counted.h"
11 #include "content/common/content_export.h"
12
13 class KeyUtilityClientImpl;
14
15 namespace base {
16 template <typename T>
17 struct DefaultLazyInstanceTraits;
18 } // namespace base
19
20 namespace content {
21 class IndexedDBKey;
22 class IndexedDBKeyPath;
23 class SerializedScriptValue;
24 }
25
26 // Class for obtaining IndexedDBKeys from the SerializedScriptValues given
27 // an IDBKeyPath. This class is a thin singleton wrapper around the
28 // KeyUtilityClientImpl, which does the real work.
29 class IndexedDBKeyUtilityClient {
30 public:
31 // Synchronously obtain the |keys| from |values| for the given |key_path|.
32 static void CreateIDBKeysFromSerializedValuesAndKeyPath(
33 const std::vector<content::SerializedScriptValue>& values,
34 const content::IndexedDBKeyPath& key_path,
35 std::vector<content::IndexedDBKey>* keys);
36
37 // Synchronously inject |key| into |value| using |key_path|. Returns the new
38 // value.
39 static content::SerializedScriptValue InjectIDBKeyIntoSerializedValue(
40 const content::IndexedDBKey& key,
41 const content::SerializedScriptValue& value,
42 const content::IndexedDBKeyPath& key_path);
43
44 // Shut down the underlying implementation. Must be called on the IO thread.
45 static void Shutdown();
46
47 private:
48 friend struct base::DefaultLazyInstanceTraits<IndexedDBKeyUtilityClient>;
49 IndexedDBKeyUtilityClient();
50 ~IndexedDBKeyUtilityClient();
51
52 bool is_shutdown_;
53
54 // The real client; laziliy instantiated.
55 scoped_refptr<KeyUtilityClientImpl> impl_;
56 };
57
58 #endif // CONTENT_BROWSER_IN_PROCESS_WEBKIT_INDEXED_DB_KEY_UTILITY_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698