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

Unified Diff: chrome/browser/background_contents_service.cc

Issue 6831016: Profile shouldn't own background page stuff. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 8 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
« no previous file with comments | « chrome/browser/background_contents_service.h ('k') | chrome/browser/background_contents_service_factory.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/background_contents_service.cc
diff --git a/chrome/browser/background_contents_service.cc b/chrome/browser/background_contents_service.cc
index fff1a3f36cf9e2b80ef6878a06480089e572ab63..4ac5c5f6ee13fe66415e3cfe6654b48d6d13f004 100644
--- a/chrome/browser/background_contents_service.cc
+++ b/chrome/browser/background_contents_service.cc
@@ -9,6 +9,7 @@
#include "base/string_util.h"
#include "base/utf_string_conversions.h"
#include "base/values.h"
+#include "chrome/browser/background_contents_service_factory.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/extensions/extension_host.h"
#include "chrome/browser/extensions/extension_service.h"
@@ -64,7 +65,7 @@ class CrashNotificationDelegate : public NotificationDelegate {
void Click() {
if (is_hosted_app_) {
- profile_->GetBackgroundContentsService()->
+ BackgroundContentsServiceFactory::GetForProfile(profile_)->
LoadBackgroundContentsForExtension(profile_, extension_id_);
} else {
profile_->GetExtensionService()->ReloadExtension(extension_id_);
@@ -261,8 +262,9 @@ void BackgroundContentsService::Observe(NotificationType type,
if (type.value == NotificationType::BACKGROUND_CONTENTS_TERMINATED) {
BackgroundContents* bg =
Details<BackgroundContents>(details).ptr();
- std::string extension_id = UTF16ToASCII(profile->
- GetBackgroundContentsService()->GetParentApplicationId(bg));
+ std::string extension_id = UTF16ToASCII(
+ BackgroundContentsServiceFactory::GetForProfile(profile)->
+ GetParentApplicationId(bg));
extension =
profile->GetExtensionService()->GetExtensionById(extension_id, false);
} else {
« no previous file with comments | « chrome/browser/background_contents_service.h ('k') | chrome/browser/background_contents_service_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698