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

Unified Diff: chrome/browser/extensions/api/log_private/log_private_api_chromeos.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/log_private/log_private_api_chromeos.cc
diff --git a/chrome/browser/extensions/api/log_private/log_private_api_chromeos.cc b/chrome/browser/extensions/api/log_private/log_private_api_chromeos.cc
index 78a189e3946a59977aa65708574c4859799c4983..22a2fc3a601aa9bf57ea2dde88816568f6c6845d 100644
--- a/chrome/browser/extensions/api/log_private/log_private_api_chromeos.cc
+++ b/chrome/browser/extensions/api/log_private/log_private_api_chromeos.cc
@@ -20,6 +20,7 @@
#include "chrome/browser/feedback/system_logs/scrubbed_system_logs_fetcher.h"
#include "chrome/browser/io_thread.h"
#include "chrome/browser/net/chrome_net_log.h"
+#include "chrome/browser/profiles/profile.h"
#include "chrome/common/extensions/api/log_private.h"
#include "content/public/browser/notification_details.h"
#include "content/public/browser/notification_source.h"
@@ -66,14 +67,16 @@ void CollectLogInfo(
} // namespace
// static
-LogPrivateAPI* LogPrivateAPI::Get(Profile* profile) {
- return GetFactoryInstance()->GetForProfile(profile);
+LogPrivateAPI* LogPrivateAPI::Get(content::BrowserContext* context) {
+ return GetFactoryInstance()->GetForProfile(context);
}
-LogPrivateAPI::LogPrivateAPI(Profile* profile)
- : profile_(profile), logging_net_internals_(false) {
- registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNLOADED,
- content::Source<Profile>(profile));
+LogPrivateAPI::LogPrivateAPI(content::BrowserContext* context)
+ : profile_(Profile::FromBrowserContext(context)),
+ logging_net_internals_(false) {
+ registrar_.Add(this,
+ chrome::NOTIFICATION_EXTENSION_UNLOADED,
+ content::Source<Profile>(profile_));
}
LogPrivateAPI::~LogPrivateAPI() {
« no previous file with comments | « chrome/browser/extensions/api/log_private/log_private_api.h ('k') | chrome/browser/extensions/api/management/management_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698