| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/external_process_importer_client.h" | 5 #include "chrome/browser/importer/external_process_importer_client.h" |
| 6 | 6 |
| 7 #include "chrome/browser/browser_process.h" | 7 #include "chrome/browser/browser_process.h" |
| 8 #include "chrome/browser/importer/external_process_importer_host.h" | 8 #include "chrome/browser/importer/external_process_importer_host.h" |
| 9 #include "chrome/browser/importer/importer_host.h" | 9 #include "chrome/browser/importer/importer_host.h" |
| 10 #include "chrome/browser/importer/in_process_importer_bridge.h" | 10 #include "chrome/browser/importer/in_process_importer_bridge.h" |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 void ExternalProcessImporterClient::OnBookmarksImportGroup( | 182 void ExternalProcessImporterClient::OnBookmarksImportGroup( |
| 183 const std::vector<ProfileWriter::BookmarkEntry>& bookmarks_group) { | 183 const std::vector<ProfileWriter::BookmarkEntry>& bookmarks_group) { |
| 184 if (cancelled_) | 184 if (cancelled_) |
| 185 return; | 185 return; |
| 186 | 186 |
| 187 // Collect sets of bookmarks from importer process until we have reached | 187 // Collect sets of bookmarks from importer process until we have reached |
| 188 // total_bookmarks_count_: | 188 // total_bookmarks_count_: |
| 189 bookmarks_.insert(bookmarks_.end(), bookmarks_group.begin(), | 189 bookmarks_.insert(bookmarks_.end(), bookmarks_group.begin(), |
| 190 bookmarks_group.end()); | 190 bookmarks_group.end()); |
| 191 if (bookmarks_.size() == total_bookmarks_count_) { | 191 if (bookmarks_.size() == total_bookmarks_count_) { |
| 192 bridge_->AddBookmarkEntries(bookmarks_, bookmarks_first_folder_name_, | 192 bridge_->AddBookmarks(bookmarks_, bookmarks_first_folder_name_, |
| 193 bookmarks_options_); | 193 bookmarks_options_); |
| 194 } | 194 } |
| 195 } | 195 } |
| 196 | 196 |
| 197 void ExternalProcessImporterClient::OnFaviconsImportStart( | 197 void ExternalProcessImporterClient::OnFaviconsImportStart( |
| 198 size_t total_favicons_count) { | 198 size_t total_favicons_count) { |
| 199 if (cancelled_) | 199 if (cancelled_) |
| 200 return; | 200 return; |
| 201 | 201 |
| 202 total_favicons_count_ = total_favicons_count; | 202 total_favicons_count_ = total_favicons_count; |
| 203 favicons_.reserve(total_favicons_count); | 203 favicons_.reserve(total_favicons_count); |
| (...skipping 28 matching lines...) Expand all Loading... |
| 232 template_url_vec.reserve(template_urls.size()); | 232 template_url_vec.reserve(template_urls.size()); |
| 233 std::vector<TemplateURL>::const_iterator iter; | 233 std::vector<TemplateURL>::const_iterator iter; |
| 234 for (iter = template_urls.begin(); | 234 for (iter = template_urls.begin(); |
| 235 iter != template_urls.end(); | 235 iter != template_urls.end(); |
| 236 ++iter) { | 236 ++iter) { |
| 237 template_url_vec.push_back(new TemplateURL(*iter)); | 237 template_url_vec.push_back(new TemplateURL(*iter)); |
| 238 } | 238 } |
| 239 bridge_->SetKeywords(template_url_vec, default_keyword_index, | 239 bridge_->SetKeywords(template_url_vec, default_keyword_index, |
| 240 unique_on_host_and_path); | 240 unique_on_host_and_path); |
| 241 } | 241 } |
| OLD | NEW |