summaryrefslogtreecommitdiffstats
path: root/chrome/browser/importer/firefox2_importer.h
diff options
context:
space:
mode:
authorsky@google.com <sky@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-07 04:31:35 +0000
committersky@google.com <sky@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-07 04:31:35 +0000
commitb504899244b4264994d4daae2bee660706dba652 (patch)
treeeda190cb35dfff7f700a4c636730ff2487cb35d8 /chrome/browser/importer/firefox2_importer.h
parente562de106eeab2667eeb6922ddf2d771a0efa55d (diff)
downloadchromium_src-b504899244b4264994d4daae2bee660706dba652.zip
chromium_src-b504899244b4264994d4daae2bee660706dba652.tar.gz
chromium_src-b504899244b4264994d4daae2bee660706dba652.tar.bz2
Adds import/export of bookmarks to bookmarks.html file.
BUG=1649 TEST=bring up bookmark manager and try out import/export from the tools menu. Note that import ALWAYS creates a new folder under the 'Other bookmarks folder' with the name of Imported (x). This is by design. Review URL: http://codereview.chromium.org/9471 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4968 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/importer/firefox2_importer.h')
-rw-r--r--chrome/browser/importer/firefox2_importer.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/chrome/browser/importer/firefox2_importer.h b/chrome/browser/importer/firefox2_importer.h
index f14438d..eb02cb7 100644
--- a/chrome/browser/importer/firefox2_importer.h
+++ b/chrome/browser/importer/firefox2_importer.h
@@ -33,6 +33,19 @@ class Firefox2Importer : public Importer {
const std::wstring& keyword,
const GURL& url);
+ // Imports the bookmarks from the specified file. |template_urls| and
+ // |favicons| may be null, in which case TemplateURLs and favicons are
+ // not parsed. Any bookmarks in |default_urls| are ignored.
+ static void ImportBookmarksFile(
+ const std::wstring& file_path,
+ const std::set<GURL>& default_urls,
+ bool first_run,
+ const std::wstring& first_folder_name,
+ Importer* importer,
+ std::vector<ProfileWriter::BookmarkEntry>* bookmarks,
+ std::vector<TemplateURL*>* template_urls,
+ std::vector<history::ImportedFavIconUsage>* favicons);
+
private:
FRIEND_TEST(FirefoxImporterTest, Firefox2BookmarkParse);
FRIEND_TEST(FirefoxImporterTest, Firefox2CookesParse);
@@ -105,9 +118,10 @@ class Firefox2Importer : public Importer {
ProfileWriter* writer_;
std::wstring source_path_;
std::wstring app_path_;
+ // If true, we only parse the bookmarks.html file specified as source_path_.
+ bool parsing_bookmarks_html_file_;
DISALLOW_EVIL_CONSTRUCTORS(Firefox2Importer);
};
#endif // CHROME_BROWSER_IMPORTER_FIREFOX2_IMPORTER_H_
-