Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(584)

Unified Diff: chrome/browser/browser_main_win.cc

Issue 7779040: Start moving code from BrowserMain to content, so that it can be reused by all embedders of conte... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix windows unittest Created 9 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/browser_main_win.cc
===================================================================
--- chrome/browser/browser_main_win.cc (revision 99756)
+++ chrome/browser/browser_main_win.cc (working copy)
@@ -2,7 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/browser_main.h"
#include "chrome/browser/browser_main_win.h"
#include <windows.h>
@@ -62,10 +61,14 @@
}
} // namespace
+namespace content {
+
void DidEndMainMessageLoop() {
OleUninitialize();
}
+}
+
void RecordBreakpadStatusUMA(MetricsService* metrics) {
DWORD len = ::GetEnvironmentVariableW(
ASCIIToWide(env_vars::kNoOOBreakpad).c_str() , NULL, 0);
@@ -280,47 +283,37 @@
// BrowserMainPartsWin ---------------------------------------------------------
-class BrowserMainPartsWin : public BrowserMainParts {
- public:
- explicit BrowserMainPartsWin(const MainFunctionParams& parameters)
- : BrowserMainParts(parameters) {}
+BrowserMainPartsWin::BrowserMainPartsWin(const MainFunctionParams& parameters)
+ : ChromeBrowserMainParts(parameters) {
+}
- protected:
- virtual void PreEarlyInitialization() {
- // Initialize Winsock.
- net::EnsureWinsockInit();
- }
+void BrowserMainPartsWin::PreEarlyInitialization() {
+ // Initialize Winsock.
+ net::EnsureWinsockInit();
+}
- virtual void PreMainMessageLoopStart() {
- OleInitialize(NULL);
+void BrowserMainPartsWin::PreMainMessageLoopStart() {
+ OleInitialize(NULL);
- // If we're running tests (ui_task is non-null), then the ResourceBundle
- // has already been initialized.
- if (!parameters().ui_task) {
- // Override the configured locale with the user's preferred UI language.
- l10n_util::OverrideLocaleWithUILanguageList();
+ // If we're running tests (ui_task is non-null), then the ResourceBundle
+ // has already been initialized.
+ if (!parameters().ui_task) {
+ // Override the configured locale with the user's preferred UI language.
+ l10n_util::OverrideLocaleWithUILanguageList();
- // Make sure that we know how to handle exceptions from the message loop.
- InitializeWindowProcExceptions();
- }
+ // Make sure that we know how to handle exceptions from the message loop.
+ InitializeWindowProcExceptions();
}
+}
- private:
- virtual void InitializeSSL() {
- // Use NSS for SSL by default.
- // The default client socket factory uses NSS for SSL by default on
- // Windows.
- if (parsed_command_line().HasSwitch(switches::kUseSystemSSL)) {
- net::ClientSocketFactory::UseSystemSSL();
- } else {
- // We want to be sure to init NSPR on the main thread.
- crypto::EnsureNSPRInit();
- }
+void BrowserMainPartsWin::InitializeSSL() {
+ // Use NSS for SSL by default.
+ // The default client socket factory uses NSS for SSL by default on
+ // Windows.
+ if (parsed_command_line().HasSwitch(switches::kUseSystemSSL)) {
+ net::ClientSocketFactory::UseSystemSSL();
+ } else {
+ // We want to be sure to init NSPR on the main thread.
+ crypto::EnsureNSPRInit();
}
-};
-
-// static
-BrowserMainParts* BrowserMainParts::CreateBrowserMainParts(
- const MainFunctionParams& parameters) {
- return new BrowserMainPartsWin(parameters);
}

Powered by Google App Engine
This is Rietveld 408576698