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/ppapi_plugin/ppapi_thread.h" | 5 #include "content/ppapi_plugin/ppapi_thread.h" |
6 | 6 |
7 #include <limits> | 7 #include <limits> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/cpu.h" | 10 #include "base/cpu.h" |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 #include "ppapi/proxy/plugin_globals.h" | 45 #include "ppapi/proxy/plugin_globals.h" |
46 #include "ppapi/proxy/plugin_message_filter.h" | 46 #include "ppapi/proxy/plugin_message_filter.h" |
47 #include "ppapi/proxy/ppapi_messages.h" | 47 #include "ppapi/proxy/ppapi_messages.h" |
48 #include "ppapi/proxy/resource_reply_thread_registrar.h" | 48 #include "ppapi/proxy/resource_reply_thread_registrar.h" |
49 #include "third_party/WebKit/public/web/WebKit.h" | 49 #include "third_party/WebKit/public/web/WebKit.h" |
50 #include "ui/base/ui_base_switches.h" | 50 #include "ui/base/ui_base_switches.h" |
51 | 51 |
52 #if defined(OS_WIN) | 52 #if defined(OS_WIN) |
53 #include "base/win/win_util.h" | 53 #include "base/win/win_util.h" |
54 #include "base/win/windows_version.h" | 54 #include "base/win/windows_version.h" |
| 55 #include "content/common/font_warmup_win.h" |
55 #include "sandbox/win/src/sandbox.h" | 56 #include "sandbox/win/src/sandbox.h" |
56 #elif defined(OS_MACOSX) | 57 #elif defined(OS_MACOSX) |
57 #include "content/common/sandbox_init_mac.h" | 58 #include "content/common/sandbox_init_mac.h" |
58 #endif | 59 #endif |
59 | 60 |
60 #if defined(OS_WIN) | 61 #if defined(OS_WIN) |
61 const char kWidevineCdmAdapterFileName[] = "widevinecdmadapter.dll"; | 62 const char kWidevineCdmAdapterFileName[] = "widevinecdmadapter.dll"; |
62 | 63 |
63 extern sandbox::TargetServices* g_target_services; | 64 extern sandbox::TargetServices* g_target_services; |
64 | 65 |
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
439 } | 440 } |
440 } | 441 } |
441 } | 442 } |
442 | 443 |
443 // Cause advapi32 to load before the sandbox is turned on. | 444 // Cause advapi32 to load before the sandbox is turned on. |
444 unsigned int dummy_rand; | 445 unsigned int dummy_rand; |
445 rand_s(&dummy_rand); | 446 rand_s(&dummy_rand); |
446 | 447 |
447 WarmupWindowsLocales(permissions); | 448 WarmupWindowsLocales(permissions); |
448 | 449 |
| 450 if (IsWin32kLockdownEnabled() && |
| 451 permissions.HasPermission(ppapi::PERMISSION_FLASH)) { |
| 452 PatchGdiFontEnumeration(path); |
| 453 } |
| 454 |
449 g_target_services->LowerToken(); | 455 g_target_services->LowerToken(); |
450 } | 456 } |
451 #endif | 457 #endif |
452 | 458 |
453 if (is_broker_) { | 459 if (is_broker_) { |
454 // Get the InitializeBroker function (required). | 460 // Get the InitializeBroker function (required). |
455 InitializeBrokerFunc init_broker = | 461 InitializeBrokerFunc init_broker = |
456 reinterpret_cast<InitializeBrokerFunc>( | 462 reinterpret_cast<InitializeBrokerFunc>( |
457 library.GetFunctionPointer("PPP_InitializeBroker")); | 463 library.GetFunctionPointer("PPP_InitializeBroker")); |
458 if (!init_broker) { | 464 if (!init_broker) { |
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
644 GetHistogramName(is_broker_, "LoadTime", path), | 650 GetHistogramName(is_broker_, "LoadTime", path), |
645 base::TimeDelta::FromMilliseconds(1), | 651 base::TimeDelta::FromMilliseconds(1), |
646 base::TimeDelta::FromSeconds(10), | 652 base::TimeDelta::FromSeconds(10), |
647 50, | 653 50, |
648 base::HistogramBase::kUmaTargetedHistogramFlag); | 654 base::HistogramBase::kUmaTargetedHistogramFlag); |
649 | 655 |
650 histogram->AddTime(load_time); | 656 histogram->AddTime(load_time); |
651 } | 657 } |
652 | 658 |
653 } // namespace content | 659 } // namespace content |
OLD | NEW |