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

Unified Diff: chrome/browser/extensions/settings/settings_test_util.cc

Issue 11365181: Remove GetExtensionService from Profile. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: response to sky Created 8 years, 1 month 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/extensions/settings/settings_test_util.cc
diff --git a/chrome/browser/extensions/settings/settings_test_util.cc b/chrome/browser/extensions/settings/settings_test_util.cc
index afb1ca0e4390d6e1a91d0d3cc33dc1e875cd7b14..3ccbd29bc054f8524e7b9dc0a11994ed07f66e69 100644
--- a/chrome/browser/extensions/settings/settings_test_util.cc
+++ b/chrome/browser/extensions/settings/settings_test_util.cc
@@ -118,6 +118,12 @@ EventRouter* MockExtensionSystem::event_router() {
return event_router_.get();
}
+ExtensionService* MockExtensionSystem::extension_service() {
+ ExtensionServiceInterface* as_interface =
+ static_cast<ExtensionServiceInterface*>(&extension_service_);
Yoyo Zhou 2012/11/21 00:27:13 ditto
Miranda Callahan 2012/11/26 22:14:24 Unfortunately, all this casting is needed, as Mock
Yoyo Zhou 2012/11/26 22:58:04 You don't need it for the upcasting on this line,
Miranda Callahan 2012/11/29 17:36:35 This probably needs refactoring to get rid of the
+ return static_cast<ExtensionService*>(as_interface);
+}
+
ProfileKeyedService* BuildMockExtensionSystem(Profile* profile) {
return new MockExtensionSystem(profile);
}

Powered by Google App Engine
This is Rietveld 408576698