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

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

Issue 319053006: Calling Shutdown() for Android content_browsertests. Removed webrtc test hack. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed review comments. Created 6 years, 6 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
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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 // The trace event has to stay between profiler creation and destruction. 142 // The trace event has to stay between profiler creation and destruction.
143 TRACE_EVENT0("shutdown", "BrowserMainRunner"); 143 TRACE_EVENT0("shutdown", "BrowserMainRunner");
144 g_exited_main_message_loop = true; 144 g_exited_main_message_loop = true;
145 145
146 main_loop_->ShutdownThreadsAndCleanUp(); 146 main_loop_->ShutdownThreadsAndCleanUp();
147 147
148 ui::ShutdownInputMethod(); 148 ui::ShutdownInputMethod();
149 #if defined(OS_WIN) 149 #if defined(OS_WIN)
150 ole_initializer_.reset(NULL); 150 ole_initializer_.reset(NULL);
151 #endif 151 #endif
152 152 #if defined(OS_ANDROID)
153 // Forcefully terminates the RunLoop inside MessagePumpForUI, ensuring
154 // proper shutdown for content_browsertests. Shutdown() is not used by
155 // the actual browser.
156 base::MessageLoop::current()->QuitNow();
jam 2014/06/13 17:14:01 can we avoid putting the test-only code in this no
Victor Starodub 2014/06/17 00:53:04 FYI: the code is not actually test-specific. It's
157 #endif
153 main_loop_.reset(NULL); 158 main_loop_.reset(NULL);
154 159
155 notification_service_.reset(NULL); 160 notification_service_.reset(NULL);
156 161
157 is_shutdown_ = true; 162 is_shutdown_ = true;
158 } 163 }
159 } 164 }
160 165
161 protected: 166 protected:
162 // True if we have started to initialize the runner. 167 // True if we have started to initialize the runner.
(...skipping 10 matching lines...) Expand all
173 178
174 DISALLOW_COPY_AND_ASSIGN(BrowserMainRunnerImpl); 179 DISALLOW_COPY_AND_ASSIGN(BrowserMainRunnerImpl);
175 }; 180 };
176 181
177 // static 182 // static
178 BrowserMainRunner* BrowserMainRunner::Create() { 183 BrowserMainRunner* BrowserMainRunner::Create() {
179 return new BrowserMainRunnerImpl(); 184 return new BrowserMainRunnerImpl();
180 } 185 }
181 186
182 } // namespace content 187 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698