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

Unified Diff: chrome/browser/chromeos/gview_request_interceptor_unittest.cc

Issue 10908088: Cleanup: Constify some ProfileKeyedBaseFactory methods and all overrides. Remove ProfileKeyedBaseFa… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: rebase, remove a few more lines of code Created 8 years, 3 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/chromeos/gview_request_interceptor_unittest.cc
===================================================================
--- chrome/browser/chromeos/gview_request_interceptor_unittest.cc (revision 154991)
+++ chrome/browser/chromeos/gview_request_interceptor_unittest.cc (working copy)
@@ -13,6 +13,7 @@
#include "chrome/browser/plugin_prefs_factory.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/test/base/testing_pref_service.h"
+#include "chrome/test/base/testing_profile.h"
#include "content/public/browser/plugin_service.h"
#include "content/public/browser/resource_request_info.h"
#include "content/public/test/mock_resource_context.h"
@@ -102,9 +103,8 @@
job_factory_.SetProtocolHandler("http", new GViewRequestProtocolFactory);
job_factory_.AddInterceptor(new GViewRequestInterceptor);
request_context->set_job_factory(&job_factory_);
- PluginPrefsFactory::GetInstance()->ForceRegisterPrefsForTest(&prefs_);
- plugin_prefs_ = new PluginPrefs();
- plugin_prefs_->SetPrefs(&prefs_);
+ plugin_prefs_ = PluginPrefs::GetForTestingProfile(&profile_);
+ PluginPrefsFactory::GetInstance()->RegisterUserPrefsOnProfile(&profile_);
ChromePluginServiceFilter* filter =
ChromePluginServiceFilter::GetInstance();
filter->RegisterResourceContext(plugin_prefs_, &resource_context_);
@@ -174,7 +174,7 @@
content::TestBrowserThread file_thread_;
content::TestBrowserThread io_thread_;
webkit::npapi::MockPluginList plugin_list_;
- TestingPrefService prefs_;
+ TestingProfile profile_;
scoped_refptr<PluginPrefs> plugin_prefs_;
net::URLRequestJobFactoryImpl job_factory_;
const net::URLRequestJobFactory* old_factory_;
« no previous file with comments | « chrome/browser/chromeos/extensions/file_browser_event_router.cc ('k') | chrome/browser/content_settings/cookie_settings.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698