| 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 #ifndef CHROME_BROWSER_IMPORTER_FIREFOX3_IMPORTER_H_ | 5 #ifndef CHROME_BROWSER_IMPORTER_FIREFOX3_IMPORTER_H_ |
| 6 #define CHROME_BROWSER_IMPORTER_FIREFOX3_IMPORTER_H_ | 6 #define CHROME_BROWSER_IMPORTER_FIREFOX3_IMPORTER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| 11 #include <vector> | 11 #include <vector> |
| 12 | 12 |
| 13 #include "base/basictypes.h" | 13 #include "base/basictypes.h" |
| 14 #include "base/compiler_specific.h" | 14 #include "base/compiler_specific.h" |
| 15 #include "base/files/file_path.h" | 15 #include "base/files/file_path.h" |
| 16 #include "chrome/browser/importer/importer.h" | 16 #include "chrome/browser/importer/importer.h" |
| 17 | 17 |
| 18 class GURL; | 18 class GURL; |
| 19 | |
| 20 namespace history { | |
| 21 struct ImportedFaviconUsage; | 19 struct ImportedFaviconUsage; |
| 22 } | |
| 23 | 20 |
| 24 namespace sql { | 21 namespace sql { |
| 25 class Connection; | 22 class Connection; |
| 26 } | 23 } |
| 27 | 24 |
| 28 // Importer for Mozilla Firefox 3 and later. | 25 // Importer for Mozilla Firefox 3 and later. |
| 29 // Firefox 3 stores its persistent information in a new system called places. | 26 // Firefox 3 stores its persistent information in a new system called places. |
| 30 // http://wiki.mozilla.org/Places | 27 // http://wiki.mozilla.org/Places |
| 31 class Firefox3Importer : public Importer { | 28 class Firefox3Importer : public Importer { |
| 32 public: | 29 public: |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 BookmarkList* list); | 66 BookmarkList* list); |
| 70 | 67 |
| 71 // Loads all children of the given folder, and appends them to the |list|. | 68 // Loads all children of the given folder, and appends them to the |list|. |
| 72 void GetWholeBookmarkFolder(sql::Connection* db, BookmarkList* list, | 69 void GetWholeBookmarkFolder(sql::Connection* db, BookmarkList* list, |
| 73 size_t position, bool* empty_folder); | 70 size_t position, bool* empty_folder); |
| 74 | 71 |
| 75 // Loads the favicons given in the map from the database, loads the data, | 72 // Loads the favicons given in the map from the database, loads the data, |
| 76 // and converts it into FaviconUsage structures. | 73 // and converts it into FaviconUsage structures. |
| 77 void LoadFavicons(sql::Connection* db, | 74 void LoadFavicons(sql::Connection* db, |
| 78 const FaviconMap& favicon_map, | 75 const FaviconMap& favicon_map, |
| 79 std::vector<history::ImportedFaviconUsage>* favicons); | 76 std::vector<ImportedFaviconUsage>* favicons); |
| 80 | 77 |
| 81 base::FilePath source_path_; | 78 base::FilePath source_path_; |
| 82 base::FilePath app_path_; | 79 base::FilePath app_path_; |
| 83 | 80 |
| 84 #if defined(OS_POSIX) && !defined(OS_MACOSX) | 81 #if defined(OS_POSIX) && !defined(OS_MACOSX) |
| 85 // Stored because we can only access it from the UI thread. Not usable | 82 // Stored because we can only access it from the UI thread. Not usable |
| 86 // in Mac because no access from out-of-process import. | 83 // in Mac because no access from out-of-process import. |
| 87 std::string locale_; | 84 std::string locale_; |
| 88 #endif | 85 #endif |
| 89 | 86 |
| 90 DISALLOW_COPY_AND_ASSIGN(Firefox3Importer); | 87 DISALLOW_COPY_AND_ASSIGN(Firefox3Importer); |
| 91 }; | 88 }; |
| 92 | 89 |
| 93 #endif // CHROME_BROWSER_IMPORTER_FIREFOX3_IMPORTER_H_ | 90 #endif // CHROME_BROWSER_IMPORTER_FIREFOX3_IMPORTER_H_ |
| OLD | NEW |