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

Unified Diff: chrome/browser/net/pref_proxy_config_tracker_impl_unittest.cc

Issue 11741003: Remove PrefServiceSimple, replacing it with PrefService and PrefRegistrySimple. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address review comments, fix build and test issues. Created 7 years, 11 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
Index: chrome/browser/net/pref_proxy_config_tracker_impl_unittest.cc
diff --git a/chrome/browser/net/pref_proxy_config_tracker_impl_unittest.cc b/chrome/browser/net/pref_proxy_config_tracker_impl_unittest.cc
index cf2b6c8f104404c8a2018cf28bc7d01fb91d6b4f..8e5eb4faab156e039abaa512ba56834f9f845ef9 100644
--- a/chrome/browser/net/pref_proxy_config_tracker_impl_unittest.cc
+++ b/chrome/browser/net/pref_proxy_config_tracker_impl_unittest.cc
@@ -8,6 +8,7 @@
#include "base/file_path.h"
#include "base/message_loop.h"
#include "chrome/browser/net/chrome_url_request_context.h"
+#include "chrome/browser/prefs/pref_registry_simple.h"
#include "chrome/browser/prefs/pref_service_mock_builder.h"
#include "chrome/browser/prefs/proxy_config_dictionary.h"
#include "chrome/common/chrome_switches.h"
@@ -77,9 +78,9 @@ class PrefProxyConfigTrackerImplTestBase : public TESTBASE {
: ui_thread_(BrowserThread::UI, &loop_),
io_thread_(BrowserThread::IO, &loop_) {}
- virtual void Init(PrefServiceSimple* pref_service) {
+ virtual void Init(PrefService* pref_service, PrefRegistrySimple* registry) {
ASSERT_TRUE(pref_service);
- PrefProxyConfigTrackerImpl::RegisterPrefs(pref_service);
+ PrefProxyConfigTrackerImpl::RegisterPrefs(registry);
fixed_config_.set_pac_url(GURL(kFixedPacUrl));
delegate_service_ =
new TestProxyConfigService(fixed_config_,
@@ -118,7 +119,7 @@ class PrefProxyConfigTrackerImplTest
protected:
virtual void SetUp() {
pref_service_.reset(new TestingPrefServiceSimple());
- Init(pref_service_.get());
+ Init(pref_service_.get(), pref_service_->registry());
}
scoped_ptr<TestingPrefServiceSimple> pref_service_;
@@ -340,13 +341,15 @@ class PrefProxyConfigTrackerImplCommandLineTest
}
pref_service_.reset(
PrefServiceMockBuilder().WithCommandLine(
- &command_line_).CreateSimple());
- Init(pref_service_.get());
+ &command_line_).Create(new PrefRegistrySimple));
Mattias Nissler (ping if slow) 2013/01/31 16:30:54 In this case, I'd rather create a PrefRegistrySimp
Jói 2013/01/31 17:29:32 Done.
+ Init(pref_service_.get(),
+ static_cast<PrefRegistrySimple*>(
+ pref_service_->DeprecatedGetPrefRegistry()));
}
private:
CommandLine command_line_;
- scoped_ptr<PrefServiceSimple> pref_service_;
+ scoped_ptr<PrefService> pref_service_;
};
TEST_P(PrefProxyConfigTrackerImplCommandLineTest, CommandLine) {
« no previous file with comments | « chrome/browser/net/pref_proxy_config_tracker_impl.cc ('k') | chrome/browser/net/ssl_config_service_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698