summaryrefslogtreecommitdiffstats
path: root/chrome/browser/sessions
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/sessions')
-rw-r--r--chrome/browser/sessions/restore_tab_helper.cc6
-rw-r--r--chrome/browser/sessions/session_restore.cc4
-rw-r--r--chrome/browser/sessions/session_restore_browsertest.cc7
-rw-r--r--chrome/browser/sessions/session_service.cc20
-rw-r--r--chrome/browser/sessions/session_service_unittest.cc4
5 files changed, 22 insertions, 19 deletions
diff --git a/chrome/browser/sessions/restore_tab_helper.cc b/chrome/browser/sessions/restore_tab_helper.cc
index 2823e8e..074991e 100644
--- a/chrome/browser/sessions/restore_tab_helper.cc
+++ b/chrome/browser/sessions/restore_tab_helper.cc
@@ -7,7 +7,7 @@
#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
#include "chrome/common/extensions/extension_messages.h"
#include "content/browser/renderer_host/render_view_host.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_types.h"
RestoreTabHelper::RestoreTabHelper(TabContentsWrapper* tab)
@@ -20,10 +20,10 @@ RestoreTabHelper::~RestoreTabHelper() {
void RestoreTabHelper::SetWindowID(const SessionID& id) {
window_id_ = id;
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
content::NOTIFICATION_TAB_PARENTED,
content::Source<TabContentsWrapper>(tab_),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
// Extension code in the renderer holds the ID of the window that hosts it.
// Notify it that the window ID changed.
diff --git a/chrome/browser/sessions/session_restore.cc b/chrome/browser/sessions/session_restore.cc
index e1befc6..eefb94b 100644
--- a/chrome/browser/sessions/session_restore.cc
+++ b/chrome/browser/sessions/session_restore.cc
@@ -33,7 +33,7 @@
#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/tab_contents/tab_contents_view.h"
#include "content/public/browser/notification_registrar.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "net/base/network_change_notifier.h"
#if defined(OS_CHROMEOS)
@@ -184,7 +184,7 @@ void TabLoader::TabIsLoading(NavigationController* controller) {
void TabLoader::StartLoading() {
registrar_.Add(this, content::NOTIFICATION_RENDER_WIDGET_HOST_DID_PAINT,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
#if defined(OS_CHROMEOS)
if (!net::NetworkChangeNotifier::IsOffline()) {
loading_ = true;
diff --git a/chrome/browser/sessions/session_restore_browsertest.cc b/chrome/browser/sessions/session_restore_browsertest.cc
index 29f6d9d..1289f9f 100644
--- a/chrome/browser/sessions/session_restore_browsertest.cc
+++ b/chrome/browser/sessions/session_restore_browsertest.cc
@@ -14,6 +14,7 @@
#include "chrome/test/base/in_process_browser_test.h"
#include "chrome/test/base/ui_test_utils.h"
#include "content/browser/tab_contents/tab_contents.h"
+#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_types.h"
#include "content/public/common/page_transition_types.h"
@@ -124,13 +125,15 @@ IN_PROC_BROWSER_TEST_F(SessionRestoreTest, RestoreIndividualTabFromWindow) {
ui_test_utils::NavigateToURL(browser(), url1);
{
ui_test_utils::WindowedNotificationObserver observer(
- content::NOTIFICATION_LOAD_STOP, NotificationService::AllSources());
+ content::NOTIFICATION_LOAD_STOP,
+ content::NotificationService::AllSources());
browser()->AddSelectedTabWithURL(url2, content::PAGE_TRANSITION_LINK);
observer.Wait();
}
{
ui_test_utils::WindowedNotificationObserver observer(
- content::NOTIFICATION_LOAD_STOP, NotificationService::AllSources());
+ content::NOTIFICATION_LOAD_STOP,
+ content::NotificationService::AllSources());
browser()->AddSelectedTabWithURL(url3, content::PAGE_TRANSITION_LINK);
observer.Wait();
}
diff --git a/chrome/browser/sessions/session_service.cc b/chrome/browser/sessions/session_service.cc
index de031f6..1c570ac 100644
--- a/chrome/browser/sessions/session_service.cc
+++ b/chrome/browser/sessions/session_service.cc
@@ -33,7 +33,7 @@
#include "content/browser/tab_contents/navigation_details.h"
#include "content/browser/tab_contents/navigation_entry.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_details.h"
#if defined(OS_MACOSX)
@@ -458,30 +458,30 @@ void SessionService::Save() {
RecordSessionUpdateHistogramData(
chrome::NOTIFICATION_SESSION_SERVICE_SAVED,
&last_updated_save_time_);
- NotificationService::current()->Notify(
+ content::NotificationService::current()->Notify(
chrome::NOTIFICATION_SESSION_SERVICE_SAVED,
content::Source<Profile>(profile()),
- NotificationService::NoDetails());
+ content::NotificationService::NoDetails());
}
}
void SessionService::Init() {
// Register for the notifications we're interested in.
registrar_.Add(this, content::NOTIFICATION_TAB_PARENTED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar_.Add(this, content::NOTIFICATION_TAB_CLOSED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar_.Add(this, content::NOTIFICATION_NAV_LIST_PRUNED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar_.Add(this, content::NOTIFICATION_NAV_ENTRY_CHANGED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar_.Add(this, content::NOTIFICATION_NAV_ENTRY_COMMITTED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
registrar_.Add(this, chrome::NOTIFICATION_BROWSER_OPENED,
- NotificationService::AllBrowserContextsAndSources());
+ content::NotificationService::AllBrowserContextsAndSources());
registrar_.Add(
this, chrome::NOTIFICATION_TAB_CONTENTS_APPLICATION_EXTENSION_CHANGED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
}
bool SessionService::ShouldNewWindowStartSession() {
diff --git a/chrome/browser/sessions/session_service_unittest.cc b/chrome/browser/sessions/session_service_unittest.cc
index d6b4479..e79d4cd 100644
--- a/chrome/browser/sessions/session_service_unittest.cc
+++ b/chrome/browser/sessions/session_service_unittest.cc
@@ -23,7 +23,7 @@
#include "content/browser/tab_contents/navigation_entry.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
-#include "content/common/notification_service.h"
+#include "content/public/browser/notification_service.h"
#include "testing/gtest/include/gtest/gtest.h"
class SessionServiceTest : public BrowserWithTestWindowTest,
@@ -650,7 +650,7 @@ TEST_F(SessionServiceTest, GetCurrentSession) {
TEST_F(SessionServiceTest, SavedSessionNotification) {
content::NotificationRegistrar registrar_;
registrar_.Add(this, chrome::NOTIFICATION_SESSION_SERVICE_SAVED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
service()->Save();
EXPECT_EQ(sync_save_count_, 1);
}