OLD | NEW |
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 Loading... |
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 } |
OLD | NEW |