OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_UTILITY_IMPORTER_EDGE_IMPORTER_WIN_H_ | 5 #ifndef CHROME_UTILITY_IMPORTER_EDGE_IMPORTER_WIN_H_ |
6 #define CHROME_UTILITY_IMPORTER_EDGE_IMPORTER_WIN_H_ | 6 #define CHROME_UTILITY_IMPORTER_EDGE_IMPORTER_WIN_H_ |
7 | 7 |
| 8 #include <stdint.h> |
| 9 |
8 #include <vector> | 10 #include <vector> |
9 | 11 |
10 #include "base/basictypes.h" | |
11 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
12 #include "base/files/file_path.h" | 13 #include "base/files/file_path.h" |
| 14 #include "base/macros.h" |
13 #include "chrome/utility/importer/importer.h" | 15 #include "chrome/utility/importer/importer.h" |
14 #include "components/favicon_base/favicon_usage_data.h" | 16 #include "components/favicon_base/favicon_usage_data.h" |
15 | 17 |
16 struct ImportedBookmarkEntry; | 18 struct ImportedBookmarkEntry; |
17 | 19 |
18 class EdgeImporter : public Importer { | 20 class EdgeImporter : public Importer { |
19 public: | 21 public: |
20 EdgeImporter(); | 22 EdgeImporter(); |
21 | 23 |
22 // Importer: | 24 // Importer: |
23 void StartImport(const importer::SourceProfile& source_profile, | 25 void StartImport(const importer::SourceProfile& source_profile, |
24 uint16 items, | 26 uint16_t items, |
25 ImporterBridge* bridge) override; | 27 ImporterBridge* bridge) override; |
26 | 28 |
27 private: | 29 private: |
28 ~EdgeImporter() override; | 30 ~EdgeImporter() override; |
29 | 31 |
30 void ImportFavorites(); | 32 void ImportFavorites(); |
31 // This function will read the favorites from the spartan database storing | 33 // This function will read the favorites from the spartan database storing |
32 // the bookmark items in |bookmarks| and favicon information in |favicons|. | 34 // the bookmark items in |bookmarks| and favicon information in |favicons|. |
33 void ParseFavoritesDatabase(std::vector<ImportedBookmarkEntry>* bookmarks, | 35 void ParseFavoritesDatabase(std::vector<ImportedBookmarkEntry>* bookmarks, |
34 favicon_base::FaviconUsageDataList* favicons); | 36 favicon_base::FaviconUsageDataList* favicons); |
35 | 37 |
36 // Edge does not have source path. It's used in unit tests only for providing | 38 // Edge does not have source path. It's used in unit tests only for providing |
37 // a fake source for the spartan database location. | 39 // a fake source for the spartan database location. |
38 base::FilePath source_path_; | 40 base::FilePath source_path_; |
39 | 41 |
40 DISALLOW_COPY_AND_ASSIGN(EdgeImporter); | 42 DISALLOW_COPY_AND_ASSIGN(EdgeImporter); |
41 }; | 43 }; |
42 | 44 |
43 #endif // CHROME_UTILITY_IMPORTER_EDGE_IMPORTER_WIN_H_ | 45 #endif // CHROME_UTILITY_IMPORTER_EDGE_IMPORTER_WIN_H_ |
OLD | NEW |