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

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

Powered by Google App Engine
This is Rietveld 408576698