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

Side by Side Diff: content/renderer/renderer_webkitplatformsupport_impl.cc

Issue 10204003: Use WebIDBKeyPath type in WebKit API, implement IndexedDBKeyPath type. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Move IndexedDBKeyPath to content namespace, formatting nits. Created 8 years, 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 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/renderer_webkitplatformsupport_impl.h" 5 #include "content/renderer/renderer_webkitplatformsupport_impl.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/file_path.h" 8 #include "base/file_path.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/platform_file.h" 10 #include "base/platform_file.h"
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kSingleProcess)) 321 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kSingleProcess))
322 web_idb_factory_.reset(WebIDBFactory::create()); 322 web_idb_factory_.reset(WebIDBFactory::create());
323 else 323 else
324 web_idb_factory_.reset(new RendererWebIDBFactoryImpl()); 324 web_idb_factory_.reset(new RendererWebIDBFactoryImpl());
325 } 325 }
326 return web_idb_factory_.get(); 326 return web_idb_factory_.get();
327 } 327 }
328 328
329 void RendererWebKitPlatformSupportImpl::createIDBKeysFromSerializedValuesAndKeyP ath( 329 void RendererWebKitPlatformSupportImpl::createIDBKeysFromSerializedValuesAndKeyP ath(
330 const WebVector<WebSerializedScriptValue>& values, 330 const WebVector<WebSerializedScriptValue>& values,
331 const WebString& keyPath, 331 const WebIDBKeyPath& keyPath,
332 WebVector<WebIDBKey>& keys_out) { 332 WebVector<WebIDBKey>& keys_out) {
333 DCHECK(CommandLine::ForCurrentProcess()->HasSwitch(switches::kSingleProcess)); 333 DCHECK(CommandLine::ForCurrentProcess()->HasSwitch(switches::kSingleProcess));
334 WebVector<WebIDBKey> keys(values.size()); 334 WebVector<WebIDBKey> keys(values.size());
335 for (size_t i = 0; i < values.size(); ++i) { 335 for (size_t i = 0; i < values.size(); ++i) {
336 keys[i] = WebIDBKey::createFromValueAndKeyPath( 336 keys[i] = WebIDBKey::createFromValueAndKeyPath(
337 values[i], WebIDBKeyPath::create(keyPath)); 337 values[i], keyPath);
338 } 338 }
339 keys_out.swap(keys); 339 keys_out.swap(keys);
340 } 340 }
341 341
342 WebSerializedScriptValue 342 WebSerializedScriptValue
343 RendererWebKitPlatformSupportImpl::injectIDBKeyIntoSerializedValue( 343 RendererWebKitPlatformSupportImpl::injectIDBKeyIntoSerializedValue(
344 const WebIDBKey& key, 344 const WebIDBKey& key,
345 const WebSerializedScriptValue& value, 345 const WebSerializedScriptValue& value,
346 const WebString& keyPath) { 346 const WebIDBKeyPath& keyPath) {
347 DCHECK(CommandLine::ForCurrentProcess()->HasSwitch(switches::kSingleProcess)); 347 DCHECK(CommandLine::ForCurrentProcess()->HasSwitch(switches::kSingleProcess));
348 return WebIDBKey::injectIDBKeyIntoSerializedValue( 348 return WebIDBKey::injectIDBKeyIntoSerializedValue(
349 key, value, WebIDBKeyPath::create(keyPath)); 349 key, value, keyPath);
350 } 350 }
351 351
352 //------------------------------------------------------------------------------ 352 //------------------------------------------------------------------------------
353 353
354 WebFileSystem* RendererWebKitPlatformSupportImpl::fileSystem() { 354 WebFileSystem* RendererWebKitPlatformSupportImpl::fileSystem() {
355 if (!web_file_system_.get()) 355 if (!web_file_system_.get())
356 web_file_system_.reset(new WebFileSystemImpl()); 356 web_file_system_.reset(new WebFileSystemImpl());
357 return web_file_system_.get(); 357 return web_file_system_.get();
358 } 358 }
359 359
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after
725 DCHECK(render_thread); 725 DCHECK(render_thread);
726 if (!render_thread) 726 if (!render_thread)
727 return NULL; 727 return NULL;
728 return render_thread->CreateMediaStreamCenter(client); 728 return render_thread->CreateMediaStreamCenter(client);
729 } 729 }
730 730
731 GpuChannelHostFactory* 731 GpuChannelHostFactory*
732 RendererWebKitPlatformSupportImpl::GetGpuChannelHostFactory() { 732 RendererWebKitPlatformSupportImpl::GetGpuChannelHostFactory() {
733 return RenderThreadImpl::current(); 733 return RenderThreadImpl::current();
734 } 734 }
OLDNEW
« no previous file with comments | « content/renderer/renderer_webkitplatformsupport_impl.h ('k') | content/utility/utility_thread_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698