| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/utility/importer/firefox_importer.h" | 5 #include "chrome/utility/importer/firefox_importer.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <set> | 8 #include <set> |
| 9 | 9 |
| 10 #include "base/files/file_enumerator.h" | 10 #include "base/files/file_enumerator.h" |
| (...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 326 &search_engine_url)) | 326 &search_engine_url)) |
| 327 search_engine_info.url = base::UTF8ToUTF16(search_engine_url); | 327 search_engine_info.url = base::UTF8ToUTF16(search_engine_url); |
| 328 else | 328 else |
| 329 continue; | 329 continue; |
| 330 search_engine_info.keyword = base::UTF8ToUTF16(item->keyword); | 330 search_engine_info.keyword = base::UTF8ToUTF16(item->keyword); |
| 331 search_engine_info.display_name = item->title; | 331 search_engine_info.display_name = item->title; |
| 332 search_engines.push_back(search_engine_info); | 332 search_engines.push_back(search_engine_info); |
| 333 } | 333 } |
| 334 } | 334 } |
| 335 | 335 |
| 336 STLDeleteElements(&list); | 336 base::STLDeleteElements(&list); |
| 337 | 337 |
| 338 // Write into profile. | 338 // Write into profile. |
| 339 if (!bookmarks.empty() && !cancelled()) { | 339 if (!bookmarks.empty() && !cancelled()) { |
| 340 const base::string16& first_folder_name = | 340 const base::string16& first_folder_name = |
| 341 bridge_->GetLocalizedString(IDS_BOOKMARK_GROUP_FROM_FIREFOX); | 341 bridge_->GetLocalizedString(IDS_BOOKMARK_GROUP_FROM_FIREFOX); |
| 342 bridge_->AddBookmarks(bookmarks, first_folder_name); | 342 bridge_->AddBookmarks(bookmarks, first_folder_name); |
| 343 } | 343 } |
| 344 if (!search_engines.empty() && !cancelled()) { | 344 if (!search_engines.empty() && !cancelled()) { |
| 345 bridge_->SetKeywords(search_engines, false); | 345 bridge_->SetKeywords(search_engines, false); |
| 346 } | 346 } |
| (...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 785 | 785 |
| 786 if (!importer::ReencodeFavicon(&data[0], data.size(), &usage.png_data)) | 786 if (!importer::ReencodeFavicon(&data[0], data.size(), &usage.png_data)) |
| 787 continue; // Unable to decode. | 787 continue; // Unable to decode. |
| 788 | 788 |
| 789 usage.urls = i->second; | 789 usage.urls = i->second; |
| 790 favicons->push_back(usage); | 790 favicons->push_back(usage); |
| 791 } | 791 } |
| 792 s.Reset(true); | 792 s.Reset(true); |
| 793 } | 793 } |
| 794 } | 794 } |
| OLD | NEW |