OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_IN_PROCESS_IMPORTER_BRIDGE_H_ | 5 #ifndef CHROME_BROWSER_IMPORTER_IN_PROCESS_IMPORTER_BRIDGE_H_ |
6 #define CHROME_BROWSER_IMPORTER_IN_PROCESS_IMPORTER_BRIDGE_H_ | 6 #define CHROME_BROWSER_IMPORTER_IN_PROCESS_IMPORTER_BRIDGE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
13 #include "base/memory/weak_ptr.h" | 13 #include "base/memory/weak_ptr.h" |
14 #include "build/build_config.h" | 14 #include "build/build_config.h" |
15 #include "chrome/browser/importer/importer_bridge.h" | 15 #include "chrome/browser/importer/importer_bridge.h" |
16 #include "chrome/browser/importer/profile_writer.h" | 16 #include "chrome/browser/importer/profile_writer.h" |
17 | 17 |
18 class GURL; | 18 class GURL; |
19 struct ImportedBookmarkEntry; | 19 struct ImportedBookmarkEntry; |
20 struct ImportedFaviconUsage; | 20 struct ImportedFaviconUsage; |
21 class ImporterHost; | 21 class ImporterHost; |
22 | 22 |
| 23 namespace importer { |
| 24 struct URLKeywordInfo; |
| 25 } |
| 26 |
23 class InProcessImporterBridge : public ImporterBridge { | 27 class InProcessImporterBridge : public ImporterBridge { |
24 public: | 28 public: |
25 InProcessImporterBridge(ProfileWriter* writer, | 29 InProcessImporterBridge(ProfileWriter* writer, |
26 base::WeakPtr<ImporterHost> host); | 30 base::WeakPtr<ImporterHost> host); |
27 | 31 |
28 // Begin ImporterBridge implementation: | 32 // Begin ImporterBridge implementation: |
29 virtual void AddBookmarks( | 33 virtual void AddBookmarks( |
30 const std::vector<ImportedBookmarkEntry>& bookmarks, | 34 const std::vector<ImportedBookmarkEntry>& bookmarks, |
31 const string16& first_folder_name) OVERRIDE; | 35 const string16& first_folder_name) OVERRIDE; |
32 | 36 |
33 virtual void AddHomePage(const GURL& home_page) OVERRIDE; | 37 virtual void AddHomePage(const GURL& home_page) OVERRIDE; |
34 | 38 |
35 #if defined(OS_WIN) | 39 #if defined(OS_WIN) |
36 virtual void AddIE7PasswordInfo( | 40 virtual void AddIE7PasswordInfo( |
37 const IE7PasswordInfo& password_info) OVERRIDE; | 41 const IE7PasswordInfo& password_info) OVERRIDE; |
38 #endif | 42 #endif |
39 | 43 |
40 virtual void SetFavicons( | 44 virtual void SetFavicons( |
41 const std::vector<ImportedFaviconUsage>& favicons) OVERRIDE; | 45 const std::vector<ImportedFaviconUsage>& favicons) OVERRIDE; |
42 | 46 |
43 virtual void SetHistoryItems(const history::URLRows& rows, | 47 virtual void SetHistoryItems(const history::URLRows& rows, |
44 history::VisitSource visit_source) OVERRIDE; | 48 history::VisitSource visit_source) OVERRIDE; |
45 | 49 |
46 virtual void SetKeywords(const std::vector<TemplateURL*>& template_urls, | 50 virtual void SetKeywords( |
47 bool unique_on_host_and_path) OVERRIDE; | 51 const std::vector<importer::URLKeywordInfo>& url_keywords, |
| 52 bool unique_on_host_and_path) OVERRIDE; |
| 53 |
| 54 virtual void SetFirefoxSearchEnginesXMLData( |
| 55 const std::vector<std::string>& search_engine_data) OVERRIDE; |
48 | 56 |
49 virtual void SetPasswordForm( | 57 virtual void SetPasswordForm( |
50 const content::PasswordForm& form) OVERRIDE; | 58 const content::PasswordForm& form) OVERRIDE; |
51 | 59 |
52 virtual void NotifyStarted() OVERRIDE; | 60 virtual void NotifyStarted() OVERRIDE; |
53 virtual void NotifyItemStarted(importer::ImportItem item) OVERRIDE; | 61 virtual void NotifyItemStarted(importer::ImportItem item) OVERRIDE; |
54 virtual void NotifyItemEnded(importer::ImportItem item) OVERRIDE; | 62 virtual void NotifyItemEnded(importer::ImportItem item) OVERRIDE; |
55 virtual void NotifyEnded() OVERRIDE; | 63 virtual void NotifyEnded() OVERRIDE; |
56 | 64 |
57 virtual string16 GetLocalizedString(int message_id) OVERRIDE; | 65 virtual string16 GetLocalizedString(int message_id) OVERRIDE; |
58 // End ImporterBridge implementation. | 66 // End ImporterBridge implementation. |
59 | 67 |
60 private: | 68 private: |
61 virtual ~InProcessImporterBridge(); | 69 virtual ~InProcessImporterBridge(); |
62 | 70 |
63 ProfileWriter* const writer_; // weak | 71 ProfileWriter* const writer_; // weak |
64 const base::WeakPtr<ImporterHost> host_; | 72 const base::WeakPtr<ImporterHost> host_; |
65 | 73 |
66 DISALLOW_COPY_AND_ASSIGN(InProcessImporterBridge); | 74 DISALLOW_COPY_AND_ASSIGN(InProcessImporterBridge); |
67 }; | 75 }; |
68 | 76 |
69 #endif // CHROME_BROWSER_IMPORTER_IN_PROCESS_IMPORTER_BRIDGE_H_ | 77 #endif // CHROME_BROWSER_IMPORTER_IN_PROCESS_IMPORTER_BRIDGE_H_ |
OLD | NEW |