diff options
author | jhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-14 22:53:35 +0000 |
---|---|---|
committer | jhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-14 22:53:35 +0000 |
commit | 5e997eacfb2234633831d06c91859ee76af44468 (patch) | |
tree | d01aaffe479e9bc4f4e9df665d8d4a5f2e829060 /chrome | |
parent | dda6fa35a307c5a77b85602159f434fd7c252836 (diff) | |
download | chromium_src-5e997eacfb2234633831d06c91859ee76af44468.zip chromium_src-5e997eacfb2234633831d06c91859ee76af44468.tar.gz chromium_src-5e997eacfb2234633831d06c91859ee76af44468.tar.bz2 |
Make session_restore.cc compile on Posix.
Review URL: http://codereview.chromium.org/21376
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9826 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/browser.scons | 1 | ||||
-rw-r--r-- | chrome/browser/browser_init.cc | 2 | ||||
-rw-r--r-- | chrome/browser/sessions/session_restore.cc | 9 | ||||
-rw-r--r-- | chrome/browser/sessions/session_service.cc | 2 | ||||
-rw-r--r-- | chrome/chrome.xcodeproj/project.pbxproj | 4 | ||||
-rw-r--r-- | chrome/common/temp_scaffolding_stubs.cc | 3 | ||||
-rw-r--r-- | chrome/common/temp_scaffolding_stubs.h | 16 |
7 files changed, 13 insertions, 24 deletions
diff --git a/chrome/browser/browser.scons b/chrome/browser/browser.scons index b144733..f8c17b9 100644 --- a/chrome/browser/browser.scons +++ b/chrome/browser/browser.scons @@ -745,7 +745,6 @@ if not env.Bit('windows'): 'sandbox_policy.cc', 'search_engines/template_url_fetcher.cc', 'sessions/base_session_service.cc', - 'sessions/session_restore.cc', 'shell_integration.cc', 'tab_contents/interstitial_page.cc', 'tab_contents/native_ui_contents.cc', diff --git a/chrome/browser/browser_init.cc b/chrome/browser/browser_init.cc index 7a8efbc..51541f4 100644 --- a/chrome/browser/browser_init.cc +++ b/chrome/browser/browser_init.cc @@ -21,6 +21,7 @@ #include "chrome/browser/renderer_host/render_process_host.h" #include "chrome/browser/search_engines/template_url_model.h" #include "chrome/browser/session_startup_pref.h" +#include "chrome/browser/sessions/session_restore.h" #include "chrome/browser/tab_contents/infobar_delegate.h" #include "chrome/browser/tab_contents/navigation_controller.h" #include "chrome/browser/net/url_fixer_upper.h" @@ -40,7 +41,6 @@ #include "grit/theme_resources.h" #include "chrome/browser/automation/automation_provider.h" #include "chrome/browser/automation/automation_provider_list.h" -#include "chrome/browser/sessions/session_restore.h" #include "chrome/common/resource_bundle.h" #include "chromium_strings.h" diff --git a/chrome/browser/sessions/session_restore.cc b/chrome/browser/sessions/session_restore.cc index 331a152..bced7ae 100644 --- a/chrome/browser/sessions/session_restore.cc +++ b/chrome/browser/sessions/session_restore.cc @@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include "build/build_config.h" + #include "chrome/browser/sessions/session_restore.h" #include <vector> @@ -14,10 +16,13 @@ #include "chrome/browser/sessions/session_service.h" #include "chrome/browser/sessions/session_types.h" #include "chrome/browser/tab_contents/navigation_controller.h" -#include "chrome/browser/tab_contents/tab_contents.h" #include "chrome/common/notification_registrar.h" #include "chrome/common/notification_service.h" +#if defined(OS_WIN) +#include "chrome/browser/tab_contents/tab_contents.h" +#endif + namespace { // TabLoader ------------------------------------------------------------------ @@ -196,7 +201,7 @@ class SessionRestoreImpl : public NotificationObserver { urls_to_open_(urls_to_open) { } - void SessionRestoreImpl::Restore() { + void Restore() { SessionService* session_service = profile_->GetSessionService(); DCHECK(session_service); SessionService::LastSessionCallback* callback = diff --git a/chrome/browser/sessions/session_service.cc b/chrome/browser/sessions/session_service.cc index 9521a88..7e16b34 100644 --- a/chrome/browser/sessions/session_service.cc +++ b/chrome/browser/sessions/session_service.cc @@ -18,6 +18,7 @@ #include "chrome/browser/session_startup_pref.h" #include "chrome/browser/sessions/session_backend.h" #include "chrome/browser/sessions/session_command.h" +#include "chrome/browser/sessions/session_restore.h" #include "chrome/browser/sessions/session_types.h" #include "chrome/browser/tab_contents/navigation_controller.h" #include "chrome/browser/tab_contents/navigation_entry.h" @@ -27,7 +28,6 @@ // TODO(port): Get rid of this section and finish porting. #if defined(OS_WIN) -#include "chrome/browser/sessions/session_restore.h" #include "chrome/browser/tab_contents/tab_contents.h" #include "chrome/common/win_util.h" #endif diff --git a/chrome/chrome.xcodeproj/project.pbxproj b/chrome/chrome.xcodeproj/project.pbxproj index be3b368..3e4886d 100644 --- a/chrome/chrome.xcodeproj/project.pbxproj +++ b/chrome/chrome.xcodeproj/project.pbxproj @@ -119,6 +119,7 @@ 3380A9C00F2FC61E004EF74F /* render_process_unittest.cc in Sources */ = {isa = PBXBuildFile; fileRef = 3380A9BF0F2FC61E004EF74F /* render_process_unittest.cc */; }; 3380A9D60F2FC8F6004EF74F /* render_dns_master.cc in Sources */ = {isa = PBXBuildFile; fileRef = 4D640CE10EAE86A500EBCFC0 /* render_dns_master.cc */; }; 3380A9D70F2FC8F9004EF74F /* render_dns_master.cc in Sources */ = {isa = PBXBuildFile; fileRef = 4D640CE10EAE86A500EBCFC0 /* render_dns_master.cc */; }; + 34A17287EFE747DE84BAE6E6 /* session_restore.cc in Sources */ = {isa = PBXBuildFile; fileRef = C3F9577C67188A5A4E3A6E41 /* session_restore.cc */; }; 3AEA44DB19C9D93B63D7A2E4 /* url_fetcher_protect.cc in Sources */ = {isa = PBXBuildFile; fileRef = 0B7CC9C105E90E0665852528 /* url_fetcher_protect.cc */; }; 406DFE278638D6132B21B2C9 /* url_pattern.cc in Sources */ = {isa = PBXBuildFile; fileRef = 6447F24FADC63E58A44DB762 /* url_pattern.cc */; }; 423A79243BC7B7C0B1E9B97A /* session_service.cc in Sources */ = {isa = PBXBuildFile; fileRef = C8D26D9EC81E03E91E270463 /* session_service.cc */; }; @@ -2573,6 +2574,7 @@ BADB8B6D0F3A356000989B26 /* resource_dispatcher_host.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = resource_dispatcher_host.cc; path = renderer_host/resource_dispatcher_host.cc; sourceTree = "<group>"; }; BADB8BD20F3A4E4900989B26 /* resource_dispatcher_host.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = resource_dispatcher_host.h; path = renderer_host/resource_dispatcher_host.h; sourceTree = "<group>"; }; C18F2A0A6FB6BEF75406511D /* chrome_paths_mac.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = chrome_paths_mac.cc; sourceTree = "<group>"; }; + C3F9577C67188A5A4E3A6E41 /* session_restore.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = session_restore.cc; path = browser/sessions/session_restore.cc; sourceTree = SOURCE_ROOT; }; C8D26D9EC81E03E91E270463 /* session_service.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = session_service.cc; path = sessions/session_service.cc; sourceTree = "<group>"; }; D74DA6A9031CAE292790BD5E /* file_descriptor_set_unittest.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = file_descriptor_set_unittest.cc; sourceTree = "<group>"; }; D941DBEFD8B8B537DE8A4DAE /* bookmark_storage.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = bookmark_storage.cc; path = bookmarks/bookmark_storage.cc; sourceTree = "<group>"; }; @@ -3092,6 +3094,7 @@ F60D7722C1302E1EC789B67A /* ssl_host_state.cc */, 3C56D1B8B7580A18DB8FE677 /* ssl_host_state.h */, 35AC9D9A03545594C102C5C1 /* session_backend.cc */, + C3F9577C67188A5A4E3A6E41 /* session_restore.cc */, ); sourceTree = "<group>"; }; @@ -5419,6 +5422,7 @@ 9084D27A4F8690E6FD31083B /* session_backend.cc in Sources */, E45075F40F150C01003BE099 /* session_command.cc in Sources */, E45075F70F150C0C003BE099 /* session_id.cc in Sources */, + 34A17287EFE747DE84BAE6E6 /* session_restore.cc in Sources */, 423A79243BC7B7C0B1E9B97A /* session_service.cc in Sources */, 4D7BF9B60E9D4894009A6919 /* session_startup_pref.cc in Sources */, E434C46A0F3A5C6000B665C7 /* session_types.cc in Sources */, diff --git a/chrome/common/temp_scaffolding_stubs.cc b/chrome/common/temp_scaffolding_stubs.cc index 2c7ee7c..55cbfcc 100644 --- a/chrome/common/temp_scaffolding_stubs.cc +++ b/chrome/common/temp_scaffolding_stubs.cc @@ -41,9 +41,6 @@ #include "webkit/glue/webcursor.h" #include "webkit/glue/webkit_glue.h" -// static -size_t SessionRestore::num_tabs_to_load_ = 0; - //-------------------------------------------------------------------------- // static diff --git a/chrome/common/temp_scaffolding_stubs.h b/chrome/common/temp_scaffolding_stubs.h index 512591d..27cfc32 100644 --- a/chrome/common/temp_scaffolding_stubs.h +++ b/chrome/common/temp_scaffolding_stubs.h @@ -261,22 +261,6 @@ class BaseSessionService : public CancelableRequestProvider, std::vector<SessionCommand*> pending_commands_; }; -class SessionRestore { - public: - static void RestoreSession(Profile* profile, - Browser* browser, - bool clobber_existing_window, - bool always_create_tabbed_browser, - const std::vector<GURL>& urls_to_open) { - NOTIMPLEMENTED(); - } - static void RestoreSessionSynchronously( - Profile* profile, - const std::vector<GURL>& urls_to_open) { NOTIMPLEMENTED(); } - - static size_t num_tabs_to_load_; -}; - namespace browser { void RegisterAllPrefs(PrefService*, PrefService*); } |