diff options
author | sky@google.com <sky@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-07 04:31:35 +0000 |
---|---|---|
committer | sky@google.com <sky@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-07 04:31:35 +0000 |
commit | b504899244b4264994d4daae2bee660706dba652 (patch) | |
tree | eda190cb35dfff7f700a4c636730ff2487cb35d8 /chrome/browser/bookmarks/bookmark_html_writer.h | |
parent | e562de106eeab2667eeb6922ddf2d771a0efa55d (diff) | |
download | chromium_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/bookmarks/bookmark_html_writer.h')
-rw-r--r-- | chrome/browser/bookmarks/bookmark_html_writer.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/chrome/browser/bookmarks/bookmark_html_writer.h b/chrome/browser/bookmarks/bookmark_html_writer.h new file mode 100644 index 0000000..f6b1830 --- /dev/null +++ b/chrome/browser/bookmarks/bookmark_html_writer.h @@ -0,0 +1,27 @@ +// Copyright (c) 2006-2008 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_BOOKMARKS_BOOKMARK_HTML_WRITER_H_ +#define CHROME_BROWSER_BOOKMARKS_BOOKMARK_HTML_WRITER_H_ + +#include <string> + +class BookmarkModel; +class MessageLoop; + +namespace bookmark_html_writer { + +// Writes the bookmarks out in the 'bookmarks.html' format understood by +// Firefox and IE. The results are written to the file at |path|. +// If |thread| is non-null, writing is done on that thread, otherwise +// writing is synchronous. +// +// TODO(sky): need a callback on failure. +void WriteBookmarks(MessageLoop* thread, + BookmarkModel* model, + const std::wstring& path); + +} + +#endif // CHROME_BROWSER_BOOKMARKS_BOOKMARK_HTML_WRITER_H_ |