diff options
author | mattm@chromium.org <mattm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-05 19:22:51 +0000 |
---|---|---|
committer | mattm@chromium.org <mattm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-05 19:22:51 +0000 |
commit | 5072aee46aa709d9a67a3c988c5934bec67d71e5 (patch) | |
tree | 214a9ba02d8b022b58ef50b112762a5c02cddf9b /chrome/browser/importer/importer_bridge.h | |
parent | 636b49b9cad66fe061fe4d6e1f69bdf4bee1a780 (diff) | |
download | chromium_src-5072aee46aa709d9a67a3c988c5934bec67d71e5.zip chromium_src-5072aee46aa709d9a67a3c988c5934bec67d71e5.tar.gz chromium_src-5072aee46aa709d9a67a3c988c5934bec67d71e5.tar.bz2 |
Revert "Refactor ImporterHost as preparation for OOP switch", which caused purify XP leak:
std::_W::_Allocate(unsigned int,wchar_t *) [unit_tests.exe]
Alloc Location
...
chrome/browser/importer/ie_importer.cc IEImporter::StartImport(ProfileInfo,WORD,ImporterBridge *)
base/tuple.h ?DispatchToMethod@VImporter@@P81@AEXUProfileInfo@@GPAVImporterBridge@@@ZU2@GV?$scoped_refptr@VImporterBridge@@@@@@YAXPAVImporter@@P80@AEXUProfileInfo@@GPAVImporterBridge@@@ZABU?$Tuple3@UProfileInfo@@GV?$scoped_refptr@VImporterBridge@@@@@@@Z
^^^
This reverts commit r28007 and r27996.
TBR=jeremy
Review URL: http://codereview.chromium.org/260011
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28019 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/importer/importer_bridge.h')
-rw-r--r-- | chrome/browser/importer/importer_bridge.h | 112 |
1 files changed, 0 insertions, 112 deletions
diff --git a/chrome/browser/importer/importer_bridge.h b/chrome/browser/importer/importer_bridge.h deleted file mode 100644 index 60d26875..0000000 --- a/chrome/browser/importer/importer_bridge.h +++ /dev/null @@ -1,112 +0,0 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef CHROME_BROWSER_IMPORTER_IMPORTER_BRIDGE_H_ -#define CHROME_BROWSER_IMPORTER_IMPORTER_BRIDGE_H_ - -#include "build/build_config.h" - -#include <vector> - -#include "base/basictypes.h" -#include "base/string16.h" - -#include "chrome/browser/importer/importer.h" -// TODO: remove this, see friend declaration in ImporterBridge. -#include "chrome/browser/importer/toolbar_importer.h" - -class ImporterBridge : public base::RefCounted<ImporterBridge> { - public: - ImporterBridge(ProfileWriter* writer, - MessageLoop* delegate_loop, - ImporterHost* host) - : writer_(writer), - delegate_loop_(delegate_loop), - host_(host) { - } - virtual ~ImporterBridge() {} - - virtual void AddBookmarkEntries( - const std::vector<ProfileWriter::BookmarkEntry>& bookmarks, - const std::wstring& first_folder_name, - int options) = 0; - virtual void AddHomePage(const GURL &home_page) = 0; - -#if defined(OS_WIN) - virtual void AddIE7PasswordInfo(const IE7PasswordInfo password_info) = 0; -#endif - - virtual void SetFavIcons( - const std::vector<history::ImportedFavIconUsage>& fav_icons) = 0; - virtual void SetHistoryItems(const std::vector<history::URLRow> &rows) = 0; - virtual void SetKeywords(const std::vector<TemplateURL*> &template_urls, - int default_keyword_index, - bool unique_on_host_and_path) = 0; - virtual void SetPasswordForm(const webkit_glue::PasswordForm& form) = 0; - - // Notifies the coordinator that the collection of data for the specified - // item has begun. - virtual void NotifyItemStarted(ImportItem item) = 0; - - // Notifies the coordinator that the collection of data for the specified - // item has completed. - virtual void NotifyItemEnded(ImportItem item) = 0; - - // Notifies the coordinator that the import operation has begun. - virtual void NotifyStarted() = 0; - - // Notifies the coordinator that the entire import operation has completed. - virtual void NotifyEnded() = 0; - - protected: - - // TODO: In order to run Toolbar5Importer OOP we need to cut this - // connection, but as an interim step we allow Toolbar5Import to break - // the abstraction here and assume import is in-process. - friend class Toolbar5Importer; - - ProfileWriter* writer_; - MessageLoop* delegate_loop_; - ImporterHost* host_; - - DISALLOW_COPY_AND_ASSIGN(ImporterBridge); -}; - -class InProcessImporterBridge : public ImporterBridge { - public: - InProcessImporterBridge(ProfileWriter* writer, - MessageLoop* delegate_loop, - ImporterHost* host); - - // Methods inherited from ImporterBridge. - virtual void AddBookmarkEntries( - const std::vector<ProfileWriter::BookmarkEntry>& bookmarks, - const std::wstring& first_folder_name, - int options); - virtual void AddHomePage(const GURL &home_page); - -#if defined(OS_WIN) - virtual void AddIE7PasswordInfo(const IE7PasswordInfo password_info); -#endif - - virtual void SetFavIcons( - const std::vector<history::ImportedFavIconUsage>& fav_icons); - virtual void SetHistoryItems(const std::vector<history::URLRow> &rows); - virtual void SetKeywords(const std::vector<TemplateURL*>& template_urls, - int default_keyword_index, - bool unique_on_host_and_path); - virtual void SetPasswordForm(const webkit_glue::PasswordForm& form); - - virtual void NotifyItemStarted(ImportItem item); - virtual void NotifyItemEnded(ImportItem item); - virtual void NotifyStarted(); - virtual void NotifyEnded(); - - private: - MessageLoop* main_loop_; - MessageLoop* delegate_loop_; - DISALLOW_COPY_AND_ASSIGN(InProcessImporterBridge); -}; - -#endif // CHROME_BROWSER_IMPORTER_IMPORTER_BRIDGE_H_ |