| 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/firefox3_importer.h" | 5 #include "chrome/browser/importer/firefox3_importer.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 | 8 |
| 9 #include "app/sql/connection.h" | 9 #include "app/sql/connection.h" |
| 10 #include "app/sql/statement.h" | 10 #include "app/sql/statement.h" |
| (...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 287 | 287 |
| 288 STLDeleteContainerPointers(list.begin(), list.end()); | 288 STLDeleteContainerPointers(list.begin(), list.end()); |
| 289 | 289 |
| 290 // Write into profile. | 290 // Write into profile. |
| 291 if (!bookmarks.empty() && !cancelled()) { | 291 if (!bookmarks.empty() && !cancelled()) { |
| 292 const string16& first_folder_name = | 292 const string16& first_folder_name = |
| 293 bridge_->GetLocalizedString(IDS_BOOKMARK_GROUP_FROM_FIREFOX); | 293 bridge_->GetLocalizedString(IDS_BOOKMARK_GROUP_FROM_FIREFOX); |
| 294 int options = 0; | 294 int options = 0; |
| 295 if (import_to_bookmark_bar()) | 295 if (import_to_bookmark_bar()) |
| 296 options = ProfileWriter::IMPORT_TO_BOOKMARK_BAR; | 296 options = ProfileWriter::IMPORT_TO_BOOKMARK_BAR; |
| 297 bridge_->AddBookmarkEntries(bookmarks, first_folder_name, options); | 297 bridge_->AddBookmarks(bookmarks, first_folder_name, options); |
| 298 } | 298 } |
| 299 if (!template_urls.empty() && !cancelled()) { | 299 if (!template_urls.empty() && !cancelled()) { |
| 300 bridge_->SetKeywords(template_urls, -1, false); | 300 bridge_->SetKeywords(template_urls, -1, false); |
| 301 } else { | 301 } else { |
| 302 STLDeleteContainerPointers(template_urls.begin(), template_urls.end()); | 302 STLDeleteContainerPointers(template_urls.begin(), template_urls.end()); |
| 303 } | 303 } |
| 304 if (!favicon_map.empty() && !cancelled()) { | 304 if (!favicon_map.empty() && !cancelled()) { |
| 305 std::vector<history::ImportedFaviconUsage> favicons; | 305 std::vector<history::ImportedFaviconUsage> favicons; |
| 306 LoadFavicons(&db, favicon_map, &favicons); | 306 LoadFavicons(&db, favicon_map, &favicons); |
| 307 bridge_->SetFavicons(favicons); | 307 bridge_->SetFavicons(favicons); |
| (...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 577 | 577 |
| 578 if (!ReencodeFavicon(&data[0], data.size(), &usage.png_data)) | 578 if (!ReencodeFavicon(&data[0], data.size(), &usage.png_data)) |
| 579 continue; // Unable to decode. | 579 continue; // Unable to decode. |
| 580 | 580 |
| 581 usage.urls = i->second; | 581 usage.urls = i->second; |
| 582 favicons->push_back(usage); | 582 favicons->push_back(usage); |
| 583 } | 583 } |
| 584 s.Reset(); | 584 s.Reset(); |
| 585 } | 585 } |
| 586 } | 586 } |
| OLD | NEW |