OLD | NEW |
---|---|
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
51 #include "chrome/browser/metrics/metrics_service.h" | 51 #include "chrome/browser/metrics/metrics_service.h" |
52 #include "chrome/browser/net/blob_url_request_job_factory.h" | 52 #include "chrome/browser/net/blob_url_request_job_factory.h" |
53 #include "chrome/browser/net/predictor_api.h" | 53 #include "chrome/browser/net/predictor_api.h" |
54 #include "chrome/browser/net/metadata_url_request.h" | 54 #include "chrome/browser/net/metadata_url_request.h" |
55 #include "chrome/browser/net/sdch_dictionary_fetcher.h" | 55 #include "chrome/browser/net/sdch_dictionary_fetcher.h" |
56 #include "chrome/browser/net/websocket_experiment/websocket_experiment_runner.h" | 56 #include "chrome/browser/net/websocket_experiment/websocket_experiment_runner.h" |
57 #include "chrome/browser/plugin_service.h" | 57 #include "chrome/browser/plugin_service.h" |
58 #include "chrome/browser/prefs/pref_service.h" | 58 #include "chrome/browser/prefs/pref_service.h" |
59 #include "chrome/browser/prefs/pref_value_store.h" | 59 #include "chrome/browser/prefs/pref_value_store.h" |
60 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service.h" | 60 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service.h" |
61 #include "chrome/browser/policy/device_management_backend_impl.h" | |
danno
2010/11/16 22:02:56
alphabetize
Mattias Nissler (ping if slow)
2010/11/19 17:21:53
Done.
| |
61 #include "chrome/browser/process_singleton.h" | 62 #include "chrome/browser/process_singleton.h" |
62 #include "chrome/browser/profile.h" | 63 #include "chrome/browser/profile.h" |
63 #include "chrome/browser/profile_manager.h" | 64 #include "chrome/browser/profile_manager.h" |
64 #include "chrome/browser/renderer_host/resource_dispatcher_host.h" | 65 #include "chrome/browser/renderer_host/resource_dispatcher_host.h" |
65 #include "chrome/browser/search_engines/search_engine_type.h" | 66 #include "chrome/browser/search_engines/search_engine_type.h" |
66 #include "chrome/browser/search_engines/template_url.h" | 67 #include "chrome/browser/search_engines/template_url.h" |
67 #include "chrome/browser/search_engines/template_url_model.h" | 68 #include "chrome/browser/search_engines/template_url_model.h" |
68 #include "chrome/browser/service/service_process_control.h" | 69 #include "chrome/browser/service/service_process_control.h" |
69 #include "chrome/browser/service/service_process_control_manager.h" | 70 #include "chrome/browser/service/service_process_control_manager.h" |
70 #include "chrome/browser/shell_integration.h" | 71 #include "chrome/browser/shell_integration.h" |
(...skipping 1257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1328 #endif | 1329 #endif |
1329 | 1330 |
1330 // Modifies the current command line based on active experiments on | 1331 // Modifies the current command line based on active experiments on |
1331 // about:flags. | 1332 // about:flags. |
1332 Profile* profile = CreateProfile(parameters, user_data_dir); | 1333 Profile* profile = CreateProfile(parameters, user_data_dir); |
1333 if (!profile) | 1334 if (!profile) |
1334 return ResultCodes::NORMAL_EXIT; | 1335 return ResultCodes::NORMAL_EXIT; |
1335 | 1336 |
1336 // Post-profile init --------------------------------------------------------- | 1337 // Post-profile init --------------------------------------------------------- |
1337 | 1338 |
1339 scoped_ptr<policy::DeviceManagementBackendImpl> device_management_backend( | |
1340 policy::DeviceManagementBackendImpl::Initialize(profile)); | |
1341 | |
1338 PrefService* user_prefs = profile->GetPrefs(); | 1342 PrefService* user_prefs = profile->GetPrefs(); |
1339 DCHECK(user_prefs); | 1343 DCHECK(user_prefs); |
1340 | 1344 |
1341 // Tests should be able to tune login manager before showing it. | 1345 // Tests should be able to tune login manager before showing it. |
1342 // Thus only show login manager in normal (non-testing) mode. | 1346 // Thus only show login manager in normal (non-testing) mode. |
1343 if (!parameters.ui_task) { | 1347 if (!parameters.ui_task) { |
1344 OptionallyRunChromeOSLoginManager(parsed_command_line); | 1348 OptionallyRunChromeOSLoginManager(parsed_command_line); |
1345 } | 1349 } |
1346 | 1350 |
1347 #if !defined(OS_MACOSX) | 1351 #if !defined(OS_MACOSX) |
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1654 SEARCH_ENGINE_MAX); | 1658 SEARCH_ENGINE_MAX); |
1655 } | 1659 } |
1656 } | 1660 } |
1657 #endif | 1661 #endif |
1658 | 1662 |
1659 chrome_browser_net_websocket_experiment::WebSocketExperimentRunner::Stop(); | 1663 chrome_browser_net_websocket_experiment::WebSocketExperimentRunner::Stop(); |
1660 | 1664 |
1661 process_singleton.Cleanup(); | 1665 process_singleton.Cleanup(); |
1662 | 1666 |
1663 metrics->Stop(); | 1667 metrics->Stop(); |
1668 device_management_backend.reset(); | |
1664 | 1669 |
1665 // browser_shutdown takes care of deleting browser_process, so we need to | 1670 // browser_shutdown takes care of deleting browser_process, so we need to |
1666 // release it. | 1671 // release it. |
1667 ignore_result(browser_process.release()); | 1672 ignore_result(browser_process.release()); |
1668 browser_shutdown::Shutdown(); | 1673 browser_shutdown::Shutdown(); |
1669 | 1674 |
1670 TRACE_EVENT_END("BrowserMain", 0, 0); | 1675 TRACE_EVENT_END("BrowserMain", 0, 0); |
1671 return result_code; | 1676 return result_code; |
1672 } | 1677 } |
OLD | NEW |