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

Unified Diff: chrome/browser/extensions/api/image_writer_private/operation_manager.cc

Issue 166053003: Move ProfileKeyedAPI implementations to take BrowserContext in the constructor (part 2). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: | Created 6 years, 10 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/extensions/api/image_writer_private/operation_manager.cc
diff --git a/chrome/browser/extensions/api/image_writer_private/operation_manager.cc b/chrome/browser/extensions/api/image_writer_private/operation_manager.cc
index 9f1aec30d66cefe9de5bcf9d9db2be898dc59b56..e2d8b33dbe8a2ea13c1751db82ab5115199b762f 100644
--- a/chrome/browser/extensions/api/image_writer_private/operation_manager.cc
+++ b/chrome/browser/extensions/api/image_writer_private/operation_manager.cc
@@ -14,6 +14,7 @@
#include "chrome/browser/extensions/event_router_forwarder.h"
#include "chrome/browser/extensions/extension_host.h"
#include "chrome/browser/extensions/extension_service.h"
+#include "chrome/browser/profiles/profile.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/notification_service.h"
#include "extensions/browser/event_router.h"
@@ -26,9 +27,8 @@ namespace image_writer {
using content::BrowserThread;
-OperationManager::OperationManager(Profile* profile)
- : profile_(profile),
- weak_factory_(this) {
+OperationManager::OperationManager(content::BrowserContext* context)
+ : profile_(Profile::FromBrowserContext(context)), weak_factory_(this) {
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNINSTALLED,
content::Source<Profile>(profile_));
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNLOADED,
@@ -238,9 +238,8 @@ void OperationManager::Observe(int type,
}
}
-OperationManager* OperationManager::Get(Profile* profile) {
- return ProfileKeyedAPIFactory<OperationManager>::
- GetForProfile(profile);
+OperationManager* OperationManager::Get(content::BrowserContext* context) {
+ return ProfileKeyedAPIFactory<OperationManager>::GetForProfile(context);
}
static base::LazyInstance<ProfileKeyedAPIFactory<OperationManager> >
« no previous file with comments | « chrome/browser/extensions/api/image_writer_private/operation_manager.h ('k') | chrome/browser/extensions/api/input/input.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698