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 28 matching lines...) Expand all Loading... |
39 #include "chrome/browser/browser_process.h" | 39 #include "chrome/browser/browser_process.h" |
40 #include "chrome/browser/browser_process_impl.h" | 40 #include "chrome/browser/browser_process_impl.h" |
41 #include "chrome/browser/browser_shutdown.h" | 41 #include "chrome/browser/browser_shutdown.h" |
42 #include "chrome/browser/browser_thread.h" | 42 #include "chrome/browser/browser_thread.h" |
43 #include "chrome/browser/dom_ui/chrome_url_data_manager.h" | 43 #include "chrome/browser/dom_ui/chrome_url_data_manager.h" |
44 #include "chrome/browser/extensions/extension_protocols.h" | 44 #include "chrome/browser/extensions/extension_protocols.h" |
45 #include "chrome/browser/extensions/extensions_service.h" | 45 #include "chrome/browser/extensions/extensions_service.h" |
46 #include "chrome/browser/extensions/extensions_startup.h" | 46 #include "chrome/browser/extensions/extensions_startup.h" |
47 #include "chrome/browser/first_run/first_run.h" | 47 #include "chrome/browser/first_run/first_run.h" |
48 #include "chrome/browser/jankometer.h" | 48 #include "chrome/browser/jankometer.h" |
49 #include "chrome/browser/labs.h" | |
50 #include "chrome/browser/metrics/histogram_synchronizer.h" | 49 #include "chrome/browser/metrics/histogram_synchronizer.h" |
51 #include "chrome/browser/metrics/metrics_log.h" | 50 #include "chrome/browser/metrics/metrics_log.h" |
52 #include "chrome/browser/metrics/metrics_service.h" | 51 #include "chrome/browser/metrics/metrics_service.h" |
53 #include "chrome/browser/net/blob_url_request_job_factory.h" | 52 #include "chrome/browser/net/blob_url_request_job_factory.h" |
54 #include "chrome/browser/net/predictor_api.h" | 53 #include "chrome/browser/net/predictor_api.h" |
55 #include "chrome/browser/net/metadata_url_request.h" | 54 #include "chrome/browser/net/metadata_url_request.h" |
56 #include "chrome/browser/net/sdch_dictionary_fetcher.h" | 55 #include "chrome/browser/net/sdch_dictionary_fetcher.h" |
57 #include "chrome/browser/net/websocket_experiment/websocket_experiment_runner.h" | 56 #include "chrome/browser/net/websocket_experiment/websocket_experiment_runner.h" |
58 #include "chrome/browser/plugin_service.h" | 57 #include "chrome/browser/plugin_service.h" |
59 #include "chrome/browser/prefs/pref_service.h" | 58 #include "chrome/browser/prefs/pref_service.h" |
(...skipping 1147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1207 user_data_dir.Append(profile_manager->GetCurrentProfileDir()), | 1206 user_data_dir.Append(profile_manager->GetCurrentProfileDir()), |
1208 *(CommandLine::ForCurrentProcess()), | 1207 *(CommandLine::ForCurrentProcess()), |
1209 logging::DELETE_OLD_LOG_FILE); | 1208 logging::DELETE_OLD_LOG_FILE); |
1210 } | 1209 } |
1211 #endif | 1210 #endif |
1212 | 1211 |
1213 #if defined(USE_X11) | 1212 #if defined(USE_X11) |
1214 SetBrowserX11ErrorHandlers(); | 1213 SetBrowserX11ErrorHandlers(); |
1215 #endif | 1214 #endif |
1216 | 1215 |
1217 // Modifies the current command line based on active labs. | 1216 // Modifies the current command line based on active experiments on |
| 1217 // about:flags. |
1218 Profile* profile = CreateProfile(parameters, user_data_dir); | 1218 Profile* profile = CreateProfile(parameters, user_data_dir); |
1219 if (!profile) | 1219 if (!profile) |
1220 return ResultCodes::NORMAL_EXIT; | 1220 return ResultCodes::NORMAL_EXIT; |
1221 | 1221 |
1222 // Post-profile init --------------------------------------------------------- | 1222 // Post-profile init --------------------------------------------------------- |
1223 | 1223 |
1224 PrefService* user_prefs = profile->GetPrefs(); | 1224 PrefService* user_prefs = profile->GetPrefs(); |
1225 DCHECK(user_prefs); | 1225 DCHECK(user_prefs); |
1226 | 1226 |
1227 // Tests should be able to tune login manager before showing it. | 1227 // Tests should be able to tune login manager before showing it. |
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1544 metrics->Stop(); | 1544 metrics->Stop(); |
1545 | 1545 |
1546 // browser_shutdown takes care of deleting browser_process, so we need to | 1546 // browser_shutdown takes care of deleting browser_process, so we need to |
1547 // release it. | 1547 // release it. |
1548 ignore_result(browser_process.release()); | 1548 ignore_result(browser_process.release()); |
1549 browser_shutdown::Shutdown(); | 1549 browser_shutdown::Shutdown(); |
1550 | 1550 |
1551 TRACE_EVENT_END("BrowserMain", 0, 0); | 1551 TRACE_EVENT_END("BrowserMain", 0, 0); |
1552 return result_code; | 1552 return result_code; |
1553 } | 1553 } |
OLD | NEW |