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

Unified Diff: chrome/browser/automation/automation_provider_observers.cc

Issue 6901031: Profile shouldn't own Session/TabRestore services. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix mac build 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
Index: chrome/browser/automation/automation_provider_observers.cc
diff --git a/chrome/browser/automation/automation_provider_observers.cc b/chrome/browser/automation/automation_provider_observers.cc
index 15beb50e0bb11528cac04b44a7a8d22353b796f9..bb2f5aef37a3ac2e6e1e77cc10483f9ac047a469 100644
--- a/chrome/browser/automation/automation_provider_observers.cc
+++ b/chrome/browser/automation/automation_provider_observers.cc
@@ -42,6 +42,7 @@
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/search_engines/template_url_model.h"
#include "chrome/browser/sessions/tab_restore_service.h"
+#include "chrome/browser/sessions/tab_restore_service_factory.h"
#include "chrome/browser/tab_contents/thumbnail_generator.h"
#include "chrome/browser/translate/page_translated_details.h"
#include "chrome/browser/translate/translate_infobar_delegate.h"
@@ -1894,7 +1895,8 @@ NTPInfoObserver::NTPInfoObserver(
.SendError("Profile does not have service for querying the top sites.");
return;
}
- TabRestoreService* service = automation_->profile()->GetTabRestoreService();
+ TabRestoreService* service =
+ TabRestoreServiceFactory::GetForProfile(automation_->profile());
if (!service) {
AutomationJSONReply(automation_, reply_message_.release())
.SendError("No TabRestoreService.");

Powered by Google App Engine
This is Rietveld 408576698