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

Unified Diff: chrome/browser/extensions/api/bookmarks/bookmarks_api.h

Issue 171813010: Move ProfileKeyedAPI implementations to take BrowserContext in the constructor (part 1). (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/bookmarks/bookmarks_api.h
diff --git a/chrome/browser/extensions/api/bookmarks/bookmarks_api.h b/chrome/browser/extensions/api/bookmarks/bookmarks_api.h
index 7853363c28d460c1e9d813d2e02eab555a35c5d3..210fbae7f71e9c12800673b69d6420d838744488 100644
--- a/chrome/browser/extensions/api/bookmarks/bookmarks_api.h
+++ b/chrome/browser/extensions/api/bookmarks/bookmarks_api.h
@@ -17,20 +17,22 @@
#include "extensions/browser/event_router.h"
#include "ui/shell_dialogs/select_file_dialog.h"
-class Profile;
-
namespace base {
class FilePath;
class ListValue;
}
+namespace content {
+class BrowserContext;
+}
+
namespace extensions {
// Observes BookmarkModel and then routes the notifications as events to
// the extension system.
class BookmarkEventRouter : public BookmarkModelObserver {
public:
- BookmarkEventRouter(Profile* profile, BookmarkModel* model);
+ BookmarkEventRouter(content::BrowserContext* context, BookmarkModel* model);
virtual ~BookmarkEventRouter();
// BookmarkModelObserver:
@@ -64,7 +66,7 @@ class BookmarkEventRouter : public BookmarkModelObserver {
void DispatchEvent(const std::string& event_name,
scoped_ptr<base::ListValue> event_args);
- Profile* profile_;
+ content::BrowserContext* context_;
BookmarkModel* model_;
DISALLOW_COPY_AND_ASSIGN(BookmarkEventRouter);
@@ -73,7 +75,7 @@ class BookmarkEventRouter : public BookmarkModelObserver {
class BookmarksAPI : public ProfileKeyedAPI,
public EventRouter::Observer {
public:
- explicit BookmarksAPI(Profile* profile);
+ explicit BookmarksAPI(content::BrowserContext* context);
virtual ~BookmarksAPI();
// BrowserContextKeyedService implementation.
@@ -89,7 +91,7 @@ class BookmarksAPI : public ProfileKeyedAPI,
private:
friend class ProfileKeyedAPIFactory<BookmarksAPI>;
- Profile* profile_;
+ content::BrowserContext* context_;
// ProfileKeyedAPI implementation.
static const char* service_name() {

Powered by Google App Engine
This is Rietveld 408576698