OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 #include "chrome/browser/metrics/field_trial_synchronizer.h" | 50 #include "chrome/browser/metrics/field_trial_synchronizer.h" |
51 #include "chrome/browser/metrics/histogram_synchronizer.h" | 51 #include "chrome/browser/metrics/histogram_synchronizer.h" |
52 #include "chrome/browser/metrics/metrics_log.h" | 52 #include "chrome/browser/metrics/metrics_log.h" |
53 #include "chrome/browser/metrics/metrics_service.h" | 53 #include "chrome/browser/metrics/metrics_service.h" |
54 #include "chrome/browser/metrics/thread_watcher.h" | 54 #include "chrome/browser/metrics/thread_watcher.h" |
55 #include "chrome/browser/net/chrome_dns_cert_provenance_checker.h" | 55 #include "chrome/browser/net/chrome_dns_cert_provenance_checker.h" |
56 #include "chrome/browser/net/chrome_dns_cert_provenance_checker_factory.h" | 56 #include "chrome/browser/net/chrome_dns_cert_provenance_checker_factory.h" |
57 #include "chrome/browser/net/chrome_net_log.h" | 57 #include "chrome/browser/net/chrome_net_log.h" |
58 #include "chrome/browser/net/predictor_api.h" | 58 #include "chrome/browser/net/predictor_api.h" |
59 #include "chrome/browser/net/sdch_dictionary_fetcher.h" | 59 #include "chrome/browser/net/sdch_dictionary_fetcher.h" |
60 #include "chrome/browser/plugin_prefs.h" | 60 #include "chrome/browser/plugin_updater.h" |
61 #include "chrome/browser/policy/browser_policy_connector.h" | 61 #include "chrome/browser/policy/browser_policy_connector.h" |
62 #include "chrome/browser/prefs/pref_service.h" | 62 #include "chrome/browser/prefs/pref_service.h" |
63 #include "chrome/browser/prefs/pref_value_store.h" | 63 #include "chrome/browser/prefs/pref_value_store.h" |
64 #include "chrome/browser/prerender/prerender_field_trial.h" | 64 #include "chrome/browser/prerender/prerender_field_trial.h" |
65 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service.h" | 65 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service.h" |
66 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service_factory.
h" | 66 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service_factory.
h" |
67 #include "chrome/browser/process_singleton.h" | 67 #include "chrome/browser/process_singleton.h" |
68 #include "chrome/browser/profiles/profile.h" | 68 #include "chrome/browser/profiles/profile.h" |
69 #include "chrome/browser/profiles/profile_manager.h" | 69 #include "chrome/browser/profiles/profile_manager.h" |
70 #include "chrome/browser/search_engines/search_engine_type.h" | 70 #include "chrome/browser/search_engines/search_engine_type.h" |
(...skipping 1828 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1899 // | 1899 // |
1900 // A simpler way of doing all this would be to have some function which could | 1900 // A simpler way of doing all this would be to have some function which could |
1901 // give the time elapsed since startup, and simply have these objects check | 1901 // give the time elapsed since startup, and simply have these objects check |
1902 // that when asked to initialize themselves, but this doesn't seem to exist. | 1902 // that when asked to initialize themselves, but this doesn't seem to exist. |
1903 // | 1903 // |
1904 // These can't be created in the BrowserProcessImpl constructor because they | 1904 // These can't be created in the BrowserProcessImpl constructor because they |
1905 // need to read prefs that get set after that runs. | 1905 // need to read prefs that get set after that runs. |
1906 browser_process->google_url_tracker(); | 1906 browser_process->google_url_tracker(); |
1907 browser_process->intranet_redirect_detector(); | 1907 browser_process->intranet_redirect_detector(); |
1908 | 1908 |
| 1909 // Do initialize the plug-in service (and related preferences). |
| 1910 PluginUpdater::GetInstance()->SetProfile(profile); |
| 1911 |
1909 // Prepare for memory caching of SDCH dictionaries. | 1912 // Prepare for memory caching of SDCH dictionaries. |
1910 // Perform A/B test to measure global impact of SDCH support. | 1913 // Perform A/B test to measure global impact of SDCH support. |
1911 // Set up a field trial to see what disabling SDCH does to latency of page | 1914 // Set up a field trial to see what disabling SDCH does to latency of page |
1912 // layout globally. | 1915 // layout globally. |
1913 base::FieldTrial::Probability kSDCH_DIVISOR = 1000; | 1916 base::FieldTrial::Probability kSDCH_DIVISOR = 1000; |
1914 base::FieldTrial::Probability kSDCH_DISABLE_PROBABILITY = 1; // 0.1% prob. | 1917 base::FieldTrial::Probability kSDCH_DISABLE_PROBABILITY = 1; // 0.1% prob. |
1915 // After June 30, 2011 builds, it will always be in default group. | 1918 // After June 30, 2011 builds, it will always be in default group. |
1916 scoped_refptr<base::FieldTrial> sdch_trial( | 1919 scoped_refptr<base::FieldTrial> sdch_trial( |
1917 new base::FieldTrial("GlobalSdch", kSDCH_DIVISOR, "global_enable_sdch", | 1920 new base::FieldTrial("GlobalSdch", kSDCH_DIVISOR, "global_enable_sdch", |
1918 2011, 6, 30)); | 1921 2011, 6, 30)); |
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2155 #if defined(OS_CHROMEOS) | 2158 #if defined(OS_CHROMEOS) |
2156 // To be precise, logout (browser shutdown) is not yet done, but the | 2159 // To be precise, logout (browser shutdown) is not yet done, but the |
2157 // remaining work is negligible, hence we say LogoutDone here. | 2160 // remaining work is negligible, hence we say LogoutDone here. |
2158 chromeos::BootTimesLoader::Get()->AddLogoutTimeMarker("LogoutDone", | 2161 chromeos::BootTimesLoader::Get()->AddLogoutTimeMarker("LogoutDone", |
2159 false); | 2162 false); |
2160 chromeos::BootTimesLoader::Get()->WriteLogoutTimes(); | 2163 chromeos::BootTimesLoader::Get()->WriteLogoutTimes(); |
2161 #endif | 2164 #endif |
2162 TRACE_EVENT_END_ETW("BrowserMain", 0, 0); | 2165 TRACE_EVENT_END_ETW("BrowserMain", 0, 0); |
2163 return result_code; | 2166 return result_code; |
2164 } | 2167 } |
OLD | NEW |