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

Unified Diff: ash/test/test_shell_delegate.cc

Issue 2827193004: Make PrefService available in *ash (Closed)
Patch Set: Adding NOTREACHED() comment. Created 3 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_shell_delegate.h ('k') | chrome/browser/ui/ash/chrome_shell_delegate.h » ('j') | 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 5d75697439d8f5699efe230ffa9cd8bd4a3ef4f3..e6fc398f211ead96dfdb57bbc5c808272cab22cd 100644
--- a/ash/test/test_shell_delegate.cc
+++ b/ash/test/test_shell_delegate.cc
@@ -25,6 +25,8 @@
#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"
@@ -58,7 +60,8 @@ TestShellDelegate::TestShellDelegate()
: num_exit_requests_(0),
multi_profiles_enabled_(false),
force_maximize_on_first_run_(false),
- touchscreen_enabled_in_local_pref_(true) {}
+ touchscreen_enabled_in_local_pref_(true),
+ pref_service_(base::MakeUnique<TestingPrefServiceSimple>()) {}
TestShellDelegate::~TestShellDelegate() {}
@@ -147,6 +150,10 @@ gfx::Image TestShellDelegate::GetDeprecatedAcceleratorImage() const {
return gfx::Image();
}
+PrefService* TestShellDelegate::GetActiveUserPrefService() const {
+ return pref_service_.get();
+}
+
bool TestShellDelegate::IsTouchscreenEnabledInPrefs(
bool use_local_state) const {
return use_local_state ? touchscreen_enabled_in_local_pref_ : true;
« no previous file with comments | « ash/test/test_shell_delegate.h ('k') | chrome/browser/ui/ash/chrome_shell_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698