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

Unified Diff: content/browser/browser_main_loop.cc

Issue 1293013002: aura: Require explicit ownership of the Env instance. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 years, 4 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
« no previous file with comments | « content/browser/browser_main_loop.h ('k') | content/public/test/unittest_test_suite.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/browser_main_loop.cc
diff --git a/content/browser/browser_main_loop.cc b/content/browser/browser_main_loop.cc
index e5ee0cfc3ae607054efc2437abbda88c43ac6914..d32c41d558d4a11e4375d79addbd1b8331dd0ba3 100644
--- a/content/browser/browser_main_loop.cc
+++ b/content/browser/browser_main_loop.cc
@@ -922,7 +922,7 @@ void BrowserMainLoop::ShutdownThreadsAndCleanUp() {
}
#if defined(USE_AURA)
- aura::Env::DeleteInstance();
+ env_.reset();
#endif
trace_memory_controller_.reset();
@@ -1141,9 +1141,7 @@ int BrowserMainLoop::BrowserThreadsStarted() {
BrowserGpuChannelHostFactory::Initialize(established_gpu_channel);
ImageTransportFactory::Initialize();
#if defined(USE_AURA)
- if (aura::Env::GetInstance()) {
- aura::Env::GetInstance()->set_context_factory(GetContextFactory());
- }
+ env_->set_context_factory(GetContextFactory());
#endif // defined(USE_AURA)
#endif // defined(OS_ANDROID)
@@ -1288,7 +1286,7 @@ bool BrowserMainLoop::InitializeToolkit() {
// Env creates the compositor. Aura widgets need the compositor to be created
// before they can be initialized by the browser.
- aura::Env::CreateInstance(true);
+ env_ = aura::Env::CreateInstance();
#endif // defined(USE_AURA)
if (parts_)
« no previous file with comments | « content/browser/browser_main_loop.h ('k') | content/public/test/unittest_test_suite.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698