| 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 #include "chrome/browser/browser_main_win.h" | 6 #include "chrome/browser/browser_main_win.h" |
| 7 | 7 |
| 8 #include <windows.h> | 8 #include <windows.h> |
| 9 #include <shellapi.h> | 9 #include <shellapi.h> |
| 10 | 10 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 #include "chrome/common/env_vars.h" | 27 #include "chrome/common/env_vars.h" |
| 28 #include "chrome/common/main_function_params.h" | 28 #include "chrome/common/main_function_params.h" |
| 29 #include "chrome/common/result_codes.h" | 29 #include "chrome/common/result_codes.h" |
| 30 #include "chrome/installer/util/browser_distribution.h" | 30 #include "chrome/installer/util/browser_distribution.h" |
| 31 #include "chrome/installer/util/helper.h" | 31 #include "chrome/installer/util/helper.h" |
| 32 #include "chrome/installer/util/install_util.h" | 32 #include "chrome/installer/util/install_util.h" |
| 33 #include "chrome/installer/util/shell_util.h" | 33 #include "chrome/installer/util/shell_util.h" |
| 34 #include "grit/chromium_strings.h" | 34 #include "grit/chromium_strings.h" |
| 35 #include "grit/generated_resources.h" | 35 #include "grit/generated_resources.h" |
| 36 #include "net/base/winsock_init.h" | 36 #include "net/base/winsock_init.h" |
| 37 #include "net/socket/ssl_client_socket_nss_factory.h" | 37 #include "net/socket/client_socket_factory.h" |
| 38 #include "ui/base/l10n/l10n_util.h" | 38 #include "ui/base/l10n/l10n_util.h" |
| 39 #include "ui/base/l10n/l10n_util_win.h" | 39 #include "ui/base/l10n/l10n_util_win.h" |
| 40 #include "ui/base/message_box_win.h" | 40 #include "ui/base/message_box_win.h" |
| 41 #include "views/focus/accelerator_handler.h" | 41 #include "views/focus/accelerator_handler.h" |
| 42 #include "views/window/window.h" | 42 #include "views/window/window.h" |
| 43 | 43 |
| 44 namespace { | 44 namespace { |
| 45 typedef HRESULT (STDAPICALLTYPE* RegisterApplicationRestartProc)( | 45 typedef HRESULT (STDAPICALLTYPE* RegisterApplicationRestartProc)( |
| 46 const wchar_t* command_line, | 46 const wchar_t* command_line, |
| 47 DWORD flags); | 47 DWORD flags); |
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 263 // has already been initialized. | 263 // has already been initialized. |
| 264 if (!parameters().ui_task) { | 264 if (!parameters().ui_task) { |
| 265 // Override the configured locale with the user's preferred UI language. | 265 // Override the configured locale with the user's preferred UI language. |
| 266 l10n_util::OverrideLocaleWithUILanguageList(); | 266 l10n_util::OverrideLocaleWithUILanguageList(); |
| 267 } | 267 } |
| 268 } | 268 } |
| 269 | 269 |
| 270 private: | 270 private: |
| 271 virtual void InitializeSSL() { | 271 virtual void InitializeSSL() { |
| 272 // Use NSS for SSL by default. | 272 // Use NSS for SSL by default. |
| 273 // Because of a build system issue (http://crbug.com/43461), the default | 273 // The default client socket factory uses NSS for SSL by default on |
| 274 // client socket factory uses SChannel (the system SSL library) for SSL by | 274 // Windows. |
| 275 // default on Windows. | 275 if (parsed_command_line().HasSwitch(switches::kUseSystemSSL)) { |
| 276 if (!parsed_command_line().HasSwitch(switches::kUseSystemSSL)) { | 276 net::ClientSocketFactory::UseSystemSSL(); |
| 277 net::ClientSocketFactory::SetSSLClientSocketFactory( | 277 } else { |
| 278 net::SSLClientSocketNSSFactory); | |
| 279 // We want to be sure to init NSPR on the main thread. | 278 // We want to be sure to init NSPR on the main thread. |
| 280 base::EnsureNSPRInit(); | 279 base::EnsureNSPRInit(); |
| 281 } | 280 } |
| 282 } | 281 } |
| 283 }; | 282 }; |
| 284 | 283 |
| 285 // static | 284 // static |
| 286 BrowserMainParts* BrowserMainParts::CreateBrowserMainParts( | 285 BrowserMainParts* BrowserMainParts::CreateBrowserMainParts( |
| 287 const MainFunctionParams& parameters) { | 286 const MainFunctionParams& parameters) { |
| 288 return new BrowserMainPartsWin(parameters); | 287 return new BrowserMainPartsWin(parameters); |
| 289 } | 288 } |
| OLD | NEW |