diff options
author | feldstein@chromium.org <feldstein@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-01-28 00:04:56 +0000 |
---|---|---|
committer | feldstein@chromium.org <feldstein@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-01-28 00:04:56 +0000 |
commit | cb6cf79cacd881bcbc4f00bb449d7044619aeced (patch) | |
tree | 1b265453e2ad2a33beda3d6630444e76da3321a0 /chrome/browser/importer/importer.cc | |
parent | 69b3f1eab57725dd68502c19f4eed1fa9c7f401f (diff) | |
download | chromium_src-cb6cf79cacd881bcbc4f00bb449d7044619aeced.zip chromium_src-cb6cf79cacd881bcbc4f00bb449d7044619aeced.tar.gz chromium_src-cb6cf79cacd881bcbc4f00bb449d7044619aeced.tar.bz2 |
Add import/export extension apis
This is a duplicate of 543094. That code review seems to have gotten corrupted as i can no longer publish anything from their web UI. It was LGTM'd+nits by arv, which i've fixed here.
BUG=32194
TEST=Import and export bookmarks from the extension
Review URL: http://codereview.chromium.org/548167
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37351 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/importer/importer.cc')
-rw-r--r-- | chrome/browser/importer/importer.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/chrome/browser/importer/importer.cc b/chrome/browser/importer/importer.cc index eddc493..359790b 100644 --- a/chrome/browser/importer/importer.cc +++ b/chrome/browser/importer/importer.cc @@ -85,6 +85,11 @@ void ProfileWriter::AddBookmarkEntry( bool show_bookmark_toolbar = false; std::set<const BookmarkNode*> groups_added_to; + bool import_mode = false; + if (bookmark.size() > 1) { + model->BeginImportMode(); + import_mode = true; + } for (std::vector<BookmarkEntry>::const_iterator it = bookmark.begin(); it != bookmark.end(); ++it) { // Don't insert this url if it isn't valid. @@ -142,6 +147,10 @@ void ProfileWriter::AddBookmarkEntry( model->ResetDateGroupModified(*i); } + if (import_mode) { + model->EndImportMode(); + } + if (show_bookmark_toolbar) ShowBookmarkBar(); } |