| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 #ifndef CHROME_BROWSER_IMPORTER_SAFARI_IMPORTER_H_ | 5 #ifndef CHROME_BROWSER_IMPORTER_SAFARI_IMPORTER_H_ |
| 6 #define CHROME_BROWSER_IMPORTER_SAFARI_IMPORTER_H_ | 6 #define CHROME_BROWSER_IMPORTER_SAFARI_IMPORTER_H_ |
| 7 | 7 |
| 8 #include "chrome/browser/importer/importer.h" | 8 #include "chrome/browser/importer/importer.h" |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 FRIEND_TEST(SafariImporterTest, HistoryImport); | 47 FRIEND_TEST(SafariImporterTest, HistoryImport); |
| 48 | 48 |
| 49 // Multiple URLs can share the same FavIcon, this is a map | 49 // Multiple URLs can share the same FavIcon, this is a map |
| 50 // of URLs -> IconIDs that we load as a temporary step before | 50 // of URLs -> IconIDs that we load as a temporary step before |
| 51 // actually loading the icons. | 51 // actually loading the icons. |
| 52 typedef std::map<int64, std::set<GURL> > FaviconMap; | 52 typedef std::map<int64, std::set<GURL> > FaviconMap; |
| 53 | 53 |
| 54 void ImportBookmarks(); | 54 void ImportBookmarks(); |
| 55 void ImportPasswords(); | 55 void ImportPasswords(); |
| 56 void ImportHistory(); | 56 void ImportHistory(); |
| 57 void ImportHomepage(); | |
| 58 | 57 |
| 59 // Parse Safari's stored bookmarks. | 58 // Parse Safari's stored bookmarks. |
| 60 void ParseBookmarks(std::vector<ProfileWriter::BookmarkEntry>* bookmarks); | 59 void ParseBookmarks(std::vector<ProfileWriter::BookmarkEntry>* bookmarks); |
| 61 | 60 |
| 62 // Function to recursively read Bookmarks out of Safari plist. | 61 // Function to recursively read Bookmarks out of Safari plist. |
| 63 // |bookmark_folder| The dictionary containing a folder to parse. | 62 // |bookmark_folder| The dictionary containing a folder to parse. |
| 64 // |parent_path_elements| Path elements up to this point. | 63 // |parent_path_elements| Path elements up to this point. |
| 65 // |is_in_toolbar| Is this folder in the toolbar. | 64 // |is_in_toolbar| Is this folder in the toolbar. |
| 66 // |out_bookmarks| BookMark element array to write into. | 65 // |out_bookmarks| BookMark element array to write into. |
| 67 void RecursiveReadBookmarksFolder( | 66 void RecursiveReadBookmarksFolder( |
| (...skipping 20 matching lines...) Expand all Loading... |
| 88 void LoadFaviconData(sqlite3* db, | 87 void LoadFaviconData(sqlite3* db, |
| 89 const FaviconMap& favicon_map, | 88 const FaviconMap& favicon_map, |
| 90 std::vector<history::ImportedFavIconUsage>* favicons); | 89 std::vector<history::ImportedFavIconUsage>* favicons); |
| 91 | 90 |
| 92 FilePath library_dir_; | 91 FilePath library_dir_; |
| 93 | 92 |
| 94 DISALLOW_COPY_AND_ASSIGN(SafariImporter); | 93 DISALLOW_COPY_AND_ASSIGN(SafariImporter); |
| 95 }; | 94 }; |
| 96 | 95 |
| 97 #endif // CHROME_BROWSER_IMPORTER_SAFARI_IMPORTER_H_ | 96 #endif // CHROME_BROWSER_IMPORTER_SAFARI_IMPORTER_H_ |
| OLD | NEW |