No dual_mode on Win10+ shortcuts.
[chromium-blink-merge.git] / chrome / browser / importer / in_process_importer_bridge.h
blobce09946117cff9d99d15bee1b35050c03504dccb
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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_IMPORTER_IN_PROCESS_IMPORTER_BRIDGE_H_
6 #define CHROME_BROWSER_IMPORTER_IN_PROCESS_IMPORTER_BRIDGE_H_
8 #include <string>
9 #include <vector>
11 #include "base/basictypes.h"
12 #include "base/compiler_specific.h"
13 #include "base/memory/weak_ptr.h"
14 #include "build/build_config.h"
15 #include "chrome/browser/importer/profile_writer.h"
16 #include "chrome/common/importer/importer_bridge.h"
18 class GURL;
19 struct ImportedBookmarkEntry;
20 struct FaviconUsageData;
21 class ExternalProcessImporterHost;
23 namespace importer {
24 #if defined(OS_WIN)
25 struct ImporterIE7PasswordInfo;
26 #endif
27 struct ImporterURlRow;
28 struct SearchEngineInfo;
31 class InProcessImporterBridge : public ImporterBridge {
32 public:
33 InProcessImporterBridge(ProfileWriter* writer,
34 base::WeakPtr<ExternalProcessImporterHost> host);
36 // Begin ImporterBridge implementation:
37 void AddBookmarks(const std::vector<ImportedBookmarkEntry>& bookmarks,
38 const base::string16& first_folder_name) override;
40 void AddHomePage(const GURL& home_page) override;
42 #if defined(OS_WIN)
43 void AddIE7PasswordInfo(
44 const importer::ImporterIE7PasswordInfo& password_info) override;
45 #endif
47 void SetFavicons(const favicon_base::FaviconUsageDataList& favicons) override;
49 void SetHistoryItems(const std::vector<ImporterURLRow>& rows,
50 importer::VisitSource visit_source) override;
52 void SetKeywords(
53 const std::vector<importer::SearchEngineInfo>& search_engines,
54 bool unique_on_host_and_path) override;
56 void SetFirefoxSearchEnginesXMLData(
57 const std::vector<std::string>& search_engine_data) override;
59 void SetPasswordForm(const autofill::PasswordForm& form) override;
61 void SetAutofillFormData(
62 const std::vector<ImporterAutofillFormDataEntry>& entries) override;
64 void NotifyStarted() override;
65 void NotifyItemStarted(importer::ImportItem item) override;
66 void NotifyItemEnded(importer::ImportItem item) override;
67 void NotifyEnded() override;
69 base::string16 GetLocalizedString(int message_id) override;
70 // End ImporterBridge implementation.
72 private:
73 ~InProcessImporterBridge() override;
75 ProfileWriter* const writer_; // weak
76 const base::WeakPtr<ExternalProcessImporterHost> host_;
78 DISALLOW_COPY_AND_ASSIGN(InProcessImporterBridge);
81 #endif // CHROME_BROWSER_IMPORTER_IN_PROCESS_IMPORTER_BRIDGE_H_