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

Unified Diff: chrome/browser/ui/webui/ntp/recently_closed_tabs_handler.cc

Issue 7554008: Removal of Profile from content part 6. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 9 years, 4 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/ui/webui/ntp/recently_closed_tabs_handler.cc
diff --git a/chrome/browser/ui/webui/ntp/recently_closed_tabs_handler.cc b/chrome/browser/ui/webui/ntp/recently_closed_tabs_handler.cc
index 9c33dedf2c75b11f50517708c7ca8bc965573ca0..0d1e6228747aacf895fa86c30675c4439b03934b 100644
--- a/chrome/browser/ui/webui/ntp/recently_closed_tabs_handler.cc
+++ b/chrome/browser/ui/webui/ntp/recently_closed_tabs_handler.cc
@@ -5,6 +5,7 @@
#include "chrome/browser/ui/webui/ntp/recently_closed_tabs_handler.h"
#include "base/metrics/histogram.h"
+#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/sessions/tab_restore_service_delegate.h"
#include "chrome/browser/sessions/tab_restore_service_factory.h"
#include "chrome/browser/ui/webui/ntp/new_tab_ui.h"
@@ -111,8 +112,10 @@ void RecentlyClosedTabsHandler::HandleReopenTab(const ListValue* args) {
void RecentlyClosedTabsHandler::HandleGetRecentlyClosedTabs(
const ListValue* args) {
if (!tab_restore_service_) {
+ Profile* profile =
+ Profile::FromBrowserContext(web_ui_->tab_contents()->browser_context());
tab_restore_service_ =
- TabRestoreServiceFactory::GetForProfile(web_ui_->GetProfile());
+ TabRestoreServiceFactory::GetForProfile(profile);
// TabRestoreServiceFactory::GetForProfile() can return NULL (i.e., when in
// Off the Record mode)

Powered by Google App Engine
This is Rietveld 408576698