Index: chrome/test/testing_browser_process.h |
diff --git a/chrome/test/testing_browser_process.h b/chrome/test/testing_browser_process.h |
index 65f6cca24fbe55878e75c88d7f8c961ee804311a..ede0c9b4b3ef3203fc97df3a46a6954f6b44d044 100644 |
--- a/chrome/test/testing_browser_process.h |
+++ b/chrome/test/testing_browser_process.h |
@@ -19,6 +19,8 @@ |
#include "base/string_util.h" |
#include "base/waitable_event.h" |
#include "chrome/browser/browser_process.h" |
+#include "chrome/browser/google_url_tracker.h" |
+#include "chrome/browser/pref_service.h" |
#include "chrome/common/notification_service.h" |
class IOThread; |
@@ -28,7 +30,8 @@ class TestingBrowserProcess : public BrowserProcess { |
TestingBrowserProcess() |
: shutdown_event_(new base::WaitableEvent(true, false)), |
module_ref_count_(0), |
- app_locale_("en") { |
+ app_locale_("en"), |
+ pref_service_(NULL) { |
} |
virtual ~TestingBrowserProcess() { |
@@ -72,7 +75,7 @@ class TestingBrowserProcess : public BrowserProcess { |
} |
virtual PrefService* local_state() { |
- return NULL; |
+ return pref_service_; |
} |
virtual IconManager* icon_manager() { |
@@ -104,7 +107,7 @@ class TestingBrowserProcess : public BrowserProcess { |
} |
virtual GoogleURLTracker* google_url_tracker() { |
- return NULL; |
+ return google_url_tracker_.get(); |
} |
virtual IntranetRedirectDetector* intranet_redirect_detector() { |
@@ -157,6 +160,13 @@ class TestingBrowserProcess : public BrowserProcess { |
virtual void SetIPCLoggingEnabled(bool enable) {} |
#endif |
+ void SetPrefService(PrefService* pref_service) { |
+ pref_service_ = pref_service; |
+ } |
+ void SetGoogleURLTracker(GoogleURLTracker* google_url_tracker) { |
+ google_url_tracker_.reset(google_url_tracker); |
+ } |
+ |
private: |
NotificationService notification_service_; |
scoped_ptr<base::WaitableEvent> shutdown_event_; |
@@ -164,6 +174,9 @@ class TestingBrowserProcess : public BrowserProcess { |
scoped_ptr<Clipboard> clipboard_; |
std::string app_locale_; |
+ PrefService* pref_service_; |
+ scoped_ptr<GoogleURLTracker> google_url_tracker_; |
+ |
DISALLOW_COPY_AND_ASSIGN(TestingBrowserProcess); |
}; |