| 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 | |
| 413 g_target_services->LowerToken(); | 407 g_target_services->LowerToken(); |
| 414 } | 408 } |
| 415 #endif | 409 #endif |
| 416 | 410 |
| 417 if (is_broker_) { | 411 if (is_broker_) { |
| 418 // Get the InitializeBroker function (required). | 412 // Get the InitializeBroker function (required). |
| 419 InitializeBrokerFunc init_broker = | 413 InitializeBrokerFunc init_broker = |
| 420 reinterpret_cast<InitializeBrokerFunc>( | 414 reinterpret_cast<InitializeBrokerFunc>( |
| 421 library.GetFunctionPointer("PPP_InitializeBroker")); | 415 library.GetFunctionPointer("PPP_InitializeBroker")); |
| 422 if (!init_broker) { | 416 if (!init_broker) { |
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 608 GetHistogramName(is_broker_, "LoadTime", path), | 602 GetHistogramName(is_broker_, "LoadTime", path), |
| 609 base::TimeDelta::FromMilliseconds(1), | 603 base::TimeDelta::FromMilliseconds(1), |
| 610 base::TimeDelta::FromSeconds(10), | 604 base::TimeDelta::FromSeconds(10), |
| 611 50, | 605 50, |
| 612 base::HistogramBase::kUmaTargetedHistogramFlag); | 606 base::HistogramBase::kUmaTargetedHistogramFlag); |
| 613 | 607 |
| 614 histogram->AddTime(load_time); | 608 histogram->AddTime(load_time); |
| 615 } | 609 } |
| 616 | 610 |
| 617 } // namespace content | 611 } // namespace content |
| OLD | NEW |