| OLD | NEW |
| 1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2009 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/browser_main.h" | 5 #include "chrome/browser/browser_main.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "app/l10n_util.h" | 9 #include "app/l10n_util.h" |
| 10 #include "app/resource_bundle.h" | 10 #include "app/resource_bundle.h" |
| (...skipping 824 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 835 // on recording, but not reporting, otherwise tests fail. | 835 // on recording, but not reporting, otherwise tests fail. |
| 836 if (record_only) { | 836 if (record_only) { |
| 837 metrics->StartRecordingOnly(); | 837 metrics->StartRecordingOnly(); |
| 838 } else { | 838 } else { |
| 839 // If the user permits metrics reporting with the checkbox in the | 839 // If the user permits metrics reporting with the checkbox in the |
| 840 // prefs, we turn on recording. | 840 // prefs, we turn on recording. |
| 841 metrics->SetUserPermitsUpload(enabled); | 841 metrics->SetUserPermitsUpload(enabled); |
| 842 if (enabled) | 842 if (enabled) |
| 843 metrics->Start(); | 843 metrics->Start(); |
| 844 } | 844 } |
| 845 // TODO(ukai): Bug 28096: Implement ExperimentRunner so that it does not |
| 846 // tear down histograms early, and cause a crash. |
| 847 /* |
| 845 chrome_browser_net_websocket_experiment::WebSocketExperimentRunner::Start(); | 848 chrome_browser_net_websocket_experiment::WebSocketExperimentRunner::Start(); |
| 849 */ |
| 846 } | 850 } |
| 847 | 851 |
| 848 InstallJankometer(parsed_command_line); | 852 InstallJankometer(parsed_command_line); |
| 849 | 853 |
| 850 #if defined(OS_WIN) && !defined(GOOGLE_CHROME_BUILD) | 854 #if defined(OS_WIN) && !defined(GOOGLE_CHROME_BUILD) |
| 851 if (parsed_command_line.HasSwitch(switches::kDebugPrint)) { | 855 if (parsed_command_line.HasSwitch(switches::kDebugPrint)) { |
| 852 printing::PrintedDocument::set_debug_dump_path( | 856 printing::PrintedDocument::set_debug_dump_path( |
| 853 parsed_command_line.GetSwitchValue(switches::kDebugPrint)); | 857 parsed_command_line.GetSwitchValue(switches::kDebugPrint)); |
| 854 } | 858 } |
| 855 #endif | 859 #endif |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 903 if (metrics) | 907 if (metrics) |
| 904 metrics->Stop(); | 908 metrics->Stop(); |
| 905 | 909 |
| 906 // browser_shutdown takes care of deleting browser_process, so we need to | 910 // browser_shutdown takes care of deleting browser_process, so we need to |
| 907 // release it. | 911 // release it. |
| 908 browser_process.release(); | 912 browser_process.release(); |
| 909 browser_shutdown::Shutdown(); | 913 browser_shutdown::Shutdown(); |
| 910 | 914 |
| 911 return result_code; | 915 return result_code; |
| 912 } | 916 } |
| OLD | NEW |