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

Side by Side Diff: content/child/indexed_db/webidbfactory_impl.cc

Issue 2586483002: Use explicit WebString <-> string16 conversion methods in storage API files (Closed)
Patch Set: '' 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/child/indexed_db/webidbfactory_impl.h" 5 #include "content/child/indexed_db/webidbfactory_impl.h"
6 6
7 #include "content/child/indexed_db/indexed_db_callbacks_impl.h" 7 #include "content/child/indexed_db/indexed_db_callbacks_impl.h"
8 #include "content/child/indexed_db/indexed_db_database_callbacks_impl.h" 8 #include "content/child/indexed_db/indexed_db_database_callbacks_impl.h"
9 #include "content/child/storage_util.h" 9 #include "content/child/storage_util.h"
10 #include "ipc/ipc_sync_channel.h" 10 #include "ipc/ipc_sync_channel.h"
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 WebIDBDatabaseCallbacks* database_callbacks, 81 WebIDBDatabaseCallbacks* database_callbacks,
82 const WebSecurityOrigin& origin) { 82 const WebSecurityOrigin& origin) {
83 auto callbacks_impl = base::MakeUnique<IndexedDBCallbacksImpl>( 83 auto callbacks_impl = base::MakeUnique<IndexedDBCallbacksImpl>(
84 base::WrapUnique(callbacks), transaction_id, nullptr, io_runner_); 84 base::WrapUnique(callbacks), transaction_id, nullptr, io_runner_);
85 auto database_callbacks_impl = 85 auto database_callbacks_impl =
86 base::MakeUnique<IndexedDBDatabaseCallbacksImpl>( 86 base::MakeUnique<IndexedDBDatabaseCallbacksImpl>(
87 base::WrapUnique(database_callbacks)); 87 base::WrapUnique(database_callbacks));
88 io_runner_->PostTask( 88 io_runner_->PostTask(
89 FROM_HERE, 89 FROM_HERE,
90 base::Bind(&IOThreadHelper::Open, base::Unretained(io_helper_), 90 base::Bind(&IOThreadHelper::Open, base::Unretained(io_helper_),
91 base::string16(name), version, transaction_id, 91 name.utf16(), version, transaction_id,
92 base::Passed(&callbacks_impl), 92 base::Passed(&callbacks_impl),
93 base::Passed(&database_callbacks_impl), url::Origin(origin))); 93 base::Passed(&database_callbacks_impl), url::Origin(origin)));
94 } 94 }
95 95
96 void WebIDBFactoryImpl::deleteDatabase(const WebString& name, 96 void WebIDBFactoryImpl::deleteDatabase(const WebString& name,
97 WebIDBCallbacks* callbacks, 97 WebIDBCallbacks* callbacks,
98 const WebSecurityOrigin& origin) { 98 const WebSecurityOrigin& origin) {
99 auto callbacks_impl = base::MakeUnique<IndexedDBCallbacksImpl>( 99 auto callbacks_impl = base::MakeUnique<IndexedDBCallbacksImpl>(
100 base::WrapUnique(callbacks), IndexedDBCallbacksImpl::kNoTransaction, 100 base::WrapUnique(callbacks), IndexedDBCallbacksImpl::kNoTransaction,
101 nullptr, io_runner_); 101 nullptr, io_runner_);
102 io_runner_->PostTask( 102 io_runner_->PostTask(
103 FROM_HERE, 103 FROM_HERE,
104 base::Bind(&IOThreadHelper::DeleteDatabase, base::Unretained(io_helper_), 104 base::Bind(&IOThreadHelper::DeleteDatabase, base::Unretained(io_helper_),
105 base::string16(name), base::Passed(&callbacks_impl), 105 name.utf16(), base::Passed(&callbacks_impl),
106 url::Origin(origin))); 106 url::Origin(origin)));
107 } 107 }
108 108
109 WebIDBFactoryImpl::IOThreadHelper::IOThreadHelper( 109 WebIDBFactoryImpl::IOThreadHelper::IOThreadHelper(
110 scoped_refptr<IPC::SyncMessageFilter> sync_message_filter) 110 scoped_refptr<IPC::SyncMessageFilter> sync_message_filter)
111 : sync_message_filter_(std::move(sync_message_filter)) {} 111 : sync_message_filter_(std::move(sync_message_filter)) {}
112 112
113 WebIDBFactoryImpl::IOThreadHelper::~IOThreadHelper() {} 113 WebIDBFactoryImpl::IOThreadHelper::~IOThreadHelper() {}
114 114
115 FactoryAssociatedPtr& WebIDBFactoryImpl::IOThreadHelper::GetService() { 115 FactoryAssociatedPtr& WebIDBFactoryImpl::IOThreadHelper::GetService() {
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 160
161 void WebIDBFactoryImpl::IOThreadHelper::DeleteDatabase( 161 void WebIDBFactoryImpl::IOThreadHelper::DeleteDatabase(
162 const base::string16& name, 162 const base::string16& name,
163 std::unique_ptr<IndexedDBCallbacksImpl> callbacks, 163 std::unique_ptr<IndexedDBCallbacksImpl> callbacks,
164 const url::Origin& origin) { 164 const url::Origin& origin) {
165 GetService()->DeleteDatabase(GetCallbacksProxy(std::move(callbacks)), origin, 165 GetService()->DeleteDatabase(GetCallbacksProxy(std::move(callbacks)), origin,
166 name); 166 name);
167 } 167 }
168 168
169 } // namespace content 169 } // namespace content
OLDNEW
« no previous file with comments | « content/child/indexed_db/webidbdatabase_impl.cc ('k') | content/child/web_database_observer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698