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

Side by Side Diff: content/browser/browser_main_runner.cc

Issue 250723002: content: Terminate early if the toolkit initialization fails. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/browser/browser_main_loop.cc ('k') | content/public/browser/browser_main_runner.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/public/browser/browser_main_runner.h" 5 #include "content/public/browser/browser_main_runner.h"
6 6
7 #include "base/allocator/allocator_shim.h" 7 #include "base/allocator/allocator_shim.h"
8 #include "base/base_switches.h" 8 #include "base/base_switches.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/debug/leak_annotations.h" 10 #include "base/debug/leak_annotations.h"
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 ole_initializer_.reset(new ui::ScopedOleInitializer); 77 ole_initializer_.reset(new ui::ScopedOleInitializer);
78 #endif // OS_WIN 78 #endif // OS_WIN
79 79
80 main_loop_.reset(new BrowserMainLoop(parameters)); 80 main_loop_.reset(new BrowserMainLoop(parameters));
81 81
82 main_loop_->Init(); 82 main_loop_->Init();
83 83
84 main_loop_->EarlyInitialization(); 84 main_loop_->EarlyInitialization();
85 85
86 // Must happen before we try to use a message loop or display any UI. 86 // Must happen before we try to use a message loop or display any UI.
87 main_loop_->InitializeToolkit(); 87 if (!main_loop_->InitializeToolkit())
88 return 1;
88 89
89 main_loop_->MainMessageLoopStart(); 90 main_loop_->MainMessageLoopStart();
90 91
91 // WARNING: If we get a WM_ENDSESSION, objects created on the stack here 92 // WARNING: If we get a WM_ENDSESSION, objects created on the stack here
92 // are NOT deleted. If you need something to run during WM_ENDSESSION add it 93 // are NOT deleted. If you need something to run during WM_ENDSESSION add it
93 // to browser_shutdown::Shutdown or BrowserProcess::EndSession. 94 // to browser_shutdown::Shutdown or BrowserProcess::EndSession.
94 95
95 #if defined(OS_WIN) && !defined(NO_TCMALLOC) 96 #if defined(OS_WIN) && !defined(NO_TCMALLOC)
96 // When linking shared libraries, NO_TCMALLOC is defined, and dynamic 97 // When linking shared libraries, NO_TCMALLOC is defined, and dynamic
97 // allocator selection is not supported. 98 // allocator selection is not supported.
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 173
173 DISALLOW_COPY_AND_ASSIGN(BrowserMainRunnerImpl); 174 DISALLOW_COPY_AND_ASSIGN(BrowserMainRunnerImpl);
174 }; 175 };
175 176
176 // static 177 // static
177 BrowserMainRunner* BrowserMainRunner::Create() { 178 BrowserMainRunner* BrowserMainRunner::Create() {
178 return new BrowserMainRunnerImpl(); 179 return new BrowserMainRunnerImpl();
179 } 180 }
180 181
181 } // namespace content 182 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/browser_main_loop.cc ('k') | content/public/browser/browser_main_runner.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698