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

Unified Diff: chrome/test/base/view_event_test_platform_part_chromeos.cc

Issue 1871253002: aura: Require explicit ownership of the Env instance. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tot.merge Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/test/test_suite.cc ('k') | chrome/test/base/view_event_test_platform_part_default.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 c92a137b19aa5740078cb3890e96e71bb4a278fb..399595defe39f98d4c09b5fdf932e04ecd794089 100644
--- a/chrome/test/base/view_event_test_platform_part_chromeos.cc
+++ b/chrome/test/base/view_event_test_platform_part_chromeos.cc
@@ -4,6 +4,8 @@
#include "chrome/test/base/view_event_test_platform_part.h"
+#include <memory>
+
#include "ash/ash_switches.h"
#include "ash/shell.h"
#include "ash/shell_init_params.h"
@@ -38,6 +40,7 @@ class ViewEventTestPlatformPartChromeOS : public ViewEventTestPlatformPart {
private:
wm::WMState wm_state_;
+ std::unique_ptr<aura::Env> env_;
DISALLOW_COPY_AND_ASSIGN(ViewEventTestPlatformPartChromeOS);
};
@@ -55,7 +58,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;
@@ -72,7 +75,7 @@ ViewEventTestPlatformPartChromeOS::ViewEventTestPlatformPartChromeOS(
ViewEventTestPlatformPartChromeOS::~ViewEventTestPlatformPartChromeOS() {
ash::Shell::DeleteInstance();
- aura::Env::DeleteInstance();
+ env_.reset();
chromeos::NetworkHandler::Shutdown();
chromeos::CrasAudioHandler::Shutdown();
« no previous file with comments | « ash/test/test_suite.cc ('k') | chrome/test/base/view_event_test_platform_part_default.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698