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

Unified Diff: chrome/browser/ui/webui/new_tab_ui.cc

Issue 6901031: Profile shouldn't own Session/TabRestore services. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase again and hope upload works this time Created 9 years, 8 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
« no previous file with comments | « chrome/browser/ui/views/frame/browser_view.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/new_tab_ui.cc
diff --git a/chrome/browser/ui/webui/new_tab_ui.cc b/chrome/browser/ui/webui/new_tab_ui.cc
index 862cefd73e3785df08e66a4a04579000f1303fe4..973babb6138ccca06ae64c3810b509e843d0b955 100644
--- a/chrome/browser/ui/webui/new_tab_ui.cc
+++ b/chrome/browser/ui/webui/new_tab_ui.cc
@@ -21,6 +21,7 @@
#include "chrome/browser/sessions/session_types.h"
#include "chrome/browser/sessions/tab_restore_service.h"
#include "chrome/browser/sessions/tab_restore_service_delegate.h"
+#include "chrome/browser/sessions/tab_restore_service_factory.h"
#include "chrome/browser/sessions/tab_restore_service_observer.h"
#include "chrome/browser/sync/profile_sync_service.h"
#include "chrome/browser/themes/theme_service.h"
@@ -131,10 +132,11 @@ void RecentlyClosedTabsHandler::HandleReopenTab(const ListValue* args) {
void RecentlyClosedTabsHandler::HandleGetRecentlyClosedTabs(
const ListValue* args) {
if (!tab_restore_service_) {
- tab_restore_service_ = web_ui_->GetProfile()->GetTabRestoreService();
+ tab_restore_service_ =
+ TabRestoreServiceFactory::GetForProfile(web_ui_->GetProfile());
- // GetTabRestoreService() can return NULL (i.e., when in Off the
- // Record mode)
+ // TabRestoreServiceFactory::GetForProfile() can return NULL (i.e., when in
+ // Off the Record mode)
if (tab_restore_service_) {
// This does nothing if the tabs have already been loaded or they
// shouldn't be loaded.
« no previous file with comments | « chrome/browser/ui/views/frame/browser_view.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698