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

Unified Diff: ash/test/test_shell_delegate.h

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 | « no previous file | ash/test/test_shell_delegate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/test/test_shell_delegate.h
diff --git a/ash/test/test_shell_delegate.h b/ash/test/test_shell_delegate.h
index 27f61aa0fd0fbe0faf5daee00d428966d31f0aeb..b56ee14edefc16238633bf538c0c9c0248ee27ed 100644
--- a/ash/test/test_shell_delegate.h
+++ b/ash/test/test_shell_delegate.h
@@ -12,7 +12,7 @@
#include "ash/test/test_session_state_delegate.h"
#include "base/macros.h"
-class TestingPrefServiceSimple;
+class PrefService;
namespace keyboard {
class KeyboardUI;
@@ -32,6 +32,10 @@ class TestShellDelegate : public ShellDelegate {
multi_profiles_enabled_ = multi_profiles_enabled;
}
+ void set_active_user_pref_service(PrefService* pref_service) {
+ active_user_pref_service_ = pref_service;
+ }
+
// Overridden from ShellDelegate:
::service_manager::Connector* GetShellConnector() const override;
bool IsIncognitoAllowed() const override;
@@ -74,7 +78,7 @@ class TestShellDelegate : public ShellDelegate {
bool force_maximize_on_first_run_;
bool touchscreen_enabled_in_local_pref_;
std::unique_ptr<ShelfInitializer> shelf_initializer_;
- std::unique_ptr<TestingPrefServiceSimple> pref_service_;
+ PrefService* active_user_pref_service_; // Not owned.
DISALLOW_COPY_AND_ASSIGN(TestShellDelegate);
};
« no previous file with comments | « no previous file | ash/test/test_shell_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698