Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(913)

Side by Side Diff: chrome/browser/importer/toolbar_importer.cc

Issue 9471: Adds import/export of bookmarks to bookmarks.html file.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/importer/importer_unittest.cc ('k') | chrome/browser/shell_dialogs.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/importer/toolbar_importer.h" 5 #include "chrome/browser/importer/toolbar_importer.h"
6 6
7 #include <limits> 7 #include <limits>
8 #include "base/string_util.h" 8 #include "base/string_util.h"
9 #include "base/rand_util.h" 9 #include "base/rand_util.h"
10 #include "base/registry.h" 10 #include "base/registry.h"
(...skipping 550 matching lines...) Expand 10 before | Expand all | Expand 10 after
561 folder_names.begin(), folder_names.end()); 561 folder_names.begin(), folder_names.end());
562 } 562 }
563 563
564 return true; 564 return true;
565 } 565 }
566 566
567 // Bookmark creation 567 // Bookmark creation
568 void Toolbar5Importer::AddBookMarksToChrome( 568 void Toolbar5Importer::AddBookMarksToChrome(
569 const std::vector<ProfileWriter::BookmarkEntry>& bookmarks) { 569 const std::vector<ProfileWriter::BookmarkEntry>& bookmarks) {
570 if (!bookmarks.empty() && !cancelled()) { 570 if (!bookmarks.empty() && !cancelled()) {
571 main_loop_->PostTask(FROM_HERE, NewRunnableMethod(writer_, 571 int options = ProfileWriter::ADD_IF_UNIQUE |
572 &ProfileWriter::AddBookmarkEntry, bookmarks, true)); 572 (first_run() ? ProfileWriter::FIRST_RUN : 0);
573 main_loop_->PostTask(FROM_HERE, NewRunnableMethod(writer_,
574 &ProfileWriter::AddBookmarkEntry, bookmarks,
575 l10n_util::GetString(IDS_BOOKMARK_GROUP_FROM_GOOGLE_TOOLBAR),
576 options));
573 } 577 }
574 } 578 }
OLDNEW
« no previous file with comments | « chrome/browser/importer/importer_unittest.cc ('k') | chrome/browser/shell_dialogs.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698