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

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

Issue 18064002: The browser importer code which runs in the utility process should not depend on chrome\browser dat… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/importer/ie_importer.cc ('k') | chrome/browser/importer/importer_data_types.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_IMPORTER_BRIDGE_H_ 5 #ifndef CHROME_BROWSER_IMPORTER_IMPORTER_BRIDGE_H_
6 #define CHROME_BROWSER_IMPORTER_IMPORTER_BRIDGE_H_ 6 #define CHROME_BROWSER_IMPORTER_IMPORTER_BRIDGE_H_
7 7
8 #include <string>
8 #include <vector> 9 #include <vector>
9 10
10 #include "base/basictypes.h" 11 #include "base/basictypes.h"
11 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
12 #include "base/strings/string16.h" 13 #include "base/strings/string16.h"
13 #include "build/build_config.h" 14 #include "build/build_config.h"
14 #include "chrome/browser/history/history_types.h" 15 #include "chrome/browser/history/history_types.h"
15 #include "chrome/browser/importer/importer_data_types.h" 16 #include "chrome/browser/importer/importer_data_types.h"
16 17
17 class GURL; 18 class GURL;
18 struct IE7PasswordInfo; 19 struct IE7PasswordInfo;
19 struct ImportedBookmarkEntry; 20 struct ImportedBookmarkEntry;
20 struct ImportedFaviconUsage; 21 struct ImportedFaviconUsage;
21 class TemplateURL; 22
23 namespace importer {
24 struct URLKeywordInfo;
25 }
26
22 // TODO: remove this, see friend declaration in ImporterBridge. 27 // TODO: remove this, see friend declaration in ImporterBridge.
23 class Toolbar5Importer; 28 class Toolbar5Importer;
24 29
25 namespace content { 30 namespace content {
26 struct PasswordForm; 31 struct PasswordForm;
27 } 32 }
28 33
29 class ImporterBridge : public base::RefCountedThreadSafe<ImporterBridge> { 34 class ImporterBridge : public base::RefCountedThreadSafe<ImporterBridge> {
30 public: 35 public:
31 ImporterBridge(); 36 ImporterBridge();
32 37
33 virtual void AddBookmarks( 38 virtual void AddBookmarks(
34 const std::vector<ImportedBookmarkEntry>& bookmarks, 39 const std::vector<ImportedBookmarkEntry>& bookmarks,
35 const string16& first_folder_name) = 0; 40 const string16& first_folder_name) = 0;
36 41
37 virtual void AddHomePage(const GURL& home_page) = 0; 42 virtual void AddHomePage(const GURL& home_page) = 0;
38 43
39 #if defined(OS_WIN) 44 #if defined(OS_WIN)
40 virtual void AddIE7PasswordInfo(const IE7PasswordInfo& password_info) = 0; 45 virtual void AddIE7PasswordInfo(const IE7PasswordInfo& password_info) = 0;
41 #endif 46 #endif
42 47
43 virtual void SetFavicons( 48 virtual void SetFavicons(
44 const std::vector<ImportedFaviconUsage>& favicons) = 0; 49 const std::vector<ImportedFaviconUsage>& favicons) = 0;
45 50
46 virtual void SetHistoryItems(const history::URLRows& rows, 51 virtual void SetHistoryItems(const history::URLRows& rows,
47 history::VisitSource visit_source) = 0; 52 history::VisitSource visit_source) = 0;
48 53
49 // WARNING: This function takes ownership of (and deletes) the pointers in 54 virtual void SetKeywords(
50 // |template_urls|! 55 const std::vector<importer::URLKeywordInfo>& url_keywords,
51 virtual void SetKeywords(const std::vector<TemplateURL*>& template_urls, 56 bool unique_on_host_and_path) = 0;
52 bool unique_on_host_and_path) = 0; 57
58 // The search_engine_data vector contains XML data retrieved from the Firefox
59 // profile and its sqlite db.
60 virtual void SetFirefoxSearchEnginesXMLData(
61 const std::vector<std::string>& search_engine_data) = 0;
53 62
54 virtual void SetPasswordForm(const content::PasswordForm& form) = 0; 63 virtual void SetPasswordForm(const content::PasswordForm& form) = 0;
55 64
56 // Notifies the coordinator that the import operation has begun. 65 // Notifies the coordinator that the import operation has begun.
57 virtual void NotifyStarted() = 0; 66 virtual void NotifyStarted() = 0;
58 67
59 // Notifies the coordinator that the collection of data for the specified 68 // Notifies the coordinator that the collection of data for the specified
60 // item has begun. 69 // item has begun.
61 virtual void NotifyItemStarted(importer::ImportItem item) = 0; 70 virtual void NotifyItemStarted(importer::ImportItem item) = 0;
62 71
(...skipping 16 matching lines...) Expand all
79 // connection, but as an interim step we allow Toolbar5Import to break 88 // connection, but as an interim step we allow Toolbar5Import to break
80 // the abstraction here and assume import is in-process. 89 // the abstraction here and assume import is in-process.
81 friend class Toolbar5Importer; 90 friend class Toolbar5Importer;
82 91
83 virtual ~ImporterBridge(); 92 virtual ~ImporterBridge();
84 93
85 DISALLOW_COPY_AND_ASSIGN(ImporterBridge); 94 DISALLOW_COPY_AND_ASSIGN(ImporterBridge);
86 }; 95 };
87 96
88 #endif // CHROME_BROWSER_IMPORTER_IMPORTER_BRIDGE_H_ 97 #endif // CHROME_BROWSER_IMPORTER_IMPORTER_BRIDGE_H_
OLDNEW
« no previous file with comments | « chrome/browser/importer/ie_importer.cc ('k') | chrome/browser/importer/importer_data_types.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698