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

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
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"
12 #include "base/files/file_path.h"
gab 2013/06/27 23:12:44 Remove this import.
ananta 2013/06/27 23:26:09 Done.
11 #include "base/memory/ref_counted.h" 13 #include "base/memory/ref_counted.h"
12 #include "base/strings/string16.h" 14 #include "base/strings/string16.h"
13 #include "build/build_config.h" 15 #include "build/build_config.h"
14 #include "chrome/browser/history/history_types.h" 16 #include "chrome/browser/history/history_types.h"
15 #include "chrome/browser/importer/importer_data_types.h" 17 #include "chrome/browser/importer/importer_data_types.h"
16 18
17 class GURL; 19 class GURL;
18 struct IE7PasswordInfo; 20 struct IE7PasswordInfo;
19 struct ImportedBookmarkEntry; 21 struct ImportedBookmarkEntry;
20 struct ImportedFaviconUsage; 22 struct ImportedFaviconUsage;
21 class TemplateURL; 23
24 namespace importer {
25 struct URLKeywordInfo;
26 }
27
22 // TODO: remove this, see friend declaration in ImporterBridge. 28 // TODO: remove this, see friend declaration in ImporterBridge.
23 class Toolbar5Importer; 29 class Toolbar5Importer;
24 30
25 namespace content { 31 namespace content {
26 struct PasswordForm; 32 struct PasswordForm;
27 } 33 }
28 34
29 class ImporterBridge : public base::RefCountedThreadSafe<ImporterBridge> { 35 class ImporterBridge : public base::RefCountedThreadSafe<ImporterBridge> {
30 public: 36 public:
31 ImporterBridge(); 37 ImporterBridge();
32 38
33 virtual void AddBookmarks( 39 virtual void AddBookmarks(
34 const std::vector<ImportedBookmarkEntry>& bookmarks, 40 const std::vector<ImportedBookmarkEntry>& bookmarks,
35 const string16& first_folder_name) = 0; 41 const string16& first_folder_name) = 0;
36 42
37 virtual void AddHomePage(const GURL& home_page) = 0; 43 virtual void AddHomePage(const GURL& home_page) = 0;
38 44
39 #if defined(OS_WIN) 45 #if defined(OS_WIN)
40 virtual void AddIE7PasswordInfo(const IE7PasswordInfo& password_info) = 0; 46 virtual void AddIE7PasswordInfo(const IE7PasswordInfo& password_info) = 0;
41 #endif 47 #endif
42 48
43 virtual void SetFavicons( 49 virtual void SetFavicons(
44 const std::vector<ImportedFaviconUsage>& favicons) = 0; 50 const std::vector<ImportedFaviconUsage>& favicons) = 0;
45 51
46 virtual void SetHistoryItems(const history::URLRows& rows, 52 virtual void SetHistoryItems(const history::URLRows& rows,
47 history::VisitSource visit_source) = 0; 53 history::VisitSource visit_source) = 0;
48 54
49 // WARNING: This function takes ownership of (and deletes) the pointers in 55 virtual void SetKeywords(
50 // |template_urls|! 56 const std::vector<importer::URLKeywordInfo>& url_keywords,
51 virtual void SetKeywords(const std::vector<TemplateURL*>& template_urls, 57 bool unique_on_host_and_path) = 0;
52 bool unique_on_host_and_path) = 0; 58
59 // The search_engine_data vector contains XML data retrieved from the Firefox
60 // profile and its sqlite db.
61 virtual void SetFirefoxSearchEnginesXMLData(
62 const std::vector<std::string>& search_engine_data) = 0;
53 63
54 virtual void SetPasswordForm(const content::PasswordForm& form) = 0; 64 virtual void SetPasswordForm(const content::PasswordForm& form) = 0;
55 65
56 // Notifies the coordinator that the import operation has begun. 66 // Notifies the coordinator that the import operation has begun.
57 virtual void NotifyStarted() = 0; 67 virtual void NotifyStarted() = 0;
58 68
59 // Notifies the coordinator that the collection of data for the specified 69 // Notifies the coordinator that the collection of data for the specified
60 // item has begun. 70 // item has begun.
61 virtual void NotifyItemStarted(importer::ImportItem item) = 0; 71 virtual void NotifyItemStarted(importer::ImportItem item) = 0;
62 72
(...skipping 16 matching lines...) Expand all
79 // connection, but as an interim step we allow Toolbar5Import to break 89 // connection, but as an interim step we allow Toolbar5Import to break
80 // the abstraction here and assume import is in-process. 90 // the abstraction here and assume import is in-process.
81 friend class Toolbar5Importer; 91 friend class Toolbar5Importer;
82 92
83 virtual ~ImporterBridge(); 93 virtual ~ImporterBridge();
84 94
85 DISALLOW_COPY_AND_ASSIGN(ImporterBridge); 95 DISALLOW_COPY_AND_ASSIGN(ImporterBridge);
86 }; 96 };
87 97
88 #endif // CHROME_BROWSER_IMPORTER_IMPORTER_BRIDGE_H_ 98 #endif // CHROME_BROWSER_IMPORTER_IMPORTER_BRIDGE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698