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

Unified Diff: chrome/browser/extensions/api/serial/serial_event_dispatcher.cc

Issue 174513003: Move ProfileKeyedAPI implementations to take BrowserContext in the constructor (part 3). (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/serial/serial_event_dispatcher.cc
diff --git a/chrome/browser/extensions/api/serial/serial_event_dispatcher.cc b/chrome/browser/extensions/api/serial/serial_event_dispatcher.cc
index 54495d12461559480463ceb3d3838e45fa38719c..91dae3df3de2cf90fcf0a34006e05888694438a2 100644
--- a/chrome/browser/extensions/api/serial/serial_event_dispatcher.cc
+++ b/chrome/browser/extensions/api/serial/serial_event_dispatcher.cc
@@ -35,15 +35,16 @@ ProfileKeyedAPIFactory<SerialEventDispatcher>*
}
// static
-SerialEventDispatcher* SerialEventDispatcher::Get(Profile* profile) {
- return ProfileKeyedAPIFactory<SerialEventDispatcher>::GetForProfile(profile);
+SerialEventDispatcher* SerialEventDispatcher::Get(
+ content::BrowserContext* context) {
+ return ProfileKeyedAPIFactory<SerialEventDispatcher>::GetForProfile(context);
}
-SerialEventDispatcher::SerialEventDispatcher(Profile* profile)
+SerialEventDispatcher::SerialEventDispatcher(content::BrowserContext* context)
: thread_id_(SerialConnection::kThreadId),
- profile_(profile) {
+ profile_(Profile::FromBrowserContext(context)) {
ApiResourceManager<SerialConnection>* manager =
- ApiResourceManager<SerialConnection>::Get(profile);
+ ApiResourceManager<SerialConnection>::Get(profile_);
DCHECK(manager) << "No serial connection manager.";
connections_ = manager->data_;
}
« no previous file with comments | « chrome/browser/extensions/api/serial/serial_event_dispatcher.h ('k') | chrome/browser/extensions/api/sessions/sessions_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698