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

Unified Diff: chrome/test/base/view_event_test_platform_part_chromeos.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
Index: chrome/test/base/view_event_test_platform_part_chromeos.cc
diff --git a/chrome/test/base/view_event_test_platform_part_chromeos.cc b/chrome/test/base/view_event_test_platform_part_chromeos.cc
index 3767dda75eaf3f2f55ae211b56d296b622cd40dc..d51732e7715f689570ca04189aad4cd764073a1c 100644
--- a/chrome/test/base/view_event_test_platform_part_chromeos.cc
+++ b/chrome/test/base/view_event_test_platform_part_chromeos.cc
@@ -33,6 +33,7 @@ class ViewEventTestPlatformPartChromeOS : public ViewEventTestPlatformPart {
private:
wm::WMState wm_state_;
+ scoped_ptr<aura::Env> env_;
DISALLOW_COPY_AND_ASSIGN(ViewEventTestPlatformPartChromeOS);
};
@@ -46,7 +47,7 @@ ViewEventTestPlatformPartChromeOS::ViewEventTestPlatformPartChromeOS(
chromeos::CrasAudioHandler::InitializeForTesting();
chromeos::NetworkHandler::Initialize();
- aura::Env::CreateInstance(true);
+ env_ = aura::Env::CreateInstance();
ash::test::TestShellDelegate* shell_delegate =
new ash::test::TestShellDelegate();
ash::ShellInitParams init_params;
@@ -60,7 +61,7 @@ ViewEventTestPlatformPartChromeOS::ViewEventTestPlatformPartChromeOS(
ViewEventTestPlatformPartChromeOS::~ViewEventTestPlatformPartChromeOS() {
ash::Shell::DeleteInstance();
- aura::Env::DeleteInstance();
+ env_.reset();
chromeos::NetworkHandler::Shutdown();
chromeos::CrasAudioHandler::Shutdown();
« no previous file with comments | « chrome/test/base/view_event_test_platform_part_ash.cc ('k') | chromecast/browser/cast_browser_main_parts.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698