diff options
-rw-r--r-- | chrome/browser/browser.scons | 1 | ||||
-rw-r--r-- | chrome/browser/sessions/base_session_service.cc | 4 | ||||
-rw-r--r-- | chrome/browser/sessions/base_session_service.h | 5 | ||||
-rw-r--r-- | chrome/browser/sessions/session_backend.cc | 115 | ||||
-rw-r--r-- | chrome/browser/sessions/session_backend.h | 25 | ||||
-rw-r--r-- | chrome/browser/sessions/session_backend_unittest.cc | 11 | ||||
-rw-r--r-- | chrome/browser/sessions/session_service.cc | 6 | ||||
-rw-r--r-- | chrome/browser/sessions/session_service.h | 2 | ||||
-rw-r--r-- | chrome/browser/sessions/session_service_unittest.cc | 10 | ||||
-rw-r--r-- | chrome/browser/sessions/tab_restore_service.cc | 2 | ||||
-rw-r--r-- | chrome/chrome.xcodeproj/project.pbxproj | 6 | ||||
-rw-r--r-- | chrome/common/temp_scaffolding_stubs.h | 8 |
12 files changed, 102 insertions, 93 deletions
diff --git a/chrome/browser/browser.scons b/chrome/browser/browser.scons index 0b12e1b..b144733 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_backend.cc', 'sessions/session_restore.cc', 'shell_integration.cc', 'tab_contents/interstitial_page.cc', diff --git a/chrome/browser/sessions/base_session_service.cc b/chrome/browser/sessions/base_session_service.cc index bf21c63..5ab3282 100644 --- a/chrome/browser/sessions/base_session_service.cc +++ b/chrome/browser/sessions/base_session_service.cc @@ -61,7 +61,7 @@ const int BaseSessionService::max_persist_navigation_count = 6; BaseSessionService::BaseSessionService(SessionType type, Profile* profile, - const std::wstring& path) + const FilePath& path) : profile_(profile), path_(path), backend_thread_(NULL), @@ -74,7 +74,7 @@ BaseSessionService::BaseSessionService(SessionType type, DCHECK(!profile->IsOffTheRecord()); } backend_ = new SessionBackend(type, - profile_ ? profile_->GetPath().ToWStringHack() : path_); + profile_ ? profile_->GetPath() : path_); DCHECK(backend_.get()); backend_thread_ = g_browser_process->file_thread(); if (!backend_thread_) diff --git a/chrome/browser/sessions/base_session_service.h b/chrome/browser/sessions/base_session_service.h index 49c70c4..b6e69e1 100644 --- a/chrome/browser/sessions/base_session_service.h +++ b/chrome/browser/sessions/base_session_service.h @@ -6,6 +6,7 @@ #define CHROME_BROWSER_SESSIONS_BASE_SESSION_SERVICE_H_ #include "base/basictypes.h" +#include "base/file_path.h" #include "base/ref_counted.h" #include "base/task.h" #include "chrome/browser/cancelable_request.h" @@ -43,7 +44,7 @@ class BaseSessionService : public CancelableRequestProvider, // ignored and instead the path comes from the profile. BaseSessionService(SessionType type, Profile* profile, - const std::wstring& path); + const FilePath& path); virtual ~BaseSessionService(); @@ -141,7 +142,7 @@ class BaseSessionService : public CancelableRequestProvider, Profile* profile_; // Path to read from. This is only used if profile_ is NULL. - const std::wstring& path_; + const FilePath& path_; // The backend. scoped_refptr<SessionBackend> backend_; diff --git a/chrome/browser/sessions/session_backend.cc b/chrome/browser/sessions/session_backend.cc index dc259d1..2fbbe40 100644 --- a/chrome/browser/sessions/session_backend.cc +++ b/chrome/browser/sessions/session_backend.cc @@ -32,13 +32,13 @@ class SessionFileReader { typedef SessionCommand::id_type id_type; typedef SessionCommand::size_type size_type; - SessionFileReader(const std::wstring& path) - : handle_(CreateFile(path.c_str(), GENERIC_READ, 0, NULL, - OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL)), - buffer_(SessionBackend::kFileReadBufferSize, 0), + explicit SessionFileReader(const FilePath& path) + : errored_(false), + buffer_(SessionBackend::kFileReadBufferSize, 0), buffer_position_(0), - available_count_(0), - errored_(false) { + available_count_(0) { + file_.reset(new net::FileStream()); + file_->Open(path, base::PLATFORM_FILE_OPEN | base::PLATFORM_FILE_READ); } // Reads the contents of the file specified in the constructor, returning // true on success. It is up to the caller to free all SessionCommands @@ -66,7 +66,7 @@ class SessionFileReader { std::string buffer_; // The file. - ScopedHandle handle_; + scoped_ptr<net::FileStream> file_; // Position in buffer_ of the data. size_t buffer_position_; @@ -79,13 +79,14 @@ class SessionFileReader { bool SessionFileReader::Read(BaseSessionService::SessionType type, std::vector<SessionCommand*>* commands) { - if (!handle_.IsValid()) + if (!file_->IsOpen()) return false; int32 header[2]; - DWORD read_count; + int read_count; TimeTicks start_time = TimeTicks::Now(); - if (!ReadFile(handle_, &header, sizeof(header), &read_count, NULL) || - read_count != sizeof(header) || header[0] != kFileSignature || + read_count = file_->ReadUntilComplete(reinterpret_cast<char*>(&header), + sizeof(header)); + if (read_count != sizeof(header) || header[0] != kFileSignature || header[1] != kFileCurrentVersion) return false; @@ -158,16 +159,16 @@ bool SessionFileReader::FillBuffer() { } buffer_position_ = 0; DCHECK(buffer_position_ + available_count_ < buffer_.size()); - DWORD read_count; - if (!ReadFile(handle_, &(buffer_[available_count_]), - static_cast<DWORD>(buffer_.size() - available_count_), - &read_count, NULL)) { + int to_read = static_cast<int>(buffer_.size() - available_count_); + int read_count = file_->ReadUntilComplete(&(buffer_[available_count_]), + to_read); + if (read_count < 0) { errored_ = true; return false; } if (read_count == 0) return false; - available_count_ += static_cast<int>(read_count); + available_count_ += read_count; return true; } @@ -176,18 +177,18 @@ bool SessionFileReader::FillBuffer() { // SessionBackend ------------------------------------------------------------- // File names (current and previous) for a type of TAB. -static const wchar_t* const kCurrentTabSessionFileName = L"Current Tabs"; -static const wchar_t* const kLastTabSessionFileName = L"Last Tabs"; +static const char* kCurrentTabSessionFileName = "Current Tabs"; +static const char* kLastTabSessionFileName = "Last Tabs"; // File names (current and previous) for a type of SESSION. -static const wchar_t* const kCurrentSessionFileName = L"Current Session"; -static const wchar_t* const kLastSessionFileName = L"Last Session"; +static const char* kCurrentSessionFileName = "Current Session"; +static const char* kLastSessionFileName = "Last Session"; // static const int SessionBackend::kFileReadBufferSize = 1024; SessionBackend::SessionBackend(BaseSessionService::SessionType type, - const std::wstring& path_to_dir) + const FilePath& path_to_dir) : type_(type), path_to_dir_(path_to_dir), last_session_valid_(false), @@ -212,11 +213,11 @@ void SessionBackend::AppendCommands( std::vector<SessionCommand*>* commands, bool reset_first) { Init(); - if ((reset_first && !empty_file_) || !current_session_handle_.IsValid()) + if ((reset_first && !empty_file_) || !current_session_file_->IsOpen()) ResetFile(); - if (current_session_handle_.IsValid() && - !AppendCommandsToFile(current_session_handle_, *commands)) { - current_session_handle_.Set(NULL); + if (current_session_file_->IsOpen() && + !AppendCommandsToFile(current_session_file_.get(), *commands)) { + current_session_file_.reset(NULL); } empty_file_ = false; STLDeleteElements(commands); @@ -248,10 +249,10 @@ void SessionBackend::DeleteLastSession() { void SessionBackend::MoveCurrentSessionToLastSession() { Init(); - current_session_handle_.Set(NULL); + current_session_file_.reset(NULL); - const std::wstring current_session_path = GetCurrentSessionPath(); - const std::wstring last_session_path = GetLastSessionPath(); + const FilePath current_session_path = GetCurrentSessionPath(); + const FilePath last_session_path = GetLastSessionPath(); if (file_util::PathExists(last_session_path)) file_util::Delete(last_session_path, false); if (file_util::PathExists(current_session_path)) { @@ -276,31 +277,33 @@ void SessionBackend::MoveCurrentSessionToLastSession() { ResetFile(); } -bool SessionBackend::AppendCommandsToFile( - HANDLE handle, +bool SessionBackend::AppendCommandsToFile(net::FileStream* file, const std::vector<SessionCommand*>& commands) { for (std::vector<SessionCommand*>::const_iterator i = commands.begin(); i != commands.end(); ++i) { - DWORD wrote; + int wrote; const size_type content_size = static_cast<size_type>((*i)->size()); const size_type total_size = content_size + sizeof(id_type); if (type_ == BaseSessionService::TAB_RESTORE) UMA_HISTOGRAM_COUNTS(L"TabRestore.command_size", total_size); else UMA_HISTOGRAM_COUNTS(L"SessionRestore.command_size", total_size); - if (!WriteFile(handle, &total_size, sizeof(total_size), &wrote, NULL) || - wrote != sizeof(total_size)) { + wrote = file->Write(reinterpret_cast<const char*>(&total_size), + sizeof(total_size), NULL); + if (wrote != sizeof(total_size)) { NOTREACHED() << "error writing"; return false; } id_type command_id = (*i)->id(); - if (!WriteFile(handle, &command_id, sizeof(command_id), &wrote, NULL) || - wrote != sizeof(command_id)) { + wrote = file->Write(reinterpret_cast<char*>(&command_id), + sizeof(command_id), NULL); + if (wrote != sizeof(command_id)) { NOTREACHED() << "error writing"; return false; } - if (!WriteFile(handle, (*i)->contents(), content_size, &wrote, NULL) || - wrote != content_size) { + wrote = file->Write(reinterpret_cast<char*>((*i)->contents()), + content_size, NULL); + if (wrote != content_size) { NOTREACHED() << "error writing"; return false; } @@ -310,43 +313,41 @@ bool SessionBackend::AppendCommandsToFile( void SessionBackend::ResetFile() { DCHECK(inited_); - // Do Set(NULL) first to make sure we close current file (if open). - current_session_handle_.Set(NULL); - current_session_handle_.Set(OpenAndWriteHeader(GetCurrentSessionPath())); + current_session_file_.reset(OpenAndWriteHeader(GetCurrentSessionPath())); empty_file_ = true; } -HANDLE SessionBackend::OpenAndWriteHeader(const std::wstring& path) { +net::FileStream* SessionBackend::OpenAndWriteHeader(const FilePath& path) { DCHECK(!path.empty()); - ScopedHandle hfile( - CreateFile(path.c_str(), GENERIC_WRITE, 0, NULL, - CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL)); - if (!hfile.IsValid()) + net::FileStream* file = new net::FileStream(); + file->Open(path, base::PLATFORM_FILE_CREATE_ALWAYS | + base::PLATFORM_FILE_WRITE); + if (!file->IsOpen()) return NULL; int32 header[2]; header[0] = kFileSignature; header[1] = kFileCurrentVersion; - DWORD wrote; - if (!WriteFile(hfile, &header, sizeof(header), &wrote, NULL) || - wrote != sizeof(header)) + int wrote = file->Write(reinterpret_cast<char*>(&header), + sizeof(header), NULL); + if (wrote != sizeof(header)) return NULL; - return hfile.Take(); + return file; } -std::wstring SessionBackend::GetLastSessionPath() { - std::wstring path = path_to_dir_; +FilePath SessionBackend::GetLastSessionPath() { + FilePath path = path_to_dir_; if (type_ == BaseSessionService::TAB_RESTORE) - file_util::AppendToPath(&path, kLastTabSessionFileName); + path = path.AppendASCII(kLastTabSessionFileName); else - file_util::AppendToPath(&path, kLastSessionFileName); + path = path.AppendASCII(kLastSessionFileName); return path; } -std::wstring SessionBackend::GetCurrentSessionPath() { - std::wstring path = path_to_dir_; +FilePath SessionBackend::GetCurrentSessionPath() { + FilePath path = path_to_dir_; if (type_ == BaseSessionService::TAB_RESTORE) - file_util::AppendToPath(&path, kCurrentTabSessionFileName); + path = path.AppendASCII(kCurrentTabSessionFileName); else - file_util::AppendToPath(&path, kCurrentSessionFileName); + path = path.AppendASCII(kCurrentSessionFileName); return path; } diff --git a/chrome/browser/sessions/session_backend.h b/chrome/browser/sessions/session_backend.h index 1519d3f..5535cb2 100644 --- a/chrome/browser/sessions/session_backend.h +++ b/chrome/browser/sessions/session_backend.h @@ -8,9 +8,16 @@ #include <vector> #include "base/ref_counted.h" -#include "base/scoped_handle.h" -#include "chrome/browser/sessions/base_session_service.h" +#include "base/scoped_ptr.h" #include "chrome/browser/sessions/session_command.h" +#include "net/base/file_stream.h" + +// TODO(port): Get rid of this section and finish porting. +#if defined(OS_WIN) +#include "chrome/browser/sessions/base_session_service.h" +#else +#include "chrome/common/temp_scaffolding_stubs.h" +#endif class Pickle; @@ -44,7 +51,7 @@ class SessionBackend : public base::RefCountedThreadSafe<SessionBackend> { // indicates which service is using this backend. |type| is used to determine // the name of the files to use as well as for logging. SessionBackend(BaseSessionService::SessionType type, - const std::wstring& path_to_dir); + const FilePath& path_to_dir); // Moves the current file to the last file, and recreates the current file. // @@ -86,28 +93,28 @@ class SessionBackend : public base::RefCountedThreadSafe<SessionBackend> { // Opens the current file and writes the header. On success a handle to // the file is returned. - HANDLE OpenAndWriteHeader(const std::wstring& path); + net::FileStream* OpenAndWriteHeader(const FilePath& path); // Appends the specified commands to the specified file. - bool AppendCommandsToFile(HANDLE handle, + bool AppendCommandsToFile(net::FileStream* file, const std::vector<SessionCommand*>& commands); const BaseSessionService::SessionType type_; // Returns the path to the last file. - std::wstring GetLastSessionPath(); + FilePath GetLastSessionPath(); // Returns the path to the current file. - std::wstring GetCurrentSessionPath(); + FilePath GetCurrentSessionPath(); // Directory files are relative to. - const std::wstring path_to_dir_; + const FilePath path_to_dir_; // Whether the previous target file is valid. bool last_session_valid_; // Handle to the target file. - ScopedHandle current_session_handle_; + scoped_ptr<net::FileStream> current_session_file_; // Whether we've inited. Remember, the constructor is run on the // Main thread, all others on the IO thread, hence lazy initialization. diff --git a/chrome/browser/sessions/session_backend_unittest.cc b/chrome/browser/sessions/session_backend_unittest.cc index b7bfd92..5400c17 100644 --- a/chrome/browser/sessions/session_backend_unittest.cc +++ b/chrome/browser/sessions/session_backend_unittest.cc @@ -2,7 +2,9 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include "base/file_path.h" #include "base/file_util.h" +#include "base/string_util.h" #include "base/path_service.h" #include "base/time.h" #include "chrome/browser/sessions/session_backend.h" @@ -33,13 +35,12 @@ SessionCommand* CreateCommandFromData(const TestData& data) { class SessionBackendTest : public testing::Test { protected: virtual void SetUp() { - wchar_t b[32]; - _itow_s(static_cast<int>(GetTickCount()), b, arraysize(b), 10); + std::wstring b = IntToWString(static_cast<int>(GetTickCount())); PathService::Get(base::DIR_TEMP, &path_); - file_util::AppendToPath(&path_, L"SessionTestDirs"); + path_ = path_.Append(FILE_PATH_LITERAL("SessionTestDirs")); file_util::CreateDirectory(path_); - file_util::AppendToPath(&path_, b); + path_ = path_.Append(b); } virtual void TearDown() { @@ -54,7 +55,7 @@ class SessionBackendTest : public testing::Test { } // Path used in testing. - std::wstring path_; + FilePath path_; }; TEST_F(SessionBackendTest, SimpleReadWrite) { diff --git a/chrome/browser/sessions/session_service.cc b/chrome/browser/sessions/session_service.cc index 86a6b19..9521a88 100644 --- a/chrome/browser/sessions/session_service.cc +++ b/chrome/browser/sessions/session_service.cc @@ -16,6 +16,7 @@ #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_command.h" #include "chrome/browser/sessions/session_types.h" #include "chrome/browser/tab_contents/navigation_controller.h" @@ -26,7 +27,6 @@ // 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" @@ -115,13 +115,13 @@ typedef IDAndIndexPayload TabNavigationPathPrunedFromFrontPayload; // SessionService ------------------------------------------------------------- SessionService::SessionService(Profile* profile) - : BaseSessionService(SESSION_RESTORE, profile, std::wstring()), + : BaseSessionService(SESSION_RESTORE, profile, FilePath()), has_open_tabbed_browsers_(false), move_on_new_browser_(false) { Init(); } -SessionService::SessionService(const std::wstring& save_path) +SessionService::SessionService(const FilePath& save_path) : BaseSessionService(SESSION_RESTORE, NULL, save_path), has_open_tabbed_browsers_(false), move_on_new_browser_(false) { diff --git a/chrome/browser/sessions/session_service.h b/chrome/browser/sessions/session_service.h index 015401c..6a0e63a 100644 --- a/chrome/browser/sessions/session_service.h +++ b/chrome/browser/sessions/session_service.h @@ -58,7 +58,7 @@ class SessionService : public BaseSessionService, // Creates a SessionService for the specified profile. explicit SessionService(Profile* profile); // For testing. - explicit SessionService(const std::wstring& save_path); + explicit SessionService(const FilePath& save_path); virtual ~SessionService(); diff --git a/chrome/browser/sessions/session_service_unittest.cc b/chrome/browser/sessions/session_service_unittest.cc index 059f307e..593fa48 100644 --- a/chrome/browser/sessions/session_service_unittest.cc +++ b/chrome/browser/sessions/session_service_unittest.cc @@ -5,6 +5,7 @@ #include <windows.h> #include "base/file_util.h" +#include "base/string_util.h" #include "base/path_service.h" #include "chrome/browser/sessions/session_backend.h" #include "chrome/browser/sessions/session_service.h" @@ -22,13 +23,12 @@ class SessionServiceTest : public testing::Test { protected: virtual void SetUp() { - wchar_t b[32]; - _itow_s(static_cast<int>(GetTickCount()), b, arraysize(b), 10); + std::wstring b = IntToWString(static_cast<int>(GetTickCount())); PathService::Get(base::DIR_TEMP, &path_); - file_util::AppendToPath(&path_, L"SessionTestDirs"); + path_ = path_.Append(FILE_PATH_LITERAL("SessionTestDirs")); file_util::CreateDirectory(path_); - file_util::AppendToPath(&path_, b); + path_ = path_.Append(b); SessionService* session_service = new SessionService(path_); helper_.set_service(session_service); @@ -78,7 +78,7 @@ class SessionServiceTest : public testing::Test { SessionID window_id; // Path used in testing. - std::wstring path_; + FilePath path_; SessionServiceTestHelper helper_; }; diff --git a/chrome/browser/sessions/tab_restore_service.cc b/chrome/browser/sessions/tab_restore_service.cc index 9a7a5bf..134a898 100644 --- a/chrome/browser/sessions/tab_restore_service.cc +++ b/chrome/browser/sessions/tab_restore_service.cc @@ -92,7 +92,7 @@ void RemoveEntryByID(SessionID::id_type id, TabRestoreService::TabRestoreService(Profile* profile) : BaseSessionService(BaseSessionService::TAB_RESTORE, profile, - std::wstring()), + FilePath()), load_state_(NOT_LOADED), restoring_(false), reached_max_(false), diff --git a/chrome/chrome.xcodeproj/project.pbxproj b/chrome/chrome.xcodeproj/project.pbxproj index b8fd8a3..be3b368 100644 --- a/chrome/chrome.xcodeproj/project.pbxproj +++ b/chrome/chrome.xcodeproj/project.pbxproj @@ -286,6 +286,7 @@ 8570EB3F140C07ABF1957F12 /* url_pattern_unittest.cc in Sources */ = {isa = PBXBuildFile; fileRef = A9C335E39D39A7DE087850FC /* url_pattern_unittest.cc */; }; 8CB218DCFAC761AC876C6531 /* ssl_blocking_page.cc in Sources */ = {isa = PBXBuildFile; fileRef = B5D16ECB0F21451600861FAC /* ssl_blocking_page.cc */; }; 8F51B73AAAF1772ECF9BD180 /* url_fetcher.cc in Sources */ = {isa = PBXBuildFile; fileRef = 778D7927798B7E3FAA498D3D /* url_fetcher.cc */; }; + 9084D27A4F8690E6FD31083B /* session_backend.cc in Sources */ = {isa = PBXBuildFile; fileRef = 35AC9D9A03545594C102C5C1 /* session_backend.cc */; }; 94542322A5E5A8F4FDDAB7F0 /* render_view_host_manager.cc in Sources */ = {isa = PBXBuildFile; fileRef = A76E42AD0F28EDB5009A7E88 /* render_view_host_manager.cc */; }; 96DF109FEE9B09B11690F1FA /* infobar_delegate.cc in Sources */ = {isa = PBXBuildFile; fileRef = B6CCB9CF0F1EC32700106F0D /* infobar_delegate.cc */; }; 97DD178B77011735FE4399E9 /* file_descriptor_set_unittest.cc in Sources */ = {isa = PBXBuildFile; fileRef = D74DA6A9031CAE292790BD5E /* file_descriptor_set_unittest.cc */; }; @@ -1822,8 +1823,9 @@ 3380A6B50F2E9252004EF74F /* render_thread_unittest.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = render_thread_unittest.cc; sourceTree = "<group>"; }; 3380A6B90F2E9275004EF74F /* render_view_unittest.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = render_view_unittest.cc; sourceTree = "<group>"; }; 3380A9BF0F2FC61E004EF74F /* render_process_unittest.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = render_process_unittest.cc; sourceTree = "<group>"; }; - 3C56D1B8B7580A18DB8FE677 /* ssl_host_state.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ssl_host_state.h; path = browser/ssl/ssl_host_state.h; sourceTree = SOURCE_ROOT; }; + 35AC9D9A03545594C102C5C1 /* session_backend.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = session_backend.cc; path = browser/sessions/session_backend.cc; sourceTree = SOURCE_ROOT; }; 37521A11B07C479E93A39D52 /* user_script_unittest.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = user_script_unittest.cc; path = extensions/user_script_unittest.cc; sourceTree = "<group>"; }; + 3C56D1B8B7580A18DB8FE677 /* ssl_host_state.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ssl_host_state.h; path = browser/ssl/ssl_host_state.h; sourceTree = SOURCE_ROOT; }; 3CCF8AA8A56FF8FE59F0C299 /* template_url.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = template_url.cc; sourceTree = "<group>"; }; 3D00CDB6C665E7ED1A1090D7 /* bookmark_model.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = bookmark_model.cc; path = bookmarks/bookmark_model.cc; sourceTree = "<group>"; }; 433B6EFB7A1D931A13C9556F /* url_fetcher_protect.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = url_fetcher_protect.h; sourceTree = "<group>"; }; @@ -3089,6 +3091,7 @@ 4D7BF3070E9D477E009A6919 /* Products */, F60D7722C1302E1EC789B67A /* ssl_host_state.cc */, 3C56D1B8B7580A18DB8FE677 /* ssl_host_state.h */, + 35AC9D9A03545594C102C5C1 /* session_backend.cc */, ); sourceTree = "<group>"; }; @@ -5413,6 +5416,7 @@ 4D7BF9E10E9D48D6009A6919 /* save_file.cc in Sources */, E45075ED0F150ABA003BE099 /* save_file_resource_handler.cc in Sources */, E4F324650EE5D082002533CE /* sdch_dictionary_fetcher.cc in Sources */, + 9084D27A4F8690E6FD31083B /* session_backend.cc in Sources */, E45075F40F150C01003BE099 /* session_command.cc in Sources */, E45075F70F150C0C003BE099 /* session_id.cc in Sources */, 423A79243BC7B7C0B1E9B97A /* session_service.cc in Sources */, diff --git a/chrome/common/temp_scaffolding_stubs.h b/chrome/common/temp_scaffolding_stubs.h index c65e788..512591d 100644 --- a/chrome/common/temp_scaffolding_stubs.h +++ b/chrome/common/temp_scaffolding_stubs.h @@ -72,6 +72,7 @@ class Profile; class RenderProcessHost; class RenderWidgetHelper; class ResourceMessageFilter; +class SessionBackend; class SessionCommand; class SessionID; class SiteInstance; @@ -179,11 +180,6 @@ class UserDataManager { static UserDataManager* instance_; }; -class SessionBackend : public base::RefCountedThreadSafe<SessionBackend> { - public: - void MoveCurrentSessionToLastSession() { NOTIMPLEMENTED(); } -}; - class BaseSessionService : public CancelableRequestProvider, public base::RefCountedThreadSafe<BaseSessionService> { public: @@ -194,7 +190,7 @@ class BaseSessionService : public CancelableRequestProvider, BaseSessionService() { NOTIMPLEMENTED(); } BaseSessionService(SessionType type, Profile* profile, - const std::wstring& path) { + const FilePath& path) { NOTIMPLEMENTED(); } Profile* profile() const { NOTIMPLEMENTED(); return NULL; } |