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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 #include "chrome/browser/translate/translate_manager.h" | 59 #include "chrome/browser/translate/translate_manager.h" |
60 #include "chrome/browser/user_data_manager.h" | 60 #include "chrome/browser/user_data_manager.h" |
61 #include "chrome/common/chrome_constants.h" | 61 #include "chrome/common/chrome_constants.h" |
62 #include "chrome/common/chrome_paths.h" | 62 #include "chrome/common/chrome_paths.h" |
63 #include "chrome/common/chrome_switches.h" | 63 #include "chrome/common/chrome_switches.h" |
64 #include "chrome/common/jstemplate_builder.h" | 64 #include "chrome/common/jstemplate_builder.h" |
65 #include "chrome/common/main_function_params.h" | 65 #include "chrome/common/main_function_params.h" |
66 #include "chrome/common/net/net_resource_provider.h" | 66 #include "chrome/common/net/net_resource_provider.h" |
67 #include "chrome/common/pref_names.h" | 67 #include "chrome/common/pref_names.h" |
68 #include "chrome/common/result_codes.h" | 68 #include "chrome/common/result_codes.h" |
| 69 #include "chrome/installer/util/browser_distribution.h" |
69 #include "chrome/installer/util/google_update_settings.h" | 70 #include "chrome/installer/util/google_update_settings.h" |
70 #include "chrome/installer/util/master_preferences.h" | 71 #include "chrome/installer/util/master_preferences.h" |
71 #include "grit/app_locale_settings.h" | 72 #include "grit/app_locale_settings.h" |
72 #include "grit/chromium_strings.h" | 73 #include "grit/chromium_strings.h" |
73 #include "grit/generated_resources.h" | 74 #include "grit/generated_resources.h" |
74 #include "net/base/cookie_monster.h" | 75 #include "net/base/cookie_monster.h" |
75 #include "net/base/net_module.h" | 76 #include "net/base/net_module.h" |
76 #include "net/http/http_network_session.h" | 77 #include "net/http/http_network_session.h" |
77 #include "net/http/http_network_transaction.h" | 78 #include "net/http/http_network_transaction.h" |
78 #include "net/socket/client_socket_pool_base.h" | 79 #include "net/socket/client_socket_pool_base.h" |
(...skipping 611 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
690 } | 691 } |
691 #endif // OS_POSIX | 692 #endif // OS_POSIX |
692 | 693 |
693 #if defined(OS_WIN) | 694 #if defined(OS_WIN) |
694 // Initialize Winsock. | 695 // Initialize Winsock. |
695 net::EnsureWinsockInit(); | 696 net::EnsureWinsockInit(); |
696 #endif // defined(OS_WIN) | 697 #endif // defined(OS_WIN) |
697 | 698 |
698 #if defined(OS_WIN) | 699 #if defined(OS_WIN) |
699 if (!parsed_command_line.HasSwitch(switches::kUseSChannel) || | 700 if (!parsed_command_line.HasSwitch(switches::kUseSChannel) || |
700 parsed_command_line.HasSwitch(switches::kUseSpdy)) { | 701 parsed_command_line.HasSwitch(switches::kUseSpdy) || |
| 702 BrowserDistribution::GetDistribution()->IsSpdyEnabled()) { |
701 net::ClientSocketFactory::SetSSLClientSocketFactory( | 703 net::ClientSocketFactory::SetSSLClientSocketFactory( |
702 net::SSLClientSocketNSSFactory); | 704 net::SSLClientSocketNSSFactory); |
703 // We want to be sure to init NSPR on the main thread. | 705 // We want to be sure to init NSPR on the main thread. |
704 base::EnsureNSPRInit(); | 706 base::EnsureNSPRInit(); |
705 } | 707 } |
706 #endif | 708 #endif |
707 | 709 |
708 // Do platform-specific things (such as finishing initializing Cocoa) | 710 // Do platform-specific things (such as finishing initializing Cocoa) |
709 // prior to instantiating the message loop. This could be turned into a | 711 // prior to instantiating the message loop. This could be turned into a |
710 // broadcast notification. | 712 // broadcast notification. |
(...skipping 528 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1239 | 1241 |
1240 metrics->Stop(); | 1242 metrics->Stop(); |
1241 | 1243 |
1242 // browser_shutdown takes care of deleting browser_process, so we need to | 1244 // browser_shutdown takes care of deleting browser_process, so we need to |
1243 // release it. | 1245 // release it. |
1244 ignore_result(browser_process.release()); | 1246 ignore_result(browser_process.release()); |
1245 browser_shutdown::Shutdown(); | 1247 browser_shutdown::Shutdown(); |
1246 | 1248 |
1247 return result_code; | 1249 return result_code; |
1248 } | 1250 } |
OLD | NEW |