| 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 386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 397 } | 397 } |
| 398 } | 398 } |
| 399 } | 399 } |
| 400 | 400 |
| 401 // Cause advapi32 to load before the sandbox is turned on. | 401 // Cause advapi32 to load before the sandbox is turned on. |
| 402 unsigned int dummy_rand; | 402 unsigned int dummy_rand; |
| 403 rand_s(&dummy_rand); | 403 rand_s(&dummy_rand); |
| 404 | 404 |
| 405 WarmupWindowsLocales(permissions); | 405 WarmupWindowsLocales(permissions); |
| 406 | 406 |
| 407 #if defined(ADDRESS_SANITIZER) |
| 408 // Bind and leak dbghelp.dll before the token is lowered, otherwise |
| 409 // AddressSanitizer will crash when trying to symbolize a report. |
| 410 LoadLibraryA("dbghelp.dll"); |
| 411 #endif |
| 412 |
| 407 g_target_services->LowerToken(); | 413 g_target_services->LowerToken(); |
| 408 } | 414 } |
| 409 #endif | 415 #endif |
| 410 | 416 |
| 411 if (is_broker_) { | 417 if (is_broker_) { |
| 412 // Get the InitializeBroker function (required). | 418 // Get the InitializeBroker function (required). |
| 413 InitializeBrokerFunc init_broker = | 419 InitializeBrokerFunc init_broker = |
| 414 reinterpret_cast<InitializeBrokerFunc>( | 420 reinterpret_cast<InitializeBrokerFunc>( |
| 415 library.GetFunctionPointer("PPP_InitializeBroker")); | 421 library.GetFunctionPointer("PPP_InitializeBroker")); |
| 416 if (!init_broker) { | 422 if (!init_broker) { |
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 602 GetHistogramName(is_broker_, "LoadTime", path), | 608 GetHistogramName(is_broker_, "LoadTime", path), |
| 603 base::TimeDelta::FromMilliseconds(1), | 609 base::TimeDelta::FromMilliseconds(1), |
| 604 base::TimeDelta::FromSeconds(10), | 610 base::TimeDelta::FromSeconds(10), |
| 605 50, | 611 50, |
| 606 base::HistogramBase::kUmaTargetedHistogramFlag); | 612 base::HistogramBase::kUmaTargetedHistogramFlag); |
| 607 | 613 |
| 608 histogram->AddTime(load_time); | 614 histogram->AddTime(load_time); |
| 609 } | 615 } |
| 610 | 616 |
| 611 } // namespace content | 617 } // namespace content |
| OLD | NEW |