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

Unified Diff: chrome/test/testing_profile.cc

Issue 7063030: PrintPreview: Print Preview is not staying associated with initiator renderer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: '' Created 9 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
Index: chrome/test/testing_profile.cc
diff --git a/chrome/test/testing_profile.cc b/chrome/test/testing_profile.cc
index 12e6c1ea9284727d9c2d4629dcb2d82ac9f0e30f..1cfb0a10099da35f00746f0378f0d7ab35f61fed 100644
--- a/chrome/test/testing_profile.cc
+++ b/chrome/test/testing_profile.cc
@@ -33,6 +33,8 @@
#include "chrome/browser/prefs/browser_prefs.h"
#include "chrome/browser/prefs/testing_pref_store.h"
#include "chrome/browser/prerender/prerender_manager.h"
+#include "chrome/browser/printing/print_preview_data_service.h"
+#include "chrome/browser/printing/print_preview_data_service_factory.h"
#include "chrome/browser/profiles/profile_dependency_manager.h"
#include "chrome/browser/search_engines/template_url_fetcher.h"
#include "chrome/browser/search_engines/template_url_model.h"
@@ -163,6 +165,8 @@ TestingProfile::TestingProfile()
&CreateTestDesktopNotificationService);
DesktopNotificationServiceFactory::GetInstance()->ForceAssociationBetween(
this, NULL);
+ PrintPreviewDataServiceFactory::GetInstance()->ForceAssociationBetween(this,
+ CreateTestPrintPreviewDataService());
SessionServiceFactory::GetInstance()->ForceAssociationBetween(this, NULL);
TabRestoreServiceFactory::GetInstance()->ForceAssociationBetween(this, NULL);
}
@@ -488,6 +492,10 @@ void TestingProfile::CreateTestingPrefService() {
browser::RegisterUserPrefs(prefs_.get());
}
+ProfileKeyedService* TestingProfile::CreateTestPrintPreviewDataService() {
+ return new PrintPreviewDataService();
+}
+
PrefService* TestingProfile::GetPrefs() {
if (!prefs_.get()) {
CreateTestingPrefService();

Powered by Google App Engine
This is Rietveld 408576698