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

Unified Diff: ash/test/test_shell_delegate.cc

Issue 2861873004: Make the pref_service in TestShellDelegate injectable. (Closed)
Patch Set: Created 3 years, 7 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_shell_delegate.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/test/test_shell_delegate.cc
diff --git a/ash/test/test_shell_delegate.cc b/ash/test/test_shell_delegate.cc
index e6fc398f211ead96dfdb57bbc5c808272cab22cd..d7f3196bf5df9829bdcf22364c18d729d2a9c18b 100644
--- a/ash/test/test_shell_delegate.cc
+++ b/ash/test/test_shell_delegate.cc
@@ -25,8 +25,6 @@
#include "ash/wm_window.h"
#include "base/logging.h"
#include "base/memory/ptr_util.h"
-#include "components/prefs/pref_service.h"
-#include "components/prefs/testing_pref_service.h"
#include "ui/aura/window.h"
#include "ui/gfx/image/image.h"
@@ -61,7 +59,7 @@ TestShellDelegate::TestShellDelegate()
multi_profiles_enabled_(false),
force_maximize_on_first_run_(false),
touchscreen_enabled_in_local_pref_(true),
- pref_service_(base::MakeUnique<TestingPrefServiceSimple>()) {}
+ active_user_pref_service_(nullptr) {}
TestShellDelegate::~TestShellDelegate() {}
@@ -151,7 +149,7 @@ gfx::Image TestShellDelegate::GetDeprecatedAcceleratorImage() const {
}
PrefService* TestShellDelegate::GetActiveUserPrefService() const {
- return pref_service_.get();
+ return active_user_pref_service_;
}
bool TestShellDelegate::IsTouchscreenEnabledInPrefs(
« no previous file with comments | « ash/test/test_shell_delegate.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698