| 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/browser/chrome_browser_main.h" | 5 #include "chrome/browser/chrome_browser_main.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 658 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 669 | 669 |
| 670 // Initialize FieldTrialSynchronizer system. This is a singleton and is used | 670 // Initialize FieldTrialSynchronizer system. This is a singleton and is used |
| 671 // for posting tasks via base::Bind. Its deleted when it goes out of scope. | 671 // for posting tasks via base::Bind. Its deleted when it goes out of scope. |
| 672 // Even though base::Bind does AddRef and Release, the object will not be | 672 // Even though base::Bind does AddRef and Release, the object will not be |
| 673 // deleted after the Task is executed. | 673 // deleted after the Task is executed. |
| 674 field_trial_synchronizer_ = new FieldTrialSynchronizer(); | 674 field_trial_synchronizer_ = new FieldTrialSynchronizer(); |
| 675 | 675 |
| 676 // Now that field trials have been created, initializes metrics recording. | 676 // Now that field trials have been created, initializes metrics recording. |
| 677 metrics->InitializeMetricsRecordingState(); | 677 metrics->InitializeMetricsRecordingState(); |
| 678 | 678 |
| 679 const chrome::VersionInfo::Channel channel = | 679 const version_info::Channel channel = |
| 680 chrome::VersionInfo::GetChannel(); | 680 chrome::VersionInfo::GetChannel(); |
| 681 | 681 |
| 682 // TODO(dalecurtis): Remove these checks and enable for all channels once we | 682 // TODO(dalecurtis): Remove these checks and enable for all channels once we |
| 683 // track down the root causes of crbug.com/422522 and crbug.com/478932. | 683 // track down the root causes of crbug.com/422522 and crbug.com/478932. |
| 684 if (channel == chrome::VersionInfo::CHANNEL_UNKNOWN || | 684 if (channel == version_info::Channel::UNKNOWN || |
| 685 channel == chrome::VersionInfo::CHANNEL_CANARY || | 685 channel == version_info::Channel::CANARY || |
| 686 channel == chrome::VersionInfo::CHANNEL_DEV) { | 686 channel == version_info::Channel::DEV) { |
| 687 media::AudioManager::EnableHangMonitor(); | 687 media::AudioManager::EnableHangMonitor(); |
| 688 } | 688 } |
| 689 | 689 |
| 690 // Enable profiler instrumentation depending on the channel. | 690 // Enable profiler instrumentation depending on the channel. |
| 691 switch (channel) { | 691 switch (channel) { |
| 692 case chrome::VersionInfo::CHANNEL_UNKNOWN: | 692 case version_info::Channel::UNKNOWN: |
| 693 case chrome::VersionInfo::CHANNEL_CANARY: | 693 case version_info::Channel::CANARY: |
| 694 tracked_objects::ScopedTracker::Enable(); | 694 tracked_objects::ScopedTracker::Enable(); |
| 695 break; | 695 break; |
| 696 | 696 |
| 697 case chrome::VersionInfo::CHANNEL_DEV: | 697 case version_info::Channel::DEV: |
| 698 case chrome::VersionInfo::CHANNEL_BETA: | 698 case version_info::Channel::BETA: |
| 699 case chrome::VersionInfo::CHANNEL_STABLE: | 699 case version_info::Channel::STABLE: |
| 700 // Don't enable instrumentation. | 700 // Don't enable instrumentation. |
| 701 break; | 701 break; |
| 702 } | 702 } |
| 703 } | 703 } |
| 704 | 704 |
| 705 // ChromeBrowserMainParts: |SetupMetricsAndFieldTrials()| related -------------- | 705 // ChromeBrowserMainParts: |SetupMetricsAndFieldTrials()| related -------------- |
| 706 | 706 |
| 707 void ChromeBrowserMainParts::StartMetricsRecording() { | 707 void ChromeBrowserMainParts::StartMetricsRecording() { |
| 708 TRACE_EVENT0("startup", "ChromeBrowserMainParts::StartMetricsRecording"); | 708 TRACE_EVENT0("startup", "ChromeBrowserMainParts::StartMetricsRecording"); |
| 709 | 709 |
| (...skipping 1090 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1800 chromeos::CrosSettings::Shutdown(); | 1800 chromeos::CrosSettings::Shutdown(); |
| 1801 #endif // defined(OS_CHROMEOS) | 1801 #endif // defined(OS_CHROMEOS) |
| 1802 #endif // defined(OS_ANDROID) | 1802 #endif // defined(OS_ANDROID) |
| 1803 } | 1803 } |
| 1804 | 1804 |
| 1805 // Public members: | 1805 // Public members: |
| 1806 | 1806 |
| 1807 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { | 1807 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { |
| 1808 chrome_extra_parts_.push_back(parts); | 1808 chrome_extra_parts_.push_back(parts); |
| 1809 } | 1809 } |
| OLD | NEW |