| 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 "build/build_config.h" | 5 #include "build/build_config.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 764 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 775 | 775 |
| 776 HandleErrorTestParameters(parsed_command_line); | 776 HandleErrorTestParameters(parsed_command_line); |
| 777 RecordBreakpadStatusUMA(metrics); | 777 RecordBreakpadStatusUMA(metrics); |
| 778 // Start up the extensions service. This should happen before Start(). | 778 // Start up the extensions service. This should happen before Start(). |
| 779 profile->InitExtensions(); | 779 profile->InitExtensions(); |
| 780 // Start up the web resource service. This starts loading data after a | 780 // Start up the web resource service. This starts loading data after a |
| 781 // short delay so as not to interfere with startup time. | 781 // short delay so as not to interfere with startup time. |
| 782 if (parsed_command_line.HasSwitch(switches::kEnableWebResources)) | 782 if (parsed_command_line.HasSwitch(switches::kEnableWebResources)) |
| 783 profile->InitWebResources(); | 783 profile->InitWebResources(); |
| 784 | 784 |
| 785 // Stat the directory with the inspector's files so that we can know if we |
| 786 // should display the entry in the context menu or not. |
| 787 browser_process->CheckForInspectorFiles(); |
| 788 |
| 785 int result_code = ResultCodes::NORMAL_EXIT; | 789 int result_code = ResultCodes::NORMAL_EXIT; |
| 786 if (parameters.ui_task) { | 790 if (parameters.ui_task) { |
| 787 // We are in test mode. Run one task and enter the main message loop. | 791 // We are in test mode. Run one task and enter the main message loop. |
| 788 if (pool) | 792 if (pool) |
| 789 pool->Recycle(); | 793 pool->Recycle(); |
| 790 MessageLoopForUI::current()->PostTask(FROM_HERE, parameters.ui_task); | 794 MessageLoopForUI::current()->PostTask(FROM_HERE, parameters.ui_task); |
| 791 RunUIMessageLoop(browser_process.get()); | 795 RunUIMessageLoop(browser_process.get()); |
| 792 } else { | 796 } else { |
| 793 // We are in regular browser boot sequence. Open initial stabs and enter | 797 // We are in regular browser boot sequence. Open initial stabs and enter |
| 794 // the main message loop. | 798 // the main message loop. |
| (...skipping 12 matching lines...) Expand all Loading... |
| 807 if (metrics) | 811 if (metrics) |
| 808 metrics->Stop(); | 812 metrics->Stop(); |
| 809 | 813 |
| 810 // browser_shutdown takes care of deleting browser_process, so we need to | 814 // browser_shutdown takes care of deleting browser_process, so we need to |
| 811 // release it. | 815 // release it. |
| 812 browser_process.release(); | 816 browser_process.release(); |
| 813 browser_shutdown::Shutdown(); | 817 browser_shutdown::Shutdown(); |
| 814 | 818 |
| 815 return result_code; | 819 return result_code; |
| 816 } | 820 } |
| OLD | NEW |