Chromium Code Reviews| OLD | NEW |
|---|---|
| 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_blink_platform_impl.h" | 5 #include "content/renderer/renderer_blink_platform_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/location.h" | 10 #include "base/location.h" |
| (...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 416 sudden_termination_disables_++; | 416 sudden_termination_disables_++; |
| 417 if (sudden_termination_disables_ != 1) | 417 if (sudden_termination_disables_ != 1) |
| 418 return; | 418 return; |
| 419 } | 419 } |
| 420 | 420 |
| 421 RenderThread* thread = RenderThread::Get(); | 421 RenderThread* thread = RenderThread::Get(); |
| 422 if (thread) // NULL in unittests. | 422 if (thread) // NULL in unittests. |
| 423 thread->Send(new RenderProcessHostMsg_SuddenTerminationChanged(enabled)); | 423 thread->Send(new RenderProcessHostMsg_SuddenTerminationChanged(enabled)); |
| 424 } | 424 } |
| 425 | 425 |
| 426 bool RendererBlinkPlatformImpl::canGrantUniversalAccess() { | |
| 427 if (!GetContentClient() | |
| 428 ->renderer() | |
| 429 ->ShouldEnforceUniversalAccessRestrictions()) { | |
| 430 return true; | |
| 431 } | |
| 432 bool is_access_grantable = false; | |
| 433 if (RenderThread* thread = RenderThread::Get()) { | |
|
esprehn
2015/12/10 08:06:44
how is it possible that this is null? I don;t thin
| |
| 434 thread->Send(new RenderProcessHostMsg_GetUniversalAccessDisposition( | |
|
Marshall
2015/12/09 14:20:22
Since the result of this sync IPC call is effectiv
jochen (gone - plz use gerrit)
2015/12/10 15:39:32
a compromised renderer can just not ask the browse
| |
| 435 &is_access_grantable)); | |
| 436 } | |
| 437 return is_access_grantable; | |
| 438 } | |
| 439 | |
| 426 WebStorageNamespace* RendererBlinkPlatformImpl::createLocalStorageNamespace() { | 440 WebStorageNamespace* RendererBlinkPlatformImpl::createLocalStorageNamespace() { |
| 427 return new WebStorageNamespaceImpl(); | 441 return new WebStorageNamespaceImpl(); |
| 428 } | 442 } |
| 429 | 443 |
| 430 | 444 |
| 431 //------------------------------------------------------------------------------ | 445 //------------------------------------------------------------------------------ |
| 432 | 446 |
| 433 WebIDBFactory* RendererBlinkPlatformImpl::idbFactory() { | 447 WebIDBFactory* RendererBlinkPlatformImpl::idbFactory() { |
| 434 return web_idb_factory_.get(); | 448 return web_idb_factory_.get(); |
| 435 } | 449 } |
| (...skipping 852 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1288 //------------------------------------------------------------------------------ | 1302 //------------------------------------------------------------------------------ |
| 1289 | 1303 |
| 1290 void RendererBlinkPlatformImpl::MockBatteryStatusChangedForTesting( | 1304 void RendererBlinkPlatformImpl::MockBatteryStatusChangedForTesting( |
| 1291 const blink::WebBatteryStatus& status) { | 1305 const blink::WebBatteryStatus& status) { |
| 1292 if (!g_test_battery_status_listener) | 1306 if (!g_test_battery_status_listener) |
| 1293 return; | 1307 return; |
| 1294 g_test_battery_status_listener->updateBatteryStatus(status); | 1308 g_test_battery_status_listener->updateBatteryStatus(status); |
| 1295 } | 1309 } |
| 1296 | 1310 |
| 1297 } // namespace content | 1311 } // namespace content |
| OLD | NEW |