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 "content/browser/browser_main.h" | 5 #include "content/browser/browser_main.h" |
6 | 6 |
7 #include "base/allocator/allocator_shim.h" | 7 #include "base/allocator/allocator_shim.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/debug/trace_event.h" | 9 #include "base/debug/trace_event.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 | 160 |
161 namespace content { | 161 namespace content { |
162 | 162 |
163 BrowserMainParts::BrowserMainParts(const MainFunctionParams& parameters) | 163 BrowserMainParts::BrowserMainParts(const MainFunctionParams& parameters) |
164 : parameters_(parameters), | 164 : parameters_(parameters), |
165 parsed_command_line_(parameters.command_line_), | 165 parsed_command_line_(parameters.command_line_), |
166 result_code_(content::RESULT_CODE_NORMAL_EXIT) { | 166 result_code_(content::RESULT_CODE_NORMAL_EXIT) { |
167 } | 167 } |
168 | 168 |
169 BrowserMainParts::~BrowserMainParts() { | 169 BrowserMainParts::~BrowserMainParts() { |
170 #if defined(OS_WIN) | |
171 OleUninitialize(); | |
172 #endif | |
173 } | 170 } |
174 | 171 |
175 void BrowserMainParts::EarlyInitialization() { | 172 void BrowserMainParts::EarlyInitialization() { |
176 PreEarlyInitialization(); | 173 PreEarlyInitialization(); |
177 | 174 |
178 #if defined(OS_WIN) | 175 #if defined(OS_WIN) |
179 net::EnsureWinsockInit(); | 176 net::EnsureWinsockInit(); |
180 #endif | 177 #endif |
181 | 178 |
182 // Use NSS for SSL by default. | 179 // Use NSS for SSL by default. |
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
412 base::win::ScopedCOMInitializer com_initializer; | 409 base::win::ScopedCOMInitializer com_initializer; |
413 #endif // OS_WIN | 410 #endif // OS_WIN |
414 | 411 |
415 base::StatisticsRecorder statistics; | 412 base::StatisticsRecorder statistics; |
416 | 413 |
417 parts->RunMainMessageLoopParts(); | 414 parts->RunMainMessageLoopParts(); |
418 | 415 |
419 TRACE_EVENT_END_ETW("BrowserMain", 0, 0); | 416 TRACE_EVENT_END_ETW("BrowserMain", 0, 0); |
420 return parts->result_code(); | 417 return parts->result_code(); |
421 } | 418 } |
OLD | NEW |