| 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 618 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 629 if (recovery_exit_code) { | 629 if (recovery_exit_code) { |
| 630 // Recovery has failed somehow, so we exit. | 630 // Recovery has failed somehow, so we exit. |
| 631 *exit_code = recovery_exit_code; | 631 *exit_code = recovery_exit_code; |
| 632 return true; | 632 return true; |
| 633 } | 633 } |
| 634 } else { // Not running diagnostics or recovery. | 634 } else { // Not running diagnostics or recovery. |
| 635 diagnostics::DiagnosticsController::GetInstance()->RecordRegularStartup(); | 635 diagnostics::DiagnosticsController::GetInstance()->RecordRegularStartup(); |
| 636 } | 636 } |
| 637 #endif | 637 #endif |
| 638 | 638 |
| 639 chrome_content_client_.InitializeOriginTrialPolicy(); | |
| 640 content::SetContentClient(&chrome_content_client_); | 639 content::SetContentClient(&chrome_content_client_); |
| 641 | 640 |
| 642 #if defined (OS_CHROMEOS) | 641 #if defined (OS_CHROMEOS) |
| 643 // The TLS slot used by metrics::LeakDetector needs to be initialized early to | 642 // The TLS slot used by metrics::LeakDetector needs to be initialized early to |
| 644 // ensure that it gets assigned a low slow number. If it gets initialized too | 643 // ensure that it gets assigned a low slow number. If it gets initialized too |
| 645 // late, the glibc TLS system will require a malloc call in order to allocate | 644 // late, the glibc TLS system will require a malloc call in order to allocate |
| 646 // storage for a higher slot number. Normally that's not a problem, but in | 645 // storage for a higher slot number. Normally that's not a problem, but in |
| 647 // LeakDetector it will result in recursive alloc hook function calls. | 646 // LeakDetector it will result in recursive alloc hook function calls. |
| 648 metrics::LeakDetector::InitTLSSlot(); | 647 metrics::LeakDetector::InitTLSSlot(); |
| 649 #endif | 648 #endif |
| (...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1038 case version_info::Channel::CANARY: | 1037 case version_info::Channel::CANARY: |
| 1039 return true; | 1038 return true; |
| 1040 case version_info::Channel::DEV: | 1039 case version_info::Channel::DEV: |
| 1041 case version_info::Channel::BETA: | 1040 case version_info::Channel::BETA: |
| 1042 case version_info::Channel::STABLE: | 1041 case version_info::Channel::STABLE: |
| 1043 default: | 1042 default: |
| 1044 // Don't enable instrumentation. | 1043 // Don't enable instrumentation. |
| 1045 return false; | 1044 return false; |
| 1046 } | 1045 } |
| 1047 } | 1046 } |
| OLD | NEW |