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

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

Issue 14575004: Extract BookmarksFileImporter from Firefox2Importer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: test cleanup Created 7 years, 7 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 <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
12 #include "base/string16.h" 12 #include "base/string16.h"
13 #include "build/build_config.h" 13 #include "build/build_config.h"
14 #include "chrome/browser/history/history_types.h"
14 #include "chrome/browser/importer/importer_data_types.h" 15 #include "chrome/browser/importer/importer_data_types.h"
15 #include "chrome/browser/importer/profile_writer.h"
16 16
17 class GURL;
18 struct IE7PasswordInfo;
19 struct ImportedBookmarkEntry;
20 struct ImportedFaviconUsage;
21 class TemplateURL;
17 // TODO: remove this, see friend declaration in ImporterBridge. 22 // TODO: remove this, see friend declaration in ImporterBridge.
18 class Toolbar5Importer; 23 class Toolbar5Importer;
19 24
25 namespace content {
26 struct PasswordForm;
27 }
28
20 class ImporterBridge : public base::RefCountedThreadSafe<ImporterBridge> { 29 class ImporterBridge : public base::RefCountedThreadSafe<ImporterBridge> {
21 public: 30 public:
22 ImporterBridge(); 31 ImporterBridge();
23 32
24 virtual void AddBookmarks( 33 virtual void AddBookmarks(
25 const std::vector<ProfileWriter::BookmarkEntry>& bookmarks, 34 const std::vector<ImportedBookmarkEntry>& bookmarks,
26 const string16& first_folder_name) = 0; 35 const string16& first_folder_name) = 0;
27 36
28 virtual void AddHomePage(const GURL& home_page) = 0; 37 virtual void AddHomePage(const GURL& home_page) = 0;
29 38
30 #if defined(OS_WIN) 39 #if defined(OS_WIN)
31 virtual void AddIE7PasswordInfo(const IE7PasswordInfo& password_info) = 0; 40 virtual void AddIE7PasswordInfo(const IE7PasswordInfo& password_info) = 0;
32 #endif 41 #endif
33 42
34 virtual void SetFavicons( 43 virtual void SetFavicons(
35 const std::vector<history::ImportedFaviconUsage>& favicons) = 0; 44 const std::vector<ImportedFaviconUsage>& favicons) = 0;
36 45
37 virtual void SetHistoryItems(const history::URLRows& rows, 46 virtual void SetHistoryItems(const history::URLRows& rows,
38 history::VisitSource visit_source) = 0; 47 history::VisitSource visit_source) = 0;
39 48
40 // WARNING: This function takes ownership of (and deletes) the pointers in 49 // WARNING: This function takes ownership of (and deletes) the pointers in
41 // |template_urls|! 50 // |template_urls|!
42 virtual void SetKeywords(const std::vector<TemplateURL*>& template_urls, 51 virtual void SetKeywords(const std::vector<TemplateURL*>& template_urls,
43 bool unique_on_host_and_path) = 0; 52 bool unique_on_host_and_path) = 0;
44 53
45 virtual void SetPasswordForm(const content::PasswordForm& form) = 0; 54 virtual void SetPasswordForm(const content::PasswordForm& form) = 0;
(...skipping 24 matching lines...) Expand all
70 // connection, but as an interim step we allow Toolbar5Import to break 79 // connection, but as an interim step we allow Toolbar5Import to break
71 // the abstraction here and assume import is in-process. 80 // the abstraction here and assume import is in-process.
72 friend class Toolbar5Importer; 81 friend class Toolbar5Importer;
73 82
74 virtual ~ImporterBridge(); 83 virtual ~ImporterBridge();
75 84
76 DISALLOW_COPY_AND_ASSIGN(ImporterBridge); 85 DISALLOW_COPY_AND_ASSIGN(ImporterBridge);
77 }; 86 };
78 87
79 #endif // CHROME_BROWSER_IMPORTER_IMPORTER_BRIDGE_H_ 88 #endif // CHROME_BROWSER_IMPORTER_IMPORTER_BRIDGE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698