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

Unified Diff: chrome/browser/chromeos/extensions/screenlock_private_api.cc

Issue 179243002: Change ProfileKeyedAPIFactory to build instances with BrowserContext instead of Profile. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: locationbarview 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/chromeos/extensions/screenlock_private_api.cc
diff --git a/chrome/browser/chromeos/extensions/screenlock_private_api.cc b/chrome/browser/chromeos/extensions/screenlock_private_api.cc
index c009fce65dd2142f6260c1ac887a017abaa431a0..74bbcc8287352463a35c50317fd99d1b8e9fad71 100644
--- a/chrome/browser/chromeos/extensions/screenlock_private_api.cc
+++ b/chrome/browser/chromeos/extensions/screenlock_private_api.cc
@@ -12,6 +12,7 @@
#include "chromeos/dbus/dbus_thread_manager.h"
#include "extensions/browser/event_router.h"
#include "extensions/browser/extension_system.h"
+#include "ui/gfx/image/image.h"
namespace screenlock = extensions::api::screenlock_private;
@@ -110,8 +111,9 @@ void ScreenlockPrivateShowButtonFunction::OnImageLoaded(
SendResponse(error_.empty());
}
-ScreenlockPrivateEventRouter::ScreenlockPrivateEventRouter(Profile* profile)
- : profile_(profile) {
+ScreenlockPrivateEventRouter::ScreenlockPrivateEventRouter(
+ content::BrowserContext* context)
+ : browser_context_(context) {
chromeos::SessionManagerClient* session_manager =
chromeos::DBusThreadManager::Get()->GetSessionManagerClient();
if (!session_manager->HasObserver(this))
@@ -138,8 +140,9 @@ void ScreenlockPrivateEventRouter::DispatchEvent(
args->Append(arg);
scoped_ptr<extensions::Event> event(new extensions::Event(
event_name, args.Pass()));
- extensions::ExtensionSystem::Get(profile_)->event_router()->
- BroadcastEvent(event.Pass());
+ extensions::ExtensionSystem::Get(browser_context_)
+ ->event_router()
+ ->BroadcastEvent(event.Pass());
}
static base::LazyInstance<extensions::ProfileKeyedAPIFactory<
« no previous file with comments | « chrome/browser/chromeos/extensions/screenlock_private_api.h ('k') | chrome/browser/extensions/api/api_resource_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698