diff options
author | jhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-11 23:19:44 +0000 |
---|---|---|
committer | jhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-11 23:19:44 +0000 |
commit | 85e921fb8e323a9226215569d41a5ab7203d3aad (patch) | |
tree | a2da555096fea411a5daa087156683c795f6083f /chrome/browser/sessions | |
parent | 07fa03bb5efcc25a61e7e8407a38ee5eacc71b9e (diff) | |
download | chromium_src-85e921fb8e323a9226215569d41a5ab7203d3aad.zip chromium_src-85e921fb8e323a9226215569d41a5ab7203d3aad.tar.gz chromium_src-85e921fb8e323a9226215569d41a5ab7203d3aad.tar.bz2 |
Make session_service.cc compile on Mac and Linux.
Review URL: http://codereview.chromium.org/23018
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9608 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/sessions')
-rw-r--r-- | chrome/browser/sessions/session_service.cc | 15 | ||||
-rw-r--r-- | chrome/browser/sessions/session_service.h | 12 |
2 files changed, 21 insertions, 6 deletions
diff --git a/chrome/browser/sessions/session_service.cc b/chrome/browser/sessions/session_service.cc index 5f060d8..86a6b19 100644 --- a/chrome/browser/sessions/session_service.cc +++ b/chrome/browser/sessions/session_service.cc @@ -16,16 +16,21 @@ #include "chrome/browser/browser_window.h" #include "chrome/browser/profile.h" #include "chrome/browser/session_startup_pref.h" -#include "chrome/browser/sessions/session_backend.h" -#include "chrome/browser/sessions/session_restore.h" +#include "chrome/browser/sessions/session_command.h" #include "chrome/browser/sessions/session_types.h" #include "chrome/browser/tab_contents/navigation_controller.h" #include "chrome/browser/tab_contents/navigation_entry.h" -#include "chrome/browser/tab_contents/tab_contents.h" #include "chrome/common/notification_details.h" #include "chrome/common/notification_service.h" #include "chrome/common/scoped_vector.h" + +// TODO(port): Get rid of this section and finish porting. +#if defined(OS_WIN) +#include "chrome/browser/sessions/session_backend.h" +#include "chrome/browser/sessions/session_restore.h" +#include "chrome/browser/tab_contents/tab_contents.h" #include "chrome/common/win_util.h" +#endif using base::Time; @@ -679,7 +684,7 @@ void SessionService::SortTabsBasedOnVisualOrderAndPrune( if (i->second->tabs.empty() || i->second->is_constrained || !should_track_changes_for_browser_type(i->second->type)) { delete i->second; - i = windows->erase(i); + windows->erase(i++); } else { // Valid window; sort the tabs and add it to the list of valid windows. std::sort(i->second->tabs.begin(), i->second->tabs.end(), @@ -706,7 +711,7 @@ void SessionService::AddTabsToWindows(std::map<int, SessionTab*>* tabs, if (tab->window_id.id() && !tab->navigations.empty()) { SessionWindow* window = GetWindow(tab->window_id.id(), windows); window->tabs.push_back(tab); - i = tabs->erase(i); + tabs->erase(i++); // See note in SessionTab as to why we do this. std::vector<TabNavigation>::iterator j = diff --git a/chrome/browser/sessions/session_service.h b/chrome/browser/sessions/session_service.h index 3c2f7fc..015401c 100644 --- a/chrome/browser/sessions/session_service.h +++ b/chrome/browser/sessions/session_service.h @@ -9,11 +9,21 @@ #include "base/basictypes.h" #include "chrome/browser/browser.h" -#include "chrome/browser/sessions/base_session_service.h" #include "chrome/browser/sessions/session_id.h" #include "chrome/common/notification_observer.h" #include "chrome/common/notification_registrar.h" +#if defined(OS_POSIX) +// TODO(port): get rid of this include. It's used just to provide declarations +// and stub definitions for classes we encouter during the porting effort. +#include "chrome/common/temp_scaffolding_stubs.h" +#endif + +// TODO(port): Get rid of this section and finish porting. +#if defined(OS_WIN) +#include "chrome/browser/sessions/base_session_service.h" +#endif + class Browser; class NavigationController; class NavigationEntry; |