Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(181)

Side by Side Diff: chrome/browser/importer/in_process_importer_bridge.h

Issue 616763002: Importing certain bookmarks from firefox and HTML file as search engines. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed dependency issue. Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/profile_writer.h" 15 #include "chrome/browser/importer/profile_writer.h"
16 #include "chrome/common/importer/importer_bridge.h" 16 #include "chrome/common/importer/importer_bridge.h"
17 17
18 class GURL; 18 class GURL;
19 struct ImportedBookmarkEntry; 19 struct ImportedBookmarkEntry;
20 struct ImportedFaviconUsage; 20 struct ImportedFaviconUsage;
21 class ExternalProcessImporterHost; 21 class ExternalProcessImporterHost;
22 22
23 namespace importer { 23 namespace importer {
24 #if defined(OS_WIN) 24 #if defined(OS_WIN)
25 struct ImporterIE7PasswordInfo; 25 struct ImporterIE7PasswordInfo;
26 #endif 26 #endif
27 struct ImporterURlRow; 27 struct ImporterURlRow;
28 struct URLKeywordInfo; 28 struct SearchEngineInfo;
29 } 29 }
30 30
31 class InProcessImporterBridge : public ImporterBridge { 31 class InProcessImporterBridge : public ImporterBridge {
32 public: 32 public:
33 InProcessImporterBridge(ProfileWriter* writer, 33 InProcessImporterBridge(ProfileWriter* writer,
34 base::WeakPtr<ExternalProcessImporterHost> host); 34 base::WeakPtr<ExternalProcessImporterHost> host);
35 35
36 // Begin ImporterBridge implementation: 36 // Begin ImporterBridge implementation:
37 void AddBookmarks(const std::vector<ImportedBookmarkEntry>& bookmarks, 37 void AddBookmarks(const std::vector<ImportedBookmarkEntry>& bookmarks,
38 const base::string16& first_folder_name) override; 38 const base::string16& first_folder_name) override;
39 39
40 void AddHomePage(const GURL& home_page) override; 40 void AddHomePage(const GURL& home_page) override;
41 41
42 #if defined(OS_WIN) 42 #if defined(OS_WIN)
43 virtual void AddIE7PasswordInfo( 43 virtual void AddIE7PasswordInfo(
44 const importer::ImporterIE7PasswordInfo& password_info) override; 44 const importer::ImporterIE7PasswordInfo& password_info) override;
45 #endif 45 #endif
46 46
47 void SetFavicons(const std::vector<ImportedFaviconUsage>& favicons) override; 47 void SetFavicons(const std::vector<ImportedFaviconUsage>& favicons) override;
48 48
49 void SetHistoryItems(const std::vector<ImporterURLRow>& rows, 49 void SetHistoryItems(const std::vector<ImporterURLRow>& rows,
50 importer::VisitSource visit_source) override; 50 importer::VisitSource visit_source) override;
51 51
52 void SetKeywords(const std::vector<importer::URLKeywordInfo>& url_keywords, 52 void SetKeywords(
53 bool unique_on_host_and_path) override; 53 const std::vector<importer::SearchEngineInfo>& search_engines,
54 bool unique_on_host_and_path) override;
54 55
55 void SetFirefoxSearchEnginesXMLData( 56 void SetFirefoxSearchEnginesXMLData(
56 const std::vector<std::string>& search_engine_data) override; 57 const std::vector<std::string>& search_engine_data) override;
57 58
58 void SetPasswordForm(const autofill::PasswordForm& form) override; 59 void SetPasswordForm(const autofill::PasswordForm& form) override;
59 60
60 void SetAutofillFormData( 61 void SetAutofillFormData(
61 const std::vector<ImporterAutofillFormDataEntry>& entries) override; 62 const std::vector<ImporterAutofillFormDataEntry>& entries) override;
62 63
63 void NotifyStarted() override; 64 void NotifyStarted() override;
64 void NotifyItemStarted(importer::ImportItem item) override; 65 void NotifyItemStarted(importer::ImportItem item) override;
65 void NotifyItemEnded(importer::ImportItem item) override; 66 void NotifyItemEnded(importer::ImportItem item) override;
66 void NotifyEnded() override; 67 void NotifyEnded() override;
67 68
68 base::string16 GetLocalizedString(int message_id) override; 69 base::string16 GetLocalizedString(int message_id) override;
69 // End ImporterBridge implementation. 70 // End ImporterBridge implementation.
70 71
71 private: 72 private:
72 ~InProcessImporterBridge() override; 73 ~InProcessImporterBridge() override;
73 74
74 ProfileWriter* const writer_; // weak 75 ProfileWriter* const writer_; // weak
75 const base::WeakPtr<ExternalProcessImporterHost> host_; 76 const base::WeakPtr<ExternalProcessImporterHost> host_;
76 77
77 DISALLOW_COPY_AND_ASSIGN(InProcessImporterBridge); 78 DISALLOW_COPY_AND_ASSIGN(InProcessImporterBridge);
78 }; 79 };
79 80
80 #endif // CHROME_BROWSER_IMPORTER_IN_PROCESS_IMPORTER_BRIDGE_H_ 81 #endif // CHROME_BROWSER_IMPORTER_IN_PROCESS_IMPORTER_BRIDGE_H_
OLDNEW
« no previous file with comments | « chrome/browser/importer/firefox_importer_browsertest.cc ('k') | chrome/browser/importer/in_process_importer_bridge.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698