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

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

Issue 19594005: Use a mock implementation of Platform::crypto() for layout tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase onto master Created 7 years, 5 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/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "base/memory/shared_memory.h" 10 #include "base/memory/shared_memory.h"
(...skipping 1119 matching lines...) Expand 10 before | Expand all | Expand 10 after
1130 1130
1131 // static 1131 // static
1132 void RendererWebKitPlatformSupportImpl::SetMockDeviceMotionDataForTesting( 1132 void RendererWebKitPlatformSupportImpl::SetMockDeviceMotionDataForTesting(
1133 const WebKit::WebDeviceMotionData& data) { 1133 const WebKit::WebDeviceMotionData& data) {
1134 g_test_device_motion_data.Get() = data; 1134 g_test_device_motion_data.Get() = data;
1135 } 1135 }
1136 1136
1137 //------------------------------------------------------------------------------ 1137 //------------------------------------------------------------------------------
1138 1138
1139 WebKit::WebCrypto* RendererWebKitPlatformSupportImpl::crypto() { 1139 WebKit::WebCrypto* RendererWebKitPlatformSupportImpl::crypto() {
1140 // Use a mock implementation for testing in-progress work.
1141 WebKit::WebCrypto* crypto =
1142 GetContentClient()->renderer()->OverrideWebCrypto();
1143 if (crypto)
1144 return crypto;
1145
1140 if (!web_crypto_) 1146 if (!web_crypto_)
1141 web_crypto_.reset(new WebCryptoImpl()); 1147 web_crypto_.reset(new WebCryptoImpl());
1142 return web_crypto_.get(); 1148 return web_crypto_.get();
1143 1149
1144 } 1150 }
1145 1151
1146 //------------------------------------------------------------------------------ 1152 //------------------------------------------------------------------------------
1147 1153
1148 #if defined(OS_ANDROID) 1154 #if defined(OS_ANDROID)
1149 void RendererWebKitPlatformSupportImpl::vibrate(unsigned int milliseconds) { 1155 void RendererWebKitPlatformSupportImpl::vibrate(unsigned int milliseconds) {
(...skipping 12 matching lines...) Expand all
1162 const WebKit::WebURL& storage_partition, 1168 const WebKit::WebURL& storage_partition,
1163 WebKit::WebStorageQuotaType type, 1169 WebKit::WebStorageQuotaType type,
1164 WebKit::WebStorageQuotaCallbacks* callbacks) { 1170 WebKit::WebStorageQuotaCallbacks* callbacks) {
1165 ChildThread::current()->quota_dispatcher()->QueryStorageUsageAndQuota( 1171 ChildThread::current()->quota_dispatcher()->QueryStorageUsageAndQuota(
1166 storage_partition, 1172 storage_partition,
1167 static_cast<quota::StorageType>(type), 1173 static_cast<quota::StorageType>(type),
1168 QuotaDispatcher::CreateWebStorageQuotaCallbacksWrapper(callbacks)); 1174 QuotaDispatcher::CreateWebStorageQuotaCallbacksWrapper(callbacks));
1169 } 1175 }
1170 1176
1171 } // namespace content 1177 } // namespace content
OLDNEW
« no previous file with comments | « content/public/renderer/content_renderer_client.cc ('k') | content/shell/renderer/shell_content_renderer_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698