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

Side by Side Diff: chrome/common/importer/importer_bridge.h

Issue 480953002: Implement "Autofill form data" import for Firefox (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added test case Created 6 years, 4 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_COMMON_IMPORTER_IMPORTER_BRIDGE_H_ 5 #ifndef CHROME_COMMON_IMPORTER_IMPORTER_BRIDGE_H_
6 #define CHROME_COMMON_IMPORTER_IMPORTER_BRIDGE_H_ 6 #define CHROME_COMMON_IMPORTER_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/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
13 #include "base/strings/string16.h" 13 #include "base/strings/string16.h"
14 #include "build/build_config.h" 14 #include "build/build_config.h"
15 #include "chrome/common/importer/importer_autofill_form_data_entry.h"
Ilya Sherman 2014/08/20 05:47:41 nit: Can you forward-declare the type, rather than
Nikhil 2014/08/20 11:29:17 Done.
15 #include "chrome/common/importer/importer_data_types.h" 16 #include "chrome/common/importer/importer_data_types.h"
16 #include "chrome/common/importer/importer_url_row.h" 17 #include "chrome/common/importer/importer_url_row.h"
17 18
18 class GURL; 19 class GURL;
19 struct ImportedBookmarkEntry; 20 struct ImportedBookmarkEntry;
20 struct ImportedFaviconUsage; 21 struct ImportedFaviconUsage;
21 22
22 namespace autofill { 23 namespace autofill {
23 struct PasswordForm; 24 struct PasswordForm;
24 } 25 }
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 const std::vector<importer::URLKeywordInfo>& url_keywords, 57 const std::vector<importer::URLKeywordInfo>& url_keywords,
57 bool unique_on_host_and_path) = 0; 58 bool unique_on_host_and_path) = 0;
58 59
59 // The search_engine_data vector contains XML data retrieved from the Firefox 60 // The search_engine_data vector contains XML data retrieved from the Firefox
60 // profile and its sqlite db. 61 // profile and its sqlite db.
61 virtual void SetFirefoxSearchEnginesXMLData( 62 virtual void SetFirefoxSearchEnginesXMLData(
62 const std::vector<std::string>& search_engine_data) = 0; 63 const std::vector<std::string>& search_engine_data) = 0;
63 64
64 virtual void SetPasswordForm(const autofill::PasswordForm& form) = 0; 65 virtual void SetPasswordForm(const autofill::PasswordForm& form) = 0;
65 66
67 virtual void SetAutofillFormData(
68 const std::vector<ImporterAutofillFormDataEntry>& entries) = 0;
69
66 // Notifies the coordinator that the import operation has begun. 70 // Notifies the coordinator that the import operation has begun.
67 virtual void NotifyStarted() = 0; 71 virtual void NotifyStarted() = 0;
68 72
69 // Notifies the coordinator that the collection of data for the specified 73 // Notifies the coordinator that the collection of data for the specified
70 // item has begun. 74 // item has begun.
71 virtual void NotifyItemStarted(importer::ImportItem item) = 0; 75 virtual void NotifyItemStarted(importer::ImportItem item) = 0;
72 76
73 // Notifies the coordinator that the collection of data for the specified 77 // Notifies the coordinator that the collection of data for the specified
74 // item has completed. 78 // item has completed.
75 virtual void NotifyItemEnded(importer::ImportItem item) = 0; 79 virtual void NotifyItemEnded(importer::ImportItem item) = 0;
76 80
77 // Notifies the coordinator that the entire import operation has completed. 81 // Notifies the coordinator that the entire import operation has completed.
78 virtual void NotifyEnded() = 0; 82 virtual void NotifyEnded() = 0;
79 83
80 // For InProcessImporters this calls l10n_util. For ExternalProcessImporters 84 // For InProcessImporters this calls l10n_util. For ExternalProcessImporters
81 // this calls the set of strings we've ported over to the external process. 85 // this calls the set of strings we've ported over to the external process.
82 // It's good to avoid having to create a separate ResourceBundle for the 86 // It's good to avoid having to create a separate ResourceBundle for the
83 // external import process, since the importer only needs a few strings. 87 // external import process, since the importer only needs a few strings.
84 virtual base::string16 GetLocalizedString(int message_id) = 0; 88 virtual base::string16 GetLocalizedString(int message_id) = 0;
85 89
86 protected: 90 protected:
87 friend class base::RefCountedThreadSafe<ImporterBridge>; 91 friend class base::RefCountedThreadSafe<ImporterBridge>;
88 92
89 virtual ~ImporterBridge(); 93 virtual ~ImporterBridge();
90 94
91 DISALLOW_COPY_AND_ASSIGN(ImporterBridge); 95 DISALLOW_COPY_AND_ASSIGN(ImporterBridge);
92 }; 96 };
93 97
94 #endif // CHROME_COMMON_IMPORTER_IMPORTER_BRIDGE_H_ 98 #endif // CHROME_COMMON_IMPORTER_IMPORTER_BRIDGE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698