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 |
11 #include "base/at_exit.h" | 11 #include "base/at_exit.h" |
12 #include "base/bind.h" | 12 #include "base/bind.h" |
13 #include "base/command_line.h" | 13 #include "base/command_line.h" |
14 #include "base/debug/crash_logging.h" | 14 #include "base/debug/crash_logging.h" |
15 #include "base/debug/debugger.h" | 15 #include "base/debug/debugger.h" |
16 #include "base/files/file_path.h" | 16 #include "base/files/file_path.h" |
17 #include "base/files/file_util.h" | 17 #include "base/files/file_util.h" |
| 18 #include "base/metrics/call_stack_profile_params.h" |
18 #include "base/metrics/field_trial.h" | 19 #include "base/metrics/field_trial.h" |
19 #include "base/metrics/histogram_macros.h" | 20 #include "base/metrics/histogram_macros.h" |
20 #include "base/path_service.h" | 21 #include "base/path_service.h" |
21 #include "base/prefs/json_pref_store.h" | 22 #include "base/prefs/json_pref_store.h" |
22 #include "base/prefs/pref_registry_simple.h" | 23 #include "base/prefs/pref_registry_simple.h" |
23 #include "base/prefs/pref_service.h" | 24 #include "base/prefs/pref_service.h" |
24 #include "base/prefs/pref_value_store.h" | 25 #include "base/prefs/pref_value_store.h" |
25 #include "base/prefs/scoped_user_pref_update.h" | 26 #include "base/prefs/scoped_user_pref_update.h" |
26 #include "base/profiler/scoped_profile.h" | 27 #include "base/profiler/scoped_profile.h" |
27 #include "base/profiler/scoped_tracker.h" | 28 #include "base/profiler/scoped_tracker.h" |
(...skipping 551 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
579 : parameters_(parameters), | 580 : parameters_(parameters), |
580 parsed_command_line_(parameters.command_line), | 581 parsed_command_line_(parameters.command_line), |
581 result_code_(content::RESULT_CODE_NORMAL_EXIT), | 582 result_code_(content::RESULT_CODE_NORMAL_EXIT), |
582 startup_watcher_(new StartupTimeBomb()), | 583 startup_watcher_(new StartupTimeBomb()), |
583 shutdown_watcher_(new ShutdownWatcherHelper()), | 584 shutdown_watcher_(new ShutdownWatcherHelper()), |
584 browser_field_trials_(parameters.command_line), | 585 browser_field_trials_(parameters.command_line), |
585 sampling_profiler_( | 586 sampling_profiler_( |
586 base::PlatformThread::CurrentId(), | 587 base::PlatformThread::CurrentId(), |
587 GetStartupSamplingParams(), | 588 GetStartupSamplingParams(), |
588 metrics::CallStackProfileMetricsProvider::GetProfilerCallback( | 589 metrics::CallStackProfileMetricsProvider::GetProfilerCallback( |
589 metrics::CallStackProfileMetricsProvider::Params( | 590 base::CallStackProfileParams( |
590 metrics::CallStackProfileMetricsProvider::PROCESS_STARTUP, | 591 base::CallStackProfileParams::PROCESS_STARTUP, |
591 false))), | 592 false))), |
592 profile_(NULL), | 593 profile_(NULL), |
593 run_message_loop_(true), | 594 run_message_loop_(true), |
594 notify_result_(ProcessSingleton::PROCESS_NONE), | 595 notify_result_(ProcessSingleton::PROCESS_NONE), |
595 local_state_(NULL), | 596 local_state_(NULL), |
596 restart_last_session_(false) { | 597 restart_last_session_(false) { |
597 const version_info::Channel channel = chrome::GetChannel(); | 598 const version_info::Channel channel = chrome::GetChannel(); |
598 if (channel == version_info::Channel::UNKNOWN || | 599 if (channel == version_info::Channel::UNKNOWN || |
599 channel == version_info::Channel::CANARY || | 600 channel == version_info::Channel::CANARY || |
600 channel == version_info::Channel::DEV) { | 601 channel == version_info::Channel::DEV) { |
(...skipping 1221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1822 chromeos::CrosSettings::Shutdown(); | 1823 chromeos::CrosSettings::Shutdown(); |
1823 #endif // defined(OS_CHROMEOS) | 1824 #endif // defined(OS_CHROMEOS) |
1824 #endif // defined(OS_ANDROID) | 1825 #endif // defined(OS_ANDROID) |
1825 } | 1826 } |
1826 | 1827 |
1827 // Public members: | 1828 // Public members: |
1828 | 1829 |
1829 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { | 1830 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { |
1830 chrome_extra_parts_.push_back(parts); | 1831 chrome_extra_parts_.push_back(parts); |
1831 } | 1832 } |
OLD | NEW |