diff options
-rw-r--r-- | chrome/test/base/testing_browser_process.cc | 10 | ||||
-rw-r--r-- | chrome/test/base/testing_browser_process.h | 2 |
2 files changed, 10 insertions, 2 deletions
diff --git a/chrome/test/base/testing_browser_process.cc b/chrome/test/base/testing_browser_process.cc index 7bdd170..74b9b65 100644 --- a/chrome/test/base/testing_browser_process.cc +++ b/chrome/test/base/testing_browser_process.cc @@ -30,7 +30,8 @@ TestingBrowserProcess::TestingBrowserProcess() app_locale_("en"), local_state_(NULL), render_widget_snapshot_taker_(new RenderWidgetSnapshotTaker), - io_thread_(NULL) { + io_thread_(NULL), + system_request_context_(NULL) { } TestingBrowserProcess::~TestingBrowserProcess() { @@ -124,7 +125,7 @@ TestingBrowserProcess::safe_browsing_detection_service() { } net::URLRequestContextGetter* TestingBrowserProcess::system_request_context() { - return NULL; + return system_request_context_; } #if defined(OS_CHROMEOS) @@ -252,6 +253,11 @@ void TestingBrowserProcess::SetBookmarkPromptController( bookmark_prompt_controller_.reset(controller); } +void TestingBrowserProcess::SetSystemRequestContext( + net::URLRequestContextGetter* context_getter) { + system_request_context_ = context_getter; +} + void TestingBrowserProcess::SetLocalState(PrefService* local_state) { if (!local_state) { // The local_state_ PrefService is owned outside of TestingBrowserProcess, diff --git a/chrome/test/base/testing_browser_process.h b/chrome/test/base/testing_browser_process.h index 3f597bd..6395fed 100644 --- a/chrome/test/base/testing_browser_process.h +++ b/chrome/test/base/testing_browser_process.h @@ -107,6 +107,7 @@ class TestingBrowserProcess : public BrowserProcess { void SetBrowserPolicyConnector(policy::BrowserPolicyConnector* connector); void SetSafeBrowsingService(SafeBrowsingService* sb_service); void SetBookmarkPromptController(BookmarkPromptController* controller); + void SetSystemRequestContext(net::URLRequestContextGetter* context_getter); private: scoped_ptr<content::NotificationService> notification_service_; @@ -130,6 +131,7 @@ class TestingBrowserProcess : public BrowserProcess { IOThread* io_thread_; scoped_refptr<SafeBrowsingService> sb_service_; scoped_ptr<BookmarkPromptController> bookmark_prompt_controller_; + net::URLRequestContextGetter* system_request_context_; DISALLOW_COPY_AND_ASSIGN(TestingBrowserProcess); }; |