| 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 "chrome/app/chrome_main_delegate.h" | 5 #include "chrome/app/chrome_main_delegate.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/base_paths.h" | 10 #include "base/base_paths.h" |
| (...skipping 617 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 628 if (recovery_exit_code) { | 628 if (recovery_exit_code) { |
| 629 // Recovery has failed somehow, so we exit. | 629 // Recovery has failed somehow, so we exit. |
| 630 *exit_code = recovery_exit_code; | 630 *exit_code = recovery_exit_code; |
| 631 return true; | 631 return true; |
| 632 } | 632 } |
| 633 } else { // Not running diagnostics or recovery. | 633 } else { // Not running diagnostics or recovery. |
| 634 diagnostics::DiagnosticsController::GetInstance()->RecordRegularStartup(); | 634 diagnostics::DiagnosticsController::GetInstance()->RecordRegularStartup(); |
| 635 } | 635 } |
| 636 #endif | 636 #endif |
| 637 | 637 |
| 638 if (command_line.HasSwitch(switches::kOriginTrialPublicKey)) { | |
| 639 chrome_content_client_.origin_trial_key_manager() | |
| 640 ->SetPublicKeyFromASCIIString( | |
| 641 command_line.GetSwitchValueASCII(switches::kOriginTrialPublicKey)); | |
| 642 } | |
| 643 | |
| 644 content::SetContentClient(&chrome_content_client_); | 638 content::SetContentClient(&chrome_content_client_); |
| 645 | 639 |
| 646 #if defined (OS_CHROMEOS) | 640 #if defined (OS_CHROMEOS) |
| 647 // The TLS slot used by metrics::LeakDetector needs to be initialized early to | 641 // The TLS slot used by metrics::LeakDetector needs to be initialized early to |
| 648 // ensure that it gets assigned a low slow number. If it gets initialized too | 642 // ensure that it gets assigned a low slow number. If it gets initialized too |
| 649 // late, the glibc TLS system will require a malloc call in order to allocate | 643 // late, the glibc TLS system will require a malloc call in order to allocate |
| 650 // storage for a higher slot number. Normally that's not a problem, but in | 644 // storage for a higher slot number. Normally that's not a problem, but in |
| 651 // LeakDetector it will result in recursive alloc hook function calls. | 645 // LeakDetector it will result in recursive alloc hook function calls. |
| 652 metrics::LeakDetector::InitTLSSlot(); | 646 metrics::LeakDetector::InitTLSSlot(); |
| 653 #endif | 647 #endif |
| (...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1033 case version_info::Channel::CANARY: | 1027 case version_info::Channel::CANARY: |
| 1034 return true; | 1028 return true; |
| 1035 case version_info::Channel::DEV: | 1029 case version_info::Channel::DEV: |
| 1036 case version_info::Channel::BETA: | 1030 case version_info::Channel::BETA: |
| 1037 case version_info::Channel::STABLE: | 1031 case version_info::Channel::STABLE: |
| 1038 default: | 1032 default: |
| 1039 // Don't enable instrumentation. | 1033 // Don't enable instrumentation. |
| 1040 return false; | 1034 return false; |
| 1041 } | 1035 } |
| 1042 } | 1036 } |
| OLD | NEW |